diff options
author | Jiri Olsa <jolsa@kernel.org> | 2020-05-07 12:50:23 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-05-28 16:03:25 +0300 |
commit | 0d71a2b242b36732d31323d74809f6c8b25e18da (patch) | |
tree | 771f5e9a641108671b52c9f0ae3cd9ce3fe402dc /tools/perf/util/callchain.h | |
parent | 14d3d54052539a1e833b5b615add5bc9ac3ef76a (diff) | |
download | linux-0d71a2b242b36732d31323d74809f6c8b25e18da.tar.xz |
perf callchain: Setup callchain properly in pipe mode
Callchains are automatically initialized by checking on event's
sample_type. For pipe mode we need to put this check into attr event
code.
Moving the callchains setup code into callchain_param_setup function and
calling it from attr event process code.
This enables pipe output having callchains, like:
# perf record -g -e 'raw_syscalls:sys_enter' true | perf script
# perf record -g -e 'raw_syscalls:sys_enter' true | perf report
Committer notes:
We still need the next patch for the above output to work.
Reported-by: Paul Khuong <pvk@pvk.ca>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200507095024.2789147-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r-- | tools/perf/util/callchain.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 8f668ee29f25..fe36a9e5ccd1 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -297,4 +297,5 @@ int callchain_branch_counts(struct callchain_root *root, u64 *branch_count, u64 *predicted_count, u64 *abort_count, u64 *cycles_count); +void callchain_param_setup(u64 sample_type); #endif /* __PERF_CALLCHAIN_H */ |