summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/context-object/main.cpp
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-02-21 16:45:42 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-02-21 16:45:42 +0000
commit52d5781c8711c334c48f48ffdd1211331ce3a573 (patch)
tree669ade256e5966f77af5f2cdcec37cc887282ced /lldb/packages/Python/lldbsuite/test/expression_command/context-object/main.cpp
parent12a21e4b69d4f156490cc82bee3d4b28368b4840 (diff)
downloadbcm5719-llvm-52d5781c8711c334c48f48ffdd1211331ce3a573.tar.gz
bcm5719-llvm-52d5781c8711c334c48f48ffdd1211331ce3a573.zip
[llvm-objcopy] Make removeSectionReferences batched
Summary: Removing a large number of sections from a file with a lot of symbols can have abysmal (i.e. O(n^2)) performance, e.g. when running `--only-section` to extract one section out of a large file. This comes from iterating over all symbols in the symbol table each time we remove a section, to remove references to the section we just removed. Instead, do just one pass of symbol removal by passing a hash set of all the sections we'd like to remove references to. This fixes a regression when running llvm-objcopy -j <one section> on an object file with many sections and symbols -- on my machine, running `objcopy -j .keep_me huge-input.o /tmp/foo.o` takes .3s with GNU objcopy, 1.3s with an updated llvm-objcopy, and 7+ minutes with llvm-objcopy prior to this patch. Reviewers: MaskRay, jhenderson, jakehehrlich, alexshap, espindola Reviewed By: MaskRay, jhenderson Subscribers: echristo, emaste, arichardson, mgrang, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58296 llvm-svn: 354597
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/context-object/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud