This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf][llvm-profdata] Dump profile correlation data as YAML
ClosedPublic

Authored by ellis on Sep 27 2022, 3:28 PM.

Details

Summary

Change the behavior of the llvm-profdata show --debug-info= command to dump a YAML file when using debug info correlation since it provides more information in a parseable format.

Diff Detail

Event Timeline

ellis created this revision.Sep 27 2022, 3:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2022, 3:28 PM
ellis published this revision for review.Sep 27 2022, 3:46 PM
ellis retitled this revision from [InstrProf] Dump profile correlation data as YAML to [InstrProf][llvm-profdata] Dump profile correlation data as YAML.
ellis edited the summary of this revision. (Show Details)
ellis added reviewers: kyulee, yozhu, phosek.
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 27 2022, 3:47 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
yozhu accepted this revision.Oct 3 2022, 11:09 AM
This revision is now accepted and ready to land.Oct 3 2022, 11:09 AM

Could we make this selectable? We already have the --json option in llvm-profdata for sample profile data. Could we replace it with a --output-format=[json|yaml] option and extend it to support other output types, including debug info correlation. You could then use llvm-profdata show --debug-info=%t --output-format=yaml.

Adding --output-format=[json|yaml] looks good to me.

ellis added a comment.Oct 3 2022, 5:59 PM

I like the idea of --output-format=yaml since it easily allows us to preserve the original behavior. I'll add this in another diff and update this.

ellis updated this revision to Diff 464886.Oct 3 2022, 9:58 PM

Add the "Probes" key to Yaml output so that we can add more keys in the future. Also add D135127 as a parent diff to use the --output-format=yaml option.

ellis updated this revision to Diff 465798.Oct 6 2022, 11:16 AM

Rebase.

phosek accepted this revision.Oct 6 2022, 12:42 PM

LGTM

This revision was landed with ongoing or failed builds.Oct 7 2022, 9:47 AM
This revision was automatically updated to reflect the committed changes.