I used this quite a bit for some internal benchmarking, and seems to be working (at least for the time side). GetMallocUsage() appears to be broken on FreeBSD-11 + tcmalloc(), and I'll investigate on the reason, but I would like to get another pair of eye on this patch in the meanwhile.
I can write an unit test, if needed.
Details
Diff Detail
Event Timeline
D7663 takes care of GetMallocUsage() bits. My previous comment should be read as GetMallocUsage() appears to be broken on FreeBSD-11 + jemalloc" and not as "GetMallocUsage() appears to be broken on FreeBSD-11 + tcmalloc".
LGTM
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
181 | total -> Total "data size" may be confusing -- this can be read as the total number of bytes read from disk, for example. Needs a bit of wordsmithing. |
should this be a general option in LinkingContext ? Why is this specific to the GnuFlavor ? Are you planning to add the stats collection for individual passes that run during Linkstep ?
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
181 | This is what GNU ld uses. I agree with you it's a poorly chosen sequence of words, so we need to decide if we want to stick with what they currently output or introduce our own notion of statistics. At this point I can also say that we can output something more meaningful/fine-grained. |
LGTM
lib/Driver/GnuLdDriver.cpp | ||
---|---|---|
181 | Ah, it's okay then. It's better to keep the same wording as the GNU linker if there's no reason to change them. I'm also okay to keep it for the GNU driver only for now as we don't know what command line option should be used to enable this feature for other drivers. (For PE/COFF, it should be enabled when /verbose is given? Perhaps. But I don't know.) It's pretty easy to move this to Driver in future. |
total -> Total
"data size" may be confusing -- this can be read as the total number of bytes read from disk, for example. Needs a bit of wordsmithing.