This is a draft change to discuss the idea of using the multipart
payload to implement a unified interface for LBR on Intel and AMD, and
BRBE on ARM.
Sponsored by: Netflix
Differential D58698
DRAFT -- pmc: Branch history flag Authored by ali_mashtizadeh.com on Fri, Aug 7, 6:35 AM. Tags None Referenced Files
Subscribers
Details This is a draft change to discuss the idea of using the multipart Sponsored by: Netflix
Diff Detail
Event TimelineComment Actions Hello folks this is a quick draft I threw together to sketch out providing a unified interface for branch histories like LBR on Intel and AMD, and BRBE on ARM. I looped in everyone that's working on a relevant patch. The basic idea is that we introduce a new callback inside the add_sample path to allow for the branch payload to be filled in. This will use the multipart functions (so I need to update their scope). You can either fill in the payload into the callstack buffer and call pmc_multipart_add() or pmc_multipart_copydata() to copy a buffer into the stack frame. I did it this way because the branch history data is fairly large and we can't copy it on the stack. From the user's perspective they just use the -B flag. E.g. pmcstat -B -S instructions -O samples.out. (Please ignore that I didn't fill in all the getopt stuff again just a draft to facilitate discussion) |