Skip to content

Commit 5835e22

Browse files
olsajiriacmel
authored andcommitted
perf stat: Using init_stats instead of memset
The init_stats function is meant to init 'struct stats'. Reported-by: David Ahern <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent ba411a9 commit 5835e22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-stat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int process_counter(struct perf_evsel *counter)
284284
int i, ret;
285285

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

289289
if (counter->per_pkg)
290290
zero_per_pkg(counter);

0 commit comments

Comments
 (0)