This is an archive of the discontinued LLVM Phabricator instance.

[MemProf] Collect access density statistics during profiling
ClosedPublic

Authored by tejohnson on Jan 11 2023, 5:23 PM.

Details

Summary

Track min/max/avg access density (accesses per byte and accesses per
byte per lifetime second) metrics directly during profiling. This allows
more accurate use of these metrics in profile analysis and use, instead
of trying to compute them from already aggregated data in the profile.

This required regenerating some of the raw profile and executable inputs
for a few tests. While here, make the llvm-profdata memprof tests more
resilient to differences in things like memory mapping, timestamps and
cpu ids to make future test updates easier.

Diff Detail

Event Timeline

tejohnson created this revision.Jan 11 2023, 5:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:23 PM
Herald added subscribers: Enna1, wenlei. · View Herald Transcript
tejohnson requested review of this revision.Jan 11 2023, 5:23 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJan 11 2023, 5:23 PM
Herald added subscribers: Restricted Project, cfe-commits. · View Herald Transcript

Thanks for updating the tests.

llvm/include/llvm/ProfileData/MemProfData.inc
35

Can you increment the version here? Then we won't accidentally read the old data with the new reader which expects more data per MemInfoBlock.

Also update the other copy of MemProfData.inc.

llvm/test/tools/llvm-profdata/memprof-multi.test
43–44

Use the same regex for NumSegments here?

tejohnson marked 2 inline comments as done.Jan 12 2023, 1:52 PM
tejohnson updated this revision to Diff 488766.Jan 12 2023, 1:52 PM

Address comments (version change necessitated updating the tests)

This revision is now accepted and ready to land.Jan 12 2023, 2:02 PM
This revision was landed with ongoing or failed builds.Jan 12 2023, 5:54 PM
This revision was automatically updated to reflect the committed changes.