[PATCH] D41915: [lldCOFF] Print detailed timing information with /VERBOSE
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 13:26:22 PST 2018
ruiu added inline comments.
================
Comment at: lld/COFF/Config.h:112
+
+ std::array<std::chrono::milliseconds, MaxMetric> Timings;
+
----------------
Why do you have to store them to Config? Config is for configuration variables and not a generic place to store miscellaneous data.
================
Comment at: lld/COFF/PDB.cpp:1014-1015
+
+ PdbCommitTimer.end();
+ FullPdbLinkTimer.end();
}
----------------
These things should be done in the RAII style.
================
Comment at: lld/COFF/Writer.cpp:289
+static void outputTimingInformation() {
+ using C = Configuration;
----------------
I'd print out the timing information as we measure, instead of printing out all the information at end.
================
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}",
----------------
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.
https://reviews.llvm.org/D41915
More information about the llvm-commits
mailing list