aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-03-04 07:57:24 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-10 07:23:32 -0500
commit69fef0d2e2c2c049ef4207a52e78b50d527bd85a (patch)
tree714bf4c86501221dc5744ae8f0c08d3ec6143630 /tools/perf/util/parse-events.c
parentca037701a025334e724e5c61b3b1082940c8b981 (diff)
perf: Add attr->precise support to raw event parsing
Minimal userspace interface to the new 'precise' events flag. Can be used like "perf top -e r00c0p" which will use PEBS to sample retired instructions. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: paulus@samba.org Cc: eranian@google.com Cc: robert.richter@amd.com Cc: fweisbec@gmail.com LKML-Reference: <20100304140100.468665803@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 05d0c5c2030c..a2014459125a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -656,6 +656,10 @@ parse_raw_event(const char **strp, struct perf_event_attr *attr)
656 return EVT_FAILED; 656 return EVT_FAILED;
657 n = hex2u64(str + 1, &config); 657 n = hex2u64(str + 1, &config);
658 if (n > 0) { 658 if (n > 0) {
659 if (str[n+1] == 'p') {
660 attr->precise = 1;
661 n++;
662 }
659 *strp = str + n + 1; 663 *strp = str + n + 1;
660 attr->type = PERF_TYPE_RAW; 664 attr->type = PERF_TYPE_RAW;
661 attr->config = config; 665 attr->config = config;