aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-07-17 17:50:09 +0000
committerRui Ueyama <ruiu@google.com>2016-07-17 17:50:09 +0000
commit69c778c084faafe8ddbc7ece947762241594a92f (patch)
tree471d3d56c4c9a7232e4ecc62b7f7e6f1ab561d12 /llvm/unittests/Support/MathExtrasTest.cpp
parentb06700fa7863ac667c052332aec2eaed2872a67e (diff)
downloadllvm-69c778c084faafe8ddbc7ece947762241594a92f.zip
llvm-69c778c084faafe8ddbc7ece947762241594a92f.tar.gz
llvm-69c778c084faafe8ddbc7ece947762241594a92f.tar.bz2
Implement almost-zero-cost --trace-symbol.
--trace-symbol is a command line option to watch a symbol. Previosly, we looked up a hash table for a new symbol if the option is given. Any code that looks up a hash table for each symbol is expensive because the linker handles a lot of symbols. In our design, we look up a hash table strictly only once for a symbol, so --trace-symbol was an exception. This patch improves efficiency of the option by merging the hash table into the symbol table. Instead of looking up a separate hash table with a string, this patch sets `Traced` flag to symbols specified by --trace-symbol. So, if you insert a symbol and get a symbol with `Traced` flag on, you know that you need to print out a log message for the symbol. This is nearly zero cost. llvm-svn: 275716
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
0 files changed, 0 insertions, 0 deletions