Page MenuHomeFreeBSD

DRAFT -- pmc: Branch history flag
Needs ReviewPublic

Authored by ali_mashtizadeh.com on Fri, Aug 7, 6:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 26, 7:48 PM
Unknown Object (File)
Wed, Aug 26, 10:43 AM
Unknown Object (File)
Tue, Aug 25, 3:05 PM
Unknown Object (File)
Mon, Aug 24, 9:32 PM
Unknown Object (File)
Mon, Aug 24, 2:42 AM
Unknown Object (File)
Fri, Aug 21, 8:09 PM
Unknown Object (File)
Fri, Aug 21, 12:11 PM
Unknown Object (File)
Fri, Aug 21, 9:59 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75424
Build 72307: arc lint + arc unit

Event Timeline

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)

ali_mashtizadeh.com retitled this revision from pmc: Branch history flag to DRAFT -- pmc: Branch history flag.Fri, Aug 7, 6:45 AM