This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Control aggregation mode output profile file format
ClosedPublic

Authored by Amir on Sep 15 2022, 5:16 PM.

Details

Summary

In perf2bolt and -aggregate-only BOLT mode, the output profile file is written
in fdata format by default. Provide a knob -profile-format=[fdata,yaml] to
control the format.
Note that -w option still dumps in YAML format.

Diff Detail

Event Timeline

Amir created this revision.Sep 15 2022, 5:16 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.Sep 15 2022, 5:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2022, 5:16 PM
Amir updated this revision to Diff 460868.Sep 16 2022, 1:09 PM

Fix build issue, extend X86/pre-aggregated-perf.test

Amir updated this revision to Diff 460871.Sep 16 2022, 1:13 PM

Use sort for fdata output

Can you s/ProfileOutput/ProfileFormat/g and s/profile-output/profile-format/g?

bolt/test/X86/pre-aggregated-perf.test
17 ↗(On Diff #460871)

nit: use double dash for long options.

Amir updated this revision to Diff 460900.Sep 16 2022, 2:24 PM

Address comments

Amir marked an inline comment as done.Sep 16 2022, 2:25 PM

Can you s/ProfileOutput/ProfileFormat/g and s/profile-output/profile-format/g?

Done

Amir edited the summary of this revision. (Show Details)Sep 16 2022, 2:27 PM
maksfb added inline comments.Sep 16 2022, 3:00 PM
bolt/test/X86/pre-aggregated-perf.test
22 ↗(On Diff #460900)

It's super confusing, but -pa is a long option.

Amir updated this revision to Diff 460922.Sep 16 2022, 3:07 PM

Use --pa

Amir marked an inline comment as done.Sep 16 2022, 3:08 PM
Amir added inline comments.
bolt/test/X86/pre-aggregated-perf.test
22 ↗(On Diff #460900)

Sorry, I didn't notice that while copying. Fixed.

Amir marked an inline comment as done.Sep 16 2022, 3:08 PM
maksfb accepted this revision.Sep 19 2022, 1:00 PM

LGTM

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