perf: Relax privilege restriction on AMD IBS (v2)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | perf/core: Add PERF_FORMAT_DROPPEDinclude/ include/ kernel/ | +17 | 0 replies | |
| 2/4 | perf/core: Export perf_exclude_event()include/ kernel/ | +9 | 0 replies | |
| 3/4 | perf/core: Account dropped samples from BPFkernel/ | +3 | 0 replies | |
| 4/4 | perf/x86: Relax privilege filter restriction on AMD IBSarch/ | +11 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC/PATCH 0/4] perf: Relax privilege restriction on AMD IBS (v2)
Hello,
This is RFC v2 to allow AMD IBS to regular users on the default settings where kernel-level profiling is disabled. Currently AMD IBS doesn't allow any kind of exclusion in the event attribute. But users needs to set attr.exclude_kernel to open an event on such an environment.
v2) changes
* add PERF_FORMAT_DROPPED
* account dropped sw events and from BPF handler
* use precise RIP from IBS record
v1) https://lore.kernel.org/lkml/[email protected]/
While IBS doesn't support hardware level privilege filters, the kernel can allow the event and drop samples belongs to the kernel like in the software events.
In order to count those dropped samples correctly, I'd propose a new read format PERF_FORMAT_DROPPED same as we did for the lost samples. With this, it can count dropped samples in the software events and from the BPF overflow handler as well.
Let me know what you think.
Thanks,
Namhyung
Namhyung Kim (4):
perf/core: Add PERF_FORMAT_DROPPED
perf/core: Export perf_exclude_event() perf/core: Account dropped samples from BPF perf/x86: Relax privilege filter restriction on AMD IBS
arch/x86/events/amd/ibs.c | 13 +++++++++++-- include/linux/perf_event.h | 3 +++ include/uapi/linux/perf_event.h | 5 ++++- kernel/events/core.c | 27 ++++++++++++++++++++++----- 4 files changed, 40 insertions(+), 8 deletions(-)
Signature · 1 line
2.46.0.469.g59c65b2a67-goog