This is an archive of the discontinued LLVM Phabricator instance.

[memprof] Update summary output.
ClosedPublic

Authored by snehasish on Jun 1 2022, 3:29 PM.

Details

Summary

Update the YAML format print out of the profile to include a summary
instead of displaying the headers in the raw file buffer. This allows us
to release the raw buffer early saving memory.

Diff Detail

Event Timeline

snehasish created this revision.Jun 1 2022, 3:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 3:29 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
snehasish requested review of this revision.Jun 1 2022, 3:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 3:29 PM

I think the 2 changes are unrelated so maybe they should be committed separately? Question below about one piece of info that changed.

llvm/lib/ProfileData/RawMemProfReader.cpp
217

It looks like before we printed out the number of MIBs and now we print out the number of functions containing at least one alloc - is that intended? Should we print out both?

llvm/test/tools/llvm-profdata/memprof-multi.test
38

Comment seems stale unless the summary is changed to print number of MIBs again.

snehasish updated this revision to Diff 433593.Jun 1 2022, 4:59 PM

Remove summary changes from this patch.
Add another field which tracks the number of mibs we have.

PTAL, thanks!

llvm/lib/ProfileData/RawMemProfReader.cpp
217

Done, extended the logic to print out both.

llvm/test/tools/llvm-profdata/memprof-multi.test
38

Actually, in this case I added additional check lines below to ensure 2 MIBs are printed (symbolname, lineoffset and column). I extended the logic to also track the number of MIBs so that it's clearer.

snehasish retitled this revision from [memprof] Display segment information, update summary output. to [memprof] Update summary output..Jun 1 2022, 5:08 PM
snehasish edited the summary of this revision. (Show Details)

I think the 2 changes are unrelated so maybe they should be committed separately?

Split out the segment information print in D126840.

This revision is now accepted and ready to land.Jun 1 2022, 6:19 PM
This revision was automatically updated to reflect the committed changes.