aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2021-08-10 21:46:57 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-09-17 08:44:19 -0300
commit84111b9c950ec9a8b31166973e79aa77ddcee7e3 (patch)
tree2032cb2379b409e67d8ba5020ea21e9d9b3efa3e /tools/perf/builtin-record.c
parentperf parse-events: Avoid enum forward declaration. (diff)
downloadlinux-dev-84111b9c950ec9a8b31166973e79aa77ddcee7e3.tar.xz
linux-dev-84111b9c950ec9a8b31166973e79aa77ddcee7e3.zip
perf tools: Allow controlling synthesizing PERF_RECORD_ metadata events during record
Depending on the use case, it might require some kind of synthesizing and some not. Make it controllable to turn off heavy operations like MMAP for all tasks. Currently all users are converted to enable all the synthesis by default. It'll be updated in the later patch. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https //lore.kernel.org/r/20210811044658.1313391-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b3509d9d20cc..0263e383332f 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1266,6 +1266,7 @@ static int record__synthesize_workload(struct record *rec, bool tail)
err = perf_event__synthesize_thread_map(&rec->tool, thread_map,
process_synthesized_event,
&rec->session->machines.host,
+ true,
rec->opts.sample_address);
perf_thread_map__put(thread_map);
return err;
@@ -1480,8 +1481,9 @@ static int record__synthesize(struct record *rec, bool tail)
f = process_locked_synthesized_event;
}
- err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->core.threads,
- f, opts->sample_address,
+ err = __machine__synthesize_threads(machine, tool, &opts->target,
+ rec->evlist->core.threads,
+ f, true, opts->sample_address,
rec->opts.nr_threads_synthesize);
if (rec->opts.nr_threads_synthesize > 1)