• Arnaldo Carvalho de Melo's avatar
    perf stat: Fix aggreate counter reading accounting · 52bcd994
    Arnaldo Carvalho de Melo authored
    Introduced in: c52b12ed, when this sequence:
    
      count[0] = count[1] = count[2] = 0;
    
    Was replaced with:
    
      aggr->val = 0;
    
    Which is equivalent to zeroing just the first entry in the 'count'
    array.
    
    Fix it by zeroing the three entries with:
    
      aggr->val = aggr->ena = aggr->run = 0;
    Reported-by: default avatarIngo Molnar <mingo@elte.hu>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    LKML-Reference: <new-submission>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    52bcd994
evsel.c 4.33 KB