perf stat: Move the shadow stats scale computation in perf_stat__update_shadow_stats
Move the shadow stats scale computation to the perf_stat__update_shadow_stats() function, so it's centralized and we don't forget to do it. It also saves few lines of code. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Changbin Du <changbin.du@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-htg7mmyxv6pcrf57qyo6msid@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
e268687bfb
commit
54830dd0c3
@@ -1267,8 +1267,7 @@ static void aggr_update_shadow(void)
|
||||
continue;
|
||||
val += perf_counts(counter->counts, cpu, 0)->val;
|
||||
}
|
||||
val = val * counter->scale;
|
||||
perf_stat__update_shadow_stats(counter, &val,
|
||||
perf_stat__update_shadow_stats(counter, val,
|
||||
first_shadow_cpu(counter, id));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user