[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-d3f4b3855ba87caff8f35e738c7e7e3bad0a6ab1@git.kernel.org>
Date: Mon, 25 May 2009 12:45:35 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, jkacur@...hat.com,
a.p.zijlstra@...llo.nl, efault@....de, tglx@...utronix.de,
cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perfcounters/core] perf stat: flip around ':k' and ':u' flags
Commit-ID: d3f4b3855ba87caff8f35e738c7e7e3bad0a6ab1
Gitweb: http://git.kernel.org/tip/d3f4b3855ba87caff8f35e738c7e7e3bad0a6ab1
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Mon, 25 May 2009 14:40:01 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 25 May 2009 14:40:01 +0200
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@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: John Kacur <jkacur@...hat.com>
Cc: Mike Galbraith <efault@....de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
Documentation/perf_counter/builtin-stat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index 8ae01d5..88c70be 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)
switch (sscanf(str, "%d:%llu:%2s", &type, &id, mask_str)) {
case 3:
- if (strchr(mask_str, 'u'))
- event_mask[nr_counters] |= EVENT_MASK_USER;
if (strchr(mask_str, 'k'))
+ event_mask[nr_counters] |= EVENT_MASK_USER;
+ if (strchr(mask_str, 'u'))
event_mask[nr_counters] |= EVENT_MASK_KERNEL;
case 2:
return EID(type, id);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists