This is an archive of the discontinued LLVM Phabricator instance.

[llvm-profgen] Unify output format of unsymbolized profiles
ClosedPublic

Authored by wlei on Sep 20 2021, 9:58 AM.

Details

Summary

Unify the output format of raw profiles for hybrid sample and LBR only sample.

Diff Detail

Event Timeline

wlei created this revision.Sep 20 2021, 9:58 AM
wlei requested review of this revision.Sep 20 2021, 9:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 9:58 AM
wlei retitled this revision from [llvm-profgen] Unify output format of different unsymbolized profiles to [llvm-profgen] Unify output format of unsymbolized profiles.Sep 20 2021, 10:02 AM
wlei edited the summary of this revision. (Show Details)
wlei added reviewers: hoy, wenlei, wmi.
hoy added inline comments.Sep 20 2021, 10:48 AM
llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
1

Add a test for show-relative-address=1?

wlei added inline comments.Sep 20 2021, 10:53 AM
llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
1

The default is true, so all others' test is for show-relative-address=1. Here is to test show-relative-address=0

hoy accepted this revision.Sep 20 2021, 11:05 AM
hoy added inline comments.
llvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
1

I see. Makes sense.

This revision is now accepted and ready to land.Sep 20 2021, 11:05 AM

Looks like we're changing (begin, end): count to begin-end: count. Curious any restriction on the format, or reason why one is chosen over the other? Is that purely to align with internal raw output from fleet profiler?

wlei added a comment.Sep 20 2021, 9:40 PM

Looks like we're changing (begin, end): count to begin-end: count. Curious any restriction on the format, or reason why one is chosen over the other? Is that purely to align with internal raw output from fleet profiler?

Yeah, no special reason, just to align with the internal raw output.

wenlei added inline comments.Sep 21 2021, 8:14 AM
llvm/tools/llvm-profgen/PerfReader.cpp
22

nit: show-xx is often used to output xx as extra. how about something like [show-]address-as-offset or use-offset. I'd change the term/variable name from relative address to offset too.

595

For CS raw profile (!CI.first.empty()), can we still keep the indentation like before for readability? Same for branch below. Otherwise it looks good.

wlei added inline comments.Sep 24 2021, 10:58 AM
llvm/tools/llvm-profgen/PerfReader.cpp
22

Changed to use-offset

595

sounds good!

wlei updated this revision to Diff 374909.Sep 24 2021, 10:58 AM

Updating D110080: [llvm-profgen] Unify output format of unsymbolized profiles

wenlei accepted this revision.Sep 24 2021, 12:29 PM

lgtm, thanks.

This revision was landed with ongoing or failed builds.Sep 24 2021, 2:20 PM
This revision was automatically updated to reflect the committed changes.