mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
perf hists: Make hist_entry__has_callchains() work with 'perf c2c'
Since 'perf c2c' uses 'struct hists' not allocated together with a
'struct perf_evsel' instance, we can't go from a 'struct hist_entry'
pointer to a 'struct perf_evsel' via he->hists, so, instead, check if
space was set aside for hist_entry->callchain[0] at hist_entry__new()
time.
Reported-by: Jin Yao <[email protected]>
Reported-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Fixes: fabd37b837 ("perf hists: Check if a hist_entry has callchains before using them")
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
@@ -155,7 +155,7 @@ struct hist_entry {
|
||||
|
||||
static __pure inline bool hist_entry__has_callchains(struct hist_entry *he)
|
||||
{
|
||||
return hists__has_callchains(he->hists);
|
||||
return he->callchain_size != 0;
|
||||
}
|
||||
|
||||
static inline bool hist_entry__has_pairs(struct hist_entry *he)
|
||||
|
||||
Reference in New Issue
Block a user