diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2025-03-27 22:52:13 +0300 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-04-08 21:55:48 +0300 |
| commit | 4dfe3232cc04325a09e96f6c7f9546ba6c0b132b (patch) | |
| tree | 04cc85bdf898a6963a1df1dc6484c4a867a3a302 /include/linux | |
| parent | da916e96e2dedcb2d40de77a7def833d315b81a6 (diff) | |
| download | linux-4dfe3232cc04325a09e96f6c7f9546ba6c0b132b.tar.xz | |
perf/x86: Add dynamic constraint
More and more features require a dynamic event constraint, e.g., branch
counter logging, auto counter reload, Arch PEBS, etc.
Add a generic flag, PMU_FL_DYN_CONSTRAINT, to indicate the case. It
avoids keeping adding the individual flag in intel_cpuc_prepare().
Add a variable dyn_constraint in the struct hw_perf_event to track the
dynamic constraint of the event. Apply it if it's updated.
Apply the generic dynamic constraint for branch counter logging.
Many features on and after V6 require dynamic constraint. So
unconditionally set the flag for V6+.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Link: https://lkml.kernel.org/r/20250327195217.2683619-2-kan.liang@linux.intel.com
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/perf_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7f49a58b271d..54dad174ed7a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -158,6 +158,7 @@ struct hw_perf_event { struct { /* hardware */ u64 config; u64 last_tag; + u64 dyn_constraint; unsigned long config_base; unsigned long event_base; int event_base_rdpmc; |
