This is an archive of the discontinued LLVM Phabricator instance.

[Try2][InstrProf] Attach debug info to counters
ClosedPublic

Authored by ellis on Dec 13 2021, 6:48 PM.

Details

Summary

Add the llvm flag -debug-info-correlate to attach debug info to instrumentation counters so we can correlate raw profile data to their functions. Raw profiles are dumped as .proflite files. The next diff enables llvm-profdata to consume .proflite and debug info files to produce a normal .profdata profile.

Part of the "lightweight instrumentation" work: https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4

The original diff https://reviews.llvm.org/D114565 was reverted because of the Instrumentation/InstrProfiling/debug-info-correlate.ll test, which is fixed in this commit.

Diff Detail

Event Timeline

ellis created this revision.Dec 13 2021, 6:48 PM
ellis updated this revision to Diff 394121.Dec 13 2021, 7:35 PM

Require linux to run test.

ellis published this revision for review.Dec 13 2021, 7:36 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptDec 13 2021, 7:36 PM
Herald added subscribers: llvm-commits, Restricted Project, cfe-commits. · View Herald Transcript
ellis updated this revision to Diff 394982.Dec 16 2021, 1:40 PM

Use std::string instead of Twine to pass around the default raw profile name.

kyulee accepted this revision.Dec 16 2021, 1:49 PM
This revision is now accepted and ready to land.Dec 16 2021, 1:49 PM
This revision was landed with ongoing or failed builds.Dec 16 2021, 2:20 PM
This revision was automatically updated to reflect the committed changes.