Messages in this thread Patch in this message | | | Date | Thu, 04 Mar 2010 15:00:53 +0100 | From | Peter Zijlstra <> | Subject | [PATCH 07/14] 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> LKML-Reference: <new-submission> --- tools/perf/util/parse-events.c | 5 +++++ 1 file changed, 5 insertions(+)
Index: linux-2.6/tools/perf/util/parse-events.c =================================================================== --- linux-2.6.orig/tools/perf/util/parse-events.c +++ linux-2.6/tools/perf/util/parse-events.c @@ -656,6 +656,10 @@ parse_raw_event(const char **strp, struc return EVT_FAILED; n = hex2u64(str + 1, &config); if (n > 0) { + if (str[n+1] == 'p') { + attr->precise = 1; + n++; + } *strp = str + n + 1; attr->type = PERF_TYPE_RAW; attr->config = config; --
| |