[PATCH] D41915: [lldCOFF] Print detailed timing information with /VERBOSE
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 13:30:26 PST 2018
zturner added inline comments.
================
Comment at: lld/COFF/PDB.cpp:1014-1015
+
+ PdbCommitTimer.end();
+ FullPdbLinkTimer.end();
}
----------------
ruiu wrote:
> These things should be done in the RAII style.
I didn't do RAII style here because we want to start and stop in the middle of functions sometimes. It seemed inconvenient to have to make a nested scope just for that.
================
Comment at: lld/COFF/Writer.cpp:289
+static void outputTimingInformation() {
+ using C = Configuration;
----------------
ruiu wrote:
> I'd print out the timing information as we measure, instead of printing out all the information at end.
If we do it this way it might not all appear together. This will make it harder to parse the output, as you might have to scroll the terminal around to find the different pieces of information you're interested in.
================
Comment at: lld/COFF/Writer.cpp:309-328
+ message("Timing:");
+ message(
+ formatv(" Code Layout Time: {0}", Format(C::CodeLayoutTime)));
+ message(formatv(" Commit Output File: {0}",
+ Format(C::CodeDiskCommitTime)));
+ message(formatv(" PDB Emission (Cumulative): {0}", Format(C::PdbLinkTime)));
+ message(formatv(" Globals Stream Layout: {0}",
----------------
ruiu wrote:
> Please avoid using `formatv` in lld because we do not use it in other places in lld. We don't remember the format string format.
It's pretty ugly to do any kind of nice alignment without it. I try to avoid it if there's a better way, but in this case I think it would add a lot of additional code for no real benefit.
https://reviews.llvm.org/D41915
More information about the llvm-commits
mailing list