mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 12:54:36 +08:00
perf evsel: Add support for synthesized sample type
For reporting purposes, an evsel sample can have a callchain synthesized from AUX area data. Add support for keeping track of synthesized sample types. Note, the recorded sample_type cannot be changed because it is needed to continue to parse events. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20200401101613.6201-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
8e94b3243a
commit
e11869a065
@ -104,6 +104,14 @@ struct evsel {
|
||||
perf_evsel__sb_cb_t *cb;
|
||||
void *data;
|
||||
} side_band;
|
||||
/*
|
||||
* For reporting purposes, an evsel sample can have a callchain
|
||||
* synthesized from AUX area data. Keep track of synthesized sample
|
||||
* types here. Note, the recorded sample_type cannot be changed because
|
||||
* it is needed to continue to parse events.
|
||||
* See also evsel__has_callchain().
|
||||
*/
|
||||
__u64 synth_sample_type;
|
||||
};
|
||||
|
||||
struct perf_missing_features {
|
||||
@ -398,7 +406,12 @@ static inline bool perf_evsel__has_branch_hw_idx(const struct evsel *evsel)
|
||||
|
||||
static inline bool evsel__has_callchain(const struct evsel *evsel)
|
||||
{
|
||||
return (evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN) != 0;
|
||||
/*
|
||||
* For reporting purposes, an evsel sample can have a recorded callchain
|
||||
* or a callchain synthesized from AUX area data.
|
||||
*/
|
||||
return evsel->core.attr.sample_type & PERF_SAMPLE_CALLCHAIN ||
|
||||
evsel->synth_sample_type & PERF_SAMPLE_CALLCHAIN;
|
||||
}
|
||||
|
||||
struct perf_env *perf_evsel__env(struct evsel *evsel);
|
||||
|
Loading…
Reference in New Issue
Block a user