Skip to content

Commit

Permalink
perf report: Use perf_evlist__force_leader to support '--group'
Browse files Browse the repository at this point in the history
Since we created a new function perf_evlist__force_leader(), remove the
old code and use that new evlist method.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1526914666-31839-3-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jin Yao authored and Arnaldo Carvalho de Melo committed May 21, 2018
1 parent e2bdbe8 commit a26bb0b
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,11 @@ static int hist_iter__branch_callback(struct hist_entry_iter *iter,
return err;
}

/*
* Events in data file are not collect in groups, but we still want
* the group display. Set the artificial group and set the leader's
* forced_leader flag to notify the display code.
*/
static void setup_forced_leader(struct report *report,
struct perf_evlist *evlist)
{
if (report->group_set && !evlist->nr_groups) {
struct perf_evsel *leader = perf_evlist__first(evlist);

perf_evlist__set_leader(evlist);
leader->forced_leader = true;
}
if (report->group_set)
perf_evlist__force_leader(evlist);
}

static int process_feature_event(struct perf_tool *tool,
Expand Down

0 comments on commit a26bb0b

Please sign in to comment.