Commit 6e1f601a10cbaa5cda869f844292dd81c519a8e7
Committed by
Arnaldo Carvalho de Melo
1 parent
a8bb559bd4
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
perf report: Make another loop for linking group hists
Now the event grouping viewing requires linking all member hists in a group to the leader's. Thus hists__output_resort should be called after linking all events in evlist. Introduce symbol_conf.event_group flag to determine whether the feature is enabled or not. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1358845787-1350-5-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Showing 2 changed files with 14 additions and 2 deletions Side-by-side Diff
tools/perf/builtin-report.c
... | ... | @@ -416,14 +416,25 @@ |
416 | 416 | hists->symbol_filter_str = rep->symbol_filter_str; |
417 | 417 | |
418 | 418 | hists__collapse_resort(hists); |
419 | - hists__output_resort(hists); | |
420 | 419 | nr_samples += hists->stats.nr_events[PERF_RECORD_SAMPLE]; |
420 | + | |
421 | + /* Non-group events are considered as leader */ | |
422 | + if (symbol_conf.event_group && | |
423 | + !perf_evsel__is_group_leader(pos)) { | |
424 | + struct hists *leader_hists = &pos->leader->hists; | |
425 | + | |
426 | + hists__match(leader_hists, hists); | |
427 | + hists__link(leader_hists, hists); | |
428 | + } | |
421 | 429 | } |
422 | 430 | |
423 | 431 | if (nr_samples == 0) { |
424 | 432 | ui__error("The %s file has no samples!\n", session->filename); |
425 | 433 | goto out_delete; |
426 | 434 | } |
435 | + | |
436 | + list_for_each_entry(pos, &session->evlist->entries, node) | |
437 | + hists__output_resort(&pos->hists); | |
427 | 438 | |
428 | 439 | if (use_browser > 0) { |
429 | 440 | if (use_browser == 1) { |