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

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 05:04:43 PST 2019


russell.gallop marked an inline comment as done.
russell.gallop added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1624
 template <class ELFT> void LinkerDriver::compileBitcodeFiles() {
+  llvm::TimeTraceScope timeScope("LTO", StringRef(""));
   // Compile bitcode files and replace bitcode symbols.
----------------
russell.gallop wrote:
> ruiu wrote:
> > I'm curious what is supposed to pass as a second argument.
> This is used for "Detail". E.g. optimisation passes specify which pass they are running on "OptModule" specifies which module it is running on. This helps to distinguish multiples of the same kind of scope in traces. I don't think there is anything useful to detail at this level.
> 
> I could add an overloaded constructor to TimeTraceScope with a default to not add "detail". That would cut down on the StringRef("") argument which come up quite a bit. It could also cut down on file size by not writing that block out.
Created new review for TimeTraceScope constructor to avoid the need for StringRef("") in places like this: https://reviews.llvm.org/D71347


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

https://reviews.llvm.org/D71060





More information about the llvm-commits mailing list