2025-02-20 Ordinary Meeting Notes
Feb 20, 2025 | RV-LFX Performance Event Sampling TG
Attendees: Beeman Strong
Notes
Attendees: Beeman, Daniel, Robert, Chun, Bruce, Greg, Hasan
Agenda:
Resume discussion on late instr sample filtering
New perf events for Instr Sampling
Sample Collection
Resume discussion of late filtering
For latencies, could make full threshold vs mask & match optional, trace does it this way
Triggers make masks optional
We can work this out once we start work on the spec
If filtering for only long latency insts, could take a long time to get many
Can control selection rate by counter value
Option to filter by instr type at selection vs retire forks the spec
Many RV extensions have optionality
Worried that selection filtering may have timing challenges for some implementations
Worried that’s too big a difference, hard to work with implementations with big differences
Agreed on approach to require filtering by instr type at retire, with the option for an implementation to add the optimization of filtering by type at selection
Can we filter to only record speculative insts
Yes, by filtering on “cleared by”, select all clear sources
Some usages:
Sample on all insts, spec and non-spec. Get an idea of the percent discarded, like TMA’s BAD_SPEC
Sample only on spec ops, those cleared by mispredicts. Thanks to recording of PC of branch/jump that mispredicted, can identify which mispredicts are most costly
What’s the benefit of filtering at selection?
Narrows the sample population to only select instruction types that have a chance to be recorded
Speeds up the process of filling the buffer, one of the chief complaints about instr sampling vs event sampling
Need to be clear that only 1 inst at a time is sampled
Need to be clear what can be filtered at selection vs at retire
Latencies that count until retire may need to do threshold compare some cycle(s) before retire, in order to support precise LCOFI
Should we accelerate selection after a sample is discarded?
Speeds up filling buffer, but alters sample rate
Discussion for next time, out of time
Action items
Feb 13, 2025 - Beeman Strong - Start thread on latency options
Related content
RISC-V International