Skip to contentSkip to conversation

perf mem: add priv level filtering support

PATCH In review Stephane Eranian 2 participants 2 messages Aug 28, 2013 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf mem: add priv level filtering support

This patch adds the -u -and -k options to perf to allow filtering of load/store sampling based on priv levels. This may not be supported by all HW platforms.

By default, loads/stores are sampled at both user and kernel privilege levels.

To sample only at the user level:

$ perf mem -U -t load rec ......

To sample only at the kernel level:

$ perf mem -K -t load rec ......

Man page updated accordingly.

In V2, we renamed the -u, -v options to
-U and -K respectively to be more consistent with perf top. Note that in the case of perf mem, those options request hardware-level privilege level filtering.

---

tools/perf/Documentation/perf-mem.txt +6 -0
index 888d511..4c4e405 100644
@@ -43,6 +43,12 @@ OPTIONS
 	option can be passed in record mode. It will be interpreted the same way as perf
 	record.
 
+-K::
+	Only sample loads/stores at the kernel level (default: user + kernel)
+
+-U::
+	Only sample loads/stores at the user level (default: user + kernel)
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-report[1]
tools/perf/builtin-mem.c +86 -20

170 lines not on this page · raw message

#1 lore raw

Em Wed, Aug 28, 2013 at 04:11:36PM +0200, Stephane Eranian escreveu:

tools/perf/Documentation/perf-mem.txt OPTIONS · line 51

Quoted 6 lines

+-K::

tools/perf/Documentation/perf-mem.txt +5 -0
+	Only sample loads/stores at the kernel level (default: user + kernel)
+
+-U::
+	Only sample loads/stores at the user level (default: user + kernel)
+

Mid air collision, perfect, this is even better than what I suggested before reading this message, as it adds that default clarification, thanks, applying.

- Arnaldo