Skip to content

Commit

Permalink
perf stat: Using init_stats instead of memset
Browse files Browse the repository at this point in the history
The init_stats function is meant to init 'struct stats'.

Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1435310967-14570-21-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jun 26, 2015
1 parent ba411a9 commit 5835e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static int process_counter(struct perf_evsel *counter)
int i, ret;

aggr->val = aggr->ena = aggr->run = 0;
memset(ps->res_stats, 0, sizeof(ps->res_stats));
init_stats(ps->res_stats);

if (counter->per_pkg)
zero_per_pkg(counter);
Expand Down

0 comments on commit 5835e22

Please sign in to comment.