[PATCH] D57725: [WebAssembly] Implement --trace (-y) and --trace-symbol

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 14:35:07 PST 2019


ruiu added inline comments.


================
Comment at: wasm/SymbolTable.cpp:89-90
     Inserted = true;
+    if (TraceSymbols.count(Name) != 0)
+      Sym->Traced = true;
   }
----------------
Any operation that we do for each symbol can be super expensive, as the number of symbols can be in the order of millions. In particular, lld should do more than one hash table lookup for each symbol. This is one of reasons why lld is so fast.

So, this new hash table shouldn't be added. Take a look at ELF/SymbolTable.cpp. We implemented this feature without adding a new hash table lookup.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57725/new/

https://reviews.llvm.org/D57725





More information about the llvm-commits mailing list