[PW_SID:1147299] RISC-V Sspesa: Linux perf precise sample attribution - #2485
[PW_SID:1147299] RISC-V Sspesa: Linux perf precise sample attribution#2485linux-riscv-bot wants to merge 4 commits into
Conversation
Document the RISC-V Performance Event Sampling extensions Sspesa (Precise Event Sample Attribution) and Ssplcofi (Precise Local Counter Overflow Interrupt) in the ISA extensions binding. Add a dependency rule requiring Sspesa to be present whenever Ssplcofi is present. Signed-off-by: Mayuresh Chitale <mayuresh.chitale@oss.qualcomm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add ISA extension detection for the RISC-V Performance Event Sampling extensions Sspesa (Precise Event Sample Attribution) and Ssplcofi (Precise Local Counter Overflow Interrupt). Ssplcofi requires Sspesa, so validate that Sspesa is present before enabling Ssplcofi. Signed-off-by: Mayuresh Chitale <mayuresh.chitale@oss.qualcomm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
When the Sspesa (Precise Event Sample Attribution) extension is available and a counter overflows, the hardware records a sample PC in shpmspc register and the counter ID and additional implementation-defined data in shpmsdata register. In the SBI PMU overflow handler, use shpmspc to report sample PC via PERF_SAMPLE_IP for the counter that caused the overflow. Shpmsdata is exported as raw data to userspace when events request PERF_SAMPLE_RAW sample type and it assists in deriving the sample PC from shpmspc if precise attribution is not supported for the event. If sspesa is not available or for counters that don't match shpmsdata.CNTRID, fallback to epc for PERF_SAMPLE_IP. Signed-off-by: Mayuresh Chitale <mayuresh.chitale@oss.qualcomm.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 1: "[RFC,1/3] dt-bindings: riscv: Add Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 2: "[RFC,2/3] riscv: Add detection for Sspesa and Ssplcofi extensions" |
|
Patch 3: "[RFC,3/3] perf/riscv: Use Sspesa for precise sample attribution" |
|
Patch 3: "[RFC,3/3] perf/riscv: Use Sspesa for precise sample attribution" |
aa59017 to
875d2a7
Compare
PR for series 1147299 applied to workflow
Name: RISC-V Sspesa: Linux perf precise sample attribution
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1147299
Version: 1