summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorPeter Newman <peternewman@google.com>2022-12-20 19:41:32 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-03-16 01:44:15 +0300
commit322b72e0fd10101f2da8985b31b4af70f184bf79 (patch)
tree5ae8dcbf8f5e5d96b951eb7d207a0f4f256c3123 /tools/perf/scripts/python/export-to-sqlite.py
parenteeac8ede17557680855031c6f305ece2378af326 (diff)
downloadlinux-322b72e0fd10101f2da8985b31b4af70f184bf79.tar.xz
x86/resctrl: Avoid redundant counter read in __mon_event_count()
__mon_event_count() does the per-RMID, per-domain work for user-initiated event count reads and the initialization of new monitor groups. In the initialization case, after resctrl_arch_reset_rmid() calls __rmid_read() to record an initial count for a new monitor group, it immediately calls resctrl_arch_rmid_read(). This re-read of the hardware counter is unnecessary and the following computations are ignored by the caller during initialization. Following return from resctrl_arch_reset_rmid(), just clear the mbm_state and return. This involves moving the mbm_state lookup into the rr->first case, as it's not needed for regular event count reads: the QOS_L3_OCCUP_EVENT_ID case was redundant with the accumulating logic at the end of the function. Signed-off-by: Peter Newman <peternewman@google.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Babu Moger <babu.moger@amd.com> Link: https://lore.kernel.org/all/20221220164132.443083-2-peternewman%40google.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions