summaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
diff options
context:
space:
mode:
authorJin Yao <yao.jin@linux.intel.com>2020-03-09 09:31:25 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-04-03 09:37:56 -0300
commit8ed1faf0156e569c46f1b3d59e74c9cbd5e557ff (patch)
tree79d3e467e03eb0df1200c203f726ef0015ecafe7 /tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
parent47327f56674d69a423f7167f8d4ea537cc1762cc (diff)
downloadlinux-8ed1faf0156e569c46f1b3d59e74c9cbd5e557ff.tar.gz
linux-8ed1faf0156e569c46f1b3d59e74c9cbd5e557ff.tar.bz2
linux-8ed1faf0156e569c46f1b3d59e74c9cbd5e557ff.zip
perf pmu-events x86: Use CPU_CLK_UNHALTED.THREAD in Kernel_Utilization metric
The kernel utilization metric does multiplexing currently and is somewhat unreliable. The problem is that it uses two instances of the fixed counter, and the kernel has to multipleplex which causes errors. So should use CPU_CLK_UNHALTED.THREAD instead. Before: # perf stat -M Kernel_Utilization -- sleep 1 Performance counter stats for 'sleep 1': 1,419,425 cpu_clk_unhalted.ref_tsc:k <not counted> cpu_clk_unhalted.ref_tsc (0.00%) After: # perf stat -M Kernel_Utilization -- sleep 1 Performance counter stats for 'sleep 1': 746,688 cpu_clk_unhalted.thread:k # 0.7 Kernel_Utilization 1,088,348 cpu_clk_unhalted.thread Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Reviewed-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jin Yao <yao.jin@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20200309013125.7559-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json')
-rw-r--r--tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json b/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
index 746734ce09be..1eb0415fa11a 100644
--- a/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
+++ b/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json
@@ -297,7 +297,7 @@
},
{
"BriefDescription": "Fraction of cycles spent in Kernel mode",
- "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:k / CPU_CLK_UNHALTED.REF_TSC",
+ "MetricExpr": "CPU_CLK_UNHALTED.THREAD:k / CPU_CLK_UNHALTED.THREAD",
"MetricGroup": "Summary",
"MetricName": "Kernel_Utilization"
},