Re: Proposal v2: SBI PMU Extension
Like Greg already mentioned, SBI PMU event_idx.type == 0x2 is HARDWARE RAW event.
To monitor RAW events, user-space perf tool will create user space perf RAW event (i.e. perf_event_attr.type == 4 and perf_event_attr.config = = <hardware_specific_raw_event_idx>). The Linux RISC-V PMU driver will allocate and map matching HARDWARE counter which supports specified corrosponding SBI RAW event (event_idx.type = 2, event_idx.code = perf_event_attr.config[11:0], and event_idx.info = perf_event_attr.config[59:12]).
The SBI PMU RAW events are mostly opaque to all software layers (i.e. User-space, Linux, Hypervisors, and OpenSBI). Users will need to refer HW specs for semantics of RAW events when using RAW events with perf tool.
Regards, Anup
From: tech-unixplatformspec@... <tech-unixplatformspec@...>
On Behalf Of Greg Favor
Sent: 09 July 2020 12:43 To: Brian Grayson <brian.grayson@...> Cc: Zong Li <zong.li@...>; Anup Patel <Anup.Patel@...>; Atish Patra <Atish.Patra@...>; andrew@...; tech-unixplatformspec@... Subject: Re: [RISC-V] [tech-unixplatformspec] Proposal v2: SBI PMU Extension
I think this need is covered by this excerpt from the v2 proposal:
If event_idx.type == 0x2 then it is HARDWARE RAW event. For HARDWARE RAW
Greg
On Thu, Jul 9, 2020 at 12:05 AM Brian Grayson <brian.grayson@...> wrote:
|
|