aboutsummaryrefslogtreecommitdiff
path: root/cpu/sh.opc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-05-13 13:46:52 -0600
committerTom Tromey <tromey@adacore.com>2022-05-26 07:35:30 -0600
commit20a26f4e018cd0cb40a3b81568be0d4f164eed0f (patch)
tree28ffe28aa1e3eef2791afa1ff7c2fb368091661e /cpu/sh.opc
parentf420c9c84eb53fea7da452eab8ae0bd855537859 (diff)
downloadgdb-20a26f4e018cd0cb40a3b81568be0d4f164eed0f.zip
gdb-20a26f4e018cd0cb40a3b81568be0d4f164eed0f.tar.gz
gdb-20a26f4e018cd0cb40a3b81568be0d4f164eed0f.tar.bz2
Finalize each cooked index separately
After DWARF has been scanned, the cooked index code does a "finalization" step in a worker thread. This step combines all the index entries into a single master list, canonicalizes C++ names, and splits Ada names to synthesize package names. While this step is run in the background, gdb will wait for the results in some situations, and it turns out that this step can be slow. This is PR symtab/29105. This can be sped up by parallelizing, at a small memory cost. Now each index is finalized on its own, in a worker thread. The cost comes from name canonicalization: if a given non-canonical name is referred to by multiple indices, there will be N canonical copies (one per index) rather than just one. This requires changing the users of the index to iterate over multiple results. However, this is easily done by introducing a new "chained range" class. When run on gdb itself, the memory cost seems rather low -- on my current machine, "maint space 1" reports no change due to the patch. For performance testing, using "maint time 1" and "file" will not show correct results. That approach measures "time to next prompt", but because the patch only affects background work, this shouldn't (and doesn't) change. Instead, a simple way to make gdb wait for the results is to set a breakpoint. Before: $ /bin/time -f%e ~/gdb/install/bin/gdb -nx -q -batch \ -ex 'break main' /tmp/gdb Breakpoint 1 at 0x43ec30: file ../../binutils-gdb/gdb/gdb.c, line 28. 2.00 After: $ /bin/time -f%e ./gdb/gdb -nx -q -batch \ -ex 'break main' /tmp/gdb Breakpoint 1 at 0x43ec30: file ../../binutils-gdb/gdb/gdb.c, line 28. 0.65 Regression tested on x86-64 Fedora 34. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29105
Diffstat (limited to 'cpu/sh.opc')
0 files changed, 0 insertions, 0 deletions