summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDapeng Mi <dapeng1.mi@linux.intel.com>2026-07-17 16:03:41 +0800
committerPeter Zijlstra <peterz@infradead.org>2026-08-10 15:05:48 +0200
commit917d558b151cad5b05991e5eaee22efab33525ca (patch)
tree966ee44626fb49582a8cb251ca5b9cf1d6a277fd /tools/perf/scripts/python
parentdd384d661f06e3725aad3a932a53e0ff81fb8805 (diff)
perf/x86: Optimize ACR handling in match_prev_assignment()
match_prev_assignment() currently forces a mismatch for ACR events, so ACR counter indices are reprogrammed on every scheduling pass. That causes avoidable overhead because disable and enable paths must touch multiple MSRs. The previous ACR assignment is already cached in acr_cfg_b[]. Use that state to compare the newly computed ACR counter indices in hwc->config1 against the cached value in acr_cfg_b[hwc->idx]. If they match, skip unnecessary disable and enable work. Also tighten is_acr_self_reload_event() so it first verifies the event is an ACR event before testing for the self-reload case. Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Thomas Falcon <thomas.falcon@intel.com> Reviewed-by: Zide Chen <zide.chen@intel.com> Link: https://patch.msgid.link/20260717080342.1879573-8-dapeng1.mi@linux.intel.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions