Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69fef0d2 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

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: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
parent ca037701
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -656,6 +656,10 @@ parse_raw_event(const char **strp, struct perf_event_attr *attr)
		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;