aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-05-25 08:40:01 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-25 08:40:01 -0400
commitd3f4b3855ba87caff8f35e738c7e7e3bad0a6ab1 (patch)
tree380e741efec735090f320ed2d749907953d9cb84
parente4cbb4e3ac8b09fdb11e39e5a5611bfab0a7cd1a (diff)
perf stat: flip around ':k' and ':u' flags
This output: $ perf stat -e 0:1:k -e 0:1:u ./hello Performance counter stats for './hello': 140131 instructions (events) 1906968 instructions (events) Is quite confusing - as :k means "user instructions", :u means "kernel instructions". Flip them around - as the 'exclude' property is not intuitive in the flag naming. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/perf_counter/builtin-stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index 8ae01d51f291..88c70be99031 100644
--- a/Documentation/perf_counter/builtin-stat.c
+++ b/Documentation/perf_counter/builtin-stat.c
@@ -266,9 +266,9 @@ static __u64 match_event_symbols(char *str)
266 266
267 switch (sscanf(str, "%d:%llu:%2s", &type, &id, mask_str)) { 267 switch (sscanf(str, "%d:%llu:%2s", &type, &id, mask_str)) {
268 case 3: 268 case 3:
269 if (strchr(mask_str, 'u'))
270 event_mask[nr_counters] |= EVENT_MASK_USER;
271 if (strchr(mask_str, 'k')) 269 if (strchr(mask_str, 'k'))
270 event_mask[nr_counters] |= EVENT_MASK_USER;
271 if (strchr(mask_str, 'u'))
272 event_mask[nr_counters] |= EVENT_MASK_KERNEL; 272 event_mask[nr_counters] |= EVENT_MASK_KERNEL;
273 case 2: 273 case 2:
274 return EID(type, id); 274 return EID(type, id);