aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2018-10-10 04:03:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-10-11 10:13:23 -0400
commit94aafb74cee0002e2f2eb6dc5376f54d5951ab4d (patch)
tree67a52faf0c5cdbdb88fc3a3b6089ee2c3a3ceaa1 /tools
parent1b9caa10b31dda0866f4028e4bfb923fb6e4072f (diff)
perf vendor events intel: Fix wrong filter_band* values for uncore events
Michael reported that he could not stat following event: $ perf stat -e unc_p_freq_ge_1200mhz_cycles -a -- ls event syntax error: '..e_1200mhz_cycles' \___ value too big for format, maximum is 255 Run 'perf list' for a list of valid events The event is unwrapped into: uncore_pcu/event=0xb,filter_band0=1200/ where filter_band0 format says it's one byte only: # cat uncore_pcu/format/filter_band0 config1:0-7 while JSON files specifies bigger number: "Filter": "filter_band0=1200", all the filter_band* formats show 1 byte width: # cat uncore_pcu/format/filter_band1 config1:8-15 # cat uncore_pcu/format/filter_band2 config1:16-23 # cat uncore_pcu/format/filter_band3 config1:24-31 The reason of the issue is that filter_band* values are supposed to be in 100Mhz units.. it's stated in the JSON help for the events, like: filter_band3=XXX, with XXX in 100Mhz units This patch divides the filter_band* values by 100, plus there's couple of changes that actually change the number completely, like: - "Filter": "edge=1,filter_band2=4000", + "Filter": "edge=1,filter_band2=30", Reported-by: Michael Petlan <mpetlan@redhat.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20181010080339.GB15790@krava Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json16
-rw-r--r--tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json16
2 files changed, 16 insertions, 16 deletions
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
index d40498f2cb1e..635c09fda1d9 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
@@ -188,7 +188,7 @@
188 "Counter": "0,1,2,3", 188 "Counter": "0,1,2,3",
189 "EventCode": "0xb", 189 "EventCode": "0xb",
190 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES", 190 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES",
191 "Filter": "filter_band0=1200", 191 "Filter": "filter_band0=12",
192 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 192 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
193 "MetricName": "freq_ge_1200mhz_cycles %", 193 "MetricName": "freq_ge_1200mhz_cycles %",
194 "PerPkg": "1", 194 "PerPkg": "1",
@@ -199,7 +199,7 @@
199 "Counter": "0,1,2,3", 199 "Counter": "0,1,2,3",
200 "EventCode": "0xc", 200 "EventCode": "0xc",
201 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES", 201 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES",
202 "Filter": "filter_band1=2000", 202 "Filter": "filter_band1=20",
203 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 203 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
204 "MetricName": "freq_ge_2000mhz_cycles %", 204 "MetricName": "freq_ge_2000mhz_cycles %",
205 "PerPkg": "1", 205 "PerPkg": "1",
@@ -210,7 +210,7 @@
210 "Counter": "0,1,2,3", 210 "Counter": "0,1,2,3",
211 "EventCode": "0xd", 211 "EventCode": "0xd",
212 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES", 212 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES",
213 "Filter": "filter_band2=3000", 213 "Filter": "filter_band2=30",
214 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 214 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
215 "MetricName": "freq_ge_3000mhz_cycles %", 215 "MetricName": "freq_ge_3000mhz_cycles %",
216 "PerPkg": "1", 216 "PerPkg": "1",
@@ -221,7 +221,7 @@
221 "Counter": "0,1,2,3", 221 "Counter": "0,1,2,3",
222 "EventCode": "0xe", 222 "EventCode": "0xe",
223 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES", 223 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES",
224 "Filter": "filter_band3=4000", 224 "Filter": "filter_band3=40",
225 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 225 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
226 "MetricName": "freq_ge_4000mhz_cycles %", 226 "MetricName": "freq_ge_4000mhz_cycles %",
227 "PerPkg": "1", 227 "PerPkg": "1",
@@ -232,7 +232,7 @@
232 "Counter": "0,1,2,3", 232 "Counter": "0,1,2,3",
233 "EventCode": "0xb", 233 "EventCode": "0xb",
234 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS", 234 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS",
235 "Filter": "edge=1,filter_band0=1200", 235 "Filter": "edge=1,filter_band0=12",
236 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 236 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
237 "MetricName": "freq_ge_1200mhz_cycles %", 237 "MetricName": "freq_ge_1200mhz_cycles %",
238 "PerPkg": "1", 238 "PerPkg": "1",
@@ -243,7 +243,7 @@
243 "Counter": "0,1,2,3", 243 "Counter": "0,1,2,3",
244 "EventCode": "0xc", 244 "EventCode": "0xc",
245 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS", 245 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS",
246 "Filter": "edge=1,filter_band1=2000", 246 "Filter": "edge=1,filter_band1=20",
247 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 247 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
248 "MetricName": "freq_ge_2000mhz_cycles %", 248 "MetricName": "freq_ge_2000mhz_cycles %",
249 "PerPkg": "1", 249 "PerPkg": "1",
@@ -254,7 +254,7 @@
254 "Counter": "0,1,2,3", 254 "Counter": "0,1,2,3",
255 "EventCode": "0xd", 255 "EventCode": "0xd",
256 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS", 256 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS",
257 "Filter": "edge=1,filter_band2=4000", 257 "Filter": "edge=1,filter_band2=30",
258 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 258 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
259 "MetricName": "freq_ge_3000mhz_cycles %", 259 "MetricName": "freq_ge_3000mhz_cycles %",
260 "PerPkg": "1", 260 "PerPkg": "1",
@@ -265,7 +265,7 @@
265 "Counter": "0,1,2,3", 265 "Counter": "0,1,2,3",
266 "EventCode": "0xe", 266 "EventCode": "0xe",
267 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS", 267 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS",
268 "Filter": "edge=1,filter_band3=4000", 268 "Filter": "edge=1,filter_band3=40",
269 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 269 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
270 "MetricName": "freq_ge_4000mhz_cycles %", 270 "MetricName": "freq_ge_4000mhz_cycles %",
271 "PerPkg": "1", 271 "PerPkg": "1",
diff --git a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
index 16034bfd06dd..8755693d86c6 100644
--- a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
+++ b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
@@ -187,7 +187,7 @@
187 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
188 "EventCode": "0xb", 188 "EventCode": "0xb",
189 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES", 189 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES",
190 "Filter": "filter_band0=1200", 190 "Filter": "filter_band0=12",
191 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 191 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
192 "MetricName": "freq_ge_1200mhz_cycles %", 192 "MetricName": "freq_ge_1200mhz_cycles %",
193 "PerPkg": "1", 193 "PerPkg": "1",
@@ -198,7 +198,7 @@
198 "Counter": "0,1,2,3", 198 "Counter": "0,1,2,3",
199 "EventCode": "0xc", 199 "EventCode": "0xc",
200 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES", 200 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES",
201 "Filter": "filter_band1=2000", 201 "Filter": "filter_band1=20",
202 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 202 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
203 "MetricName": "freq_ge_2000mhz_cycles %", 203 "MetricName": "freq_ge_2000mhz_cycles %",
204 "PerPkg": "1", 204 "PerPkg": "1",
@@ -209,7 +209,7 @@
209 "Counter": "0,1,2,3", 209 "Counter": "0,1,2,3",
210 "EventCode": "0xd", 210 "EventCode": "0xd",
211 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES", 211 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES",
212 "Filter": "filter_band2=3000", 212 "Filter": "filter_band2=30",
213 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 213 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
214 "MetricName": "freq_ge_3000mhz_cycles %", 214 "MetricName": "freq_ge_3000mhz_cycles %",
215 "PerPkg": "1", 215 "PerPkg": "1",
@@ -220,7 +220,7 @@
220 "Counter": "0,1,2,3", 220 "Counter": "0,1,2,3",
221 "EventCode": "0xe", 221 "EventCode": "0xe",
222 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES", 222 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES",
223 "Filter": "filter_band3=4000", 223 "Filter": "filter_band3=40",
224 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 224 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
225 "MetricName": "freq_ge_4000mhz_cycles %", 225 "MetricName": "freq_ge_4000mhz_cycles %",
226 "PerPkg": "1", 226 "PerPkg": "1",
@@ -231,7 +231,7 @@
231 "Counter": "0,1,2,3", 231 "Counter": "0,1,2,3",
232 "EventCode": "0xb", 232 "EventCode": "0xb",
233 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS", 233 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS",
234 "Filter": "edge=1,filter_band0=1200", 234 "Filter": "edge=1,filter_band0=12",
235 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 235 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
236 "MetricName": "freq_ge_1200mhz_cycles %", 236 "MetricName": "freq_ge_1200mhz_cycles %",
237 "PerPkg": "1", 237 "PerPkg": "1",
@@ -242,7 +242,7 @@
242 "Counter": "0,1,2,3", 242 "Counter": "0,1,2,3",
243 "EventCode": "0xc", 243 "EventCode": "0xc",
244 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS", 244 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS",
245 "Filter": "edge=1,filter_band1=2000", 245 "Filter": "edge=1,filter_band1=20",
246 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 246 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
247 "MetricName": "freq_ge_2000mhz_cycles %", 247 "MetricName": "freq_ge_2000mhz_cycles %",
248 "PerPkg": "1", 248 "PerPkg": "1",
@@ -253,7 +253,7 @@
253 "Counter": "0,1,2,3", 253 "Counter": "0,1,2,3",
254 "EventCode": "0xd", 254 "EventCode": "0xd",
255 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS", 255 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS",
256 "Filter": "edge=1,filter_band2=4000", 256 "Filter": "edge=1,filter_band2=30",
257 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 257 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
258 "MetricName": "freq_ge_3000mhz_cycles %", 258 "MetricName": "freq_ge_3000mhz_cycles %",
259 "PerPkg": "1", 259 "PerPkg": "1",
@@ -264,7 +264,7 @@
264 "Counter": "0,1,2,3", 264 "Counter": "0,1,2,3",
265 "EventCode": "0xe", 265 "EventCode": "0xe",
266 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS", 266 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS",
267 "Filter": "edge=1,filter_band3=4000", 267 "Filter": "edge=1,filter_band3=40",
268 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 268 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
269 "MetricName": "freq_ge_4000mhz_cycles %", 269 "MetricName": "freq_ge_4000mhz_cycles %",
270 "PerPkg": "1", 270 "PerPkg": "1",