[PATCH] D58599: [LLD] Add summary support
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 11:11:11 PDT 2019
aganea marked 2 inline comments as done.
aganea added a comment.
In D58599#1412972 <https://reviews.llvm.org/D58599#1412972>, @ruiu wrote:
> It sounds like /summary is more like a developer option and should be hidden from the user. By hiding it, I mean the option shouldn't be in the option list in `/help`.
It is hidden indeed as it is.
Please let me know if you find this feature useful and if you'd use it. I don't expect you to accept all of my patches, but I thought this would be useful for the other drivers too.
================
Comment at: COFF/PDB.cpp:1361
}
}
----------------
ruiu wrote:
> aganea wrote:
> > ruiu wrote:
> > > Looks like instead of pushing stats data to a `Summary` class and print it out later, you could print out the stats right here.
> > That would skew profiles recorded for `/time`. I often use `/time` and `/summary` at the same time.
> You can stop the timer and resume it after you are done with summary.
The main selling point was for this to be a one-liner call. However, it's only meant for high-level information, so maybe it won't be that much of an issue for timings.
================
Comment at: Common/Summary.cpp:33
+namespace Summary {
+static std::vector<std::pair<uint64_t, std::string>> Lines;
+void addLine(uint64_t Val, StringRef S) { Lines.push_back({Val, S.str()}); };
----------------
Alternatively, I could accumulate the stats into a static string, and print it on exit. Would you consider that a better approach?
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58599/new/
https://reviews.llvm.org/D58599
More information about the llvm-commits
mailing list