perf auxtrace: Add itrace option '-M' for memory events
authorLeo Yan <leo.yan@linaro.org>
Fri, 6 Nov 2020 09:48:50 +0000 (17:48 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 11 Nov 2020 15:24:51 +0000 (12:24 -0300)
This patch is to add itrace option '-M' to synthesize memory event.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20201106094853.21082-7-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/itrace.txt
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h

index d3740c8..079cdfa 100644 (file)
@@ -11,6 +11,7 @@
                d       create a debug log
                f       synthesize first level cache events
                m       synthesize last level cache events
+               M       synthesize memory events
                t       synthesize TLB events
                a       synthesize remote access events
                g       synthesize a call chain (use with i or x)
index 42a85c8..62e7f6c 100644 (file)
@@ -1333,6 +1333,7 @@ void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts,
        synth_opts->flc = true;
        synth_opts->llc = true;
        synth_opts->tlb = true;
+       synth_opts->mem = true;
        synth_opts->remote_access = true;
 
        if (no_sample) {
@@ -1554,6 +1555,9 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str,
                case 'a':
                        synth_opts->remote_access = true;
                        break;
+               case 'M':
+                       synth_opts->mem = true;
+                       break;
                case 'q':
                        synth_opts->quick += 1;
                        break;
index 951d2d1..7e5c9e1 100644 (file)
@@ -88,6 +88,7 @@ enum itrace_period_type {
  * @llc: whether to synthesize last level cache events
  * @tlb: whether to synthesize TLB events
  * @remote_access: whether to synthesize remote access events
+ * @mem: whether to synthesize memory events
  * @callchain_sz: maximum callchain size
  * @last_branch_sz: branch context size
  * @period: 'instructions' events period
@@ -126,6 +127,7 @@ struct itrace_synth_opts {
        bool                    llc;
        bool                    tlb;
        bool                    remote_access;
+       bool                    mem;
        unsigned int            callchain_sz;
        unsigned int            last_branch_sz;
        unsigned long long      period;