Skip to content

Commit

Permalink
perf stat: Fix shadow declaration of close
Browse files Browse the repository at this point in the history
Vinson reported shadow declaration of close introduced
by the following commit:

  106a94a perf stat: Introduce read_counters function

Using close_counters name instead.

Reported-by: Vinson Lee <vlee@twopensource.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 106a94a ("perf stat: Introduce read_counters function")
Link: http://lkml.kernel.org/r/20150708111731.GA3512@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jul 8, 2015
1 parent 6d545a6 commit 5fc472a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static int read_counter(struct perf_evsel *counter)
return 0;
}

static void read_counters(bool close)
static void read_counters(bool close_counters)
{
struct perf_evsel *counter;

Expand All @@ -354,7 +354,7 @@ static void read_counters(bool close)
if (process_counter(counter))
pr_warning("failed to process counter %s\n", counter->name);

if (close) {
if (close_counters) {
perf_evsel__close_fd(counter, perf_evsel__nr_cpus(counter),
thread_map__nr(evsel_list->threads));
}
Expand Down

0 comments on commit 5fc472a

Please sign in to comment.