-
Notifications
You must be signed in to change notification settings - Fork 14.1k
[BOLT] Add itrace aggregation for AUX data #70426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Question for reviewers: Do any Bolt tests run Bolt and pass in a perf.data file and check the .fdata is correct? |
@maksfb @rafaelauler Please can I have a review. |
Please use [BOLT] in commit message |
fe96ac5
to
f87cb30
Compare
We have several internal tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Overall looks good to me, but please check the question about the scope.
bolt/lib/Profile/DataAggregator.cpp
Outdated
@@ -155,6 +160,8 @@ void DataAggregator::findPerfExecutable() { | |||
} | |||
|
|||
void DataAggregator::start() { | |||
std::string ItracePerfScriptArgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to declare ItracePerfScriptArgs
in this scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw other std::string being declared at the beginning of functions. I've moved the declaration into the if statement scope.
Noted. I didn't port those as we had to sanitize inputs and perf data is tricky since it's opaque and captures a lot of system information by default. We do have some perf2bolt tests in rafaelauler/bolt-tests repo, but not a comprehensive suite. CC @lanza |
If you have a perf.data with Arm ETM data the only way to use perf2bolt with Branch Aggregation is to first run
perf inject --itrace=l64i1us -o perf-brstack.data
and then pass the new perf-brstack.data into perf2bolt. perf2bolt then runsperf script -F pid,ip,brstack
to produce the brstacks.This PR adds
--itrace
arg to perf2bolt to enable Itrace Aggregation. It takes a string which is what is passed to theperf script -F pid,ip,brstack --itrace={0}
. This command produces the brstacks without having to run perf inject and creating a new perf.data file.