[PATCH] D71060: [LLD][ELF] Add time-trace to ELF LLD (2/2)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 21:59:28 PST 2019


MaskRay added a comment.

I have a general question about the `llvm::TimeTraceScope timeScope("LTO");` trace sites. Shall we just use the container function name if applicable?



================
Comment at: lld/ELF/Driver.cpp:2014
+  {
+    llvm::TimeTraceScope timeScope("Merge input sections");
+    for (BaseCommand *base : script->sectionCommands)
----------------
This comment may be misleading.

It creates MergeSyntheticSection's and does other tasks that cannot be summaries by "Merge input sections".

Probably delete the trace here. It shouldn't take a lot of time anyway.


================
Comment at: lld/ELF/MarkLive.cpp:327
 template <class ELFT> void markLive() {
+  llvm::TimeTraceScope timeScope("GC");
   // If -gc-sections is not given, no sections are removed.
----------------
Probably just reuse the function name: markLive


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

https://reviews.llvm.org/D71060





More information about the llvm-commits mailing list