Skip to content

Commit 1aa79e5

Browse files
captain5050acmel
authored andcommitted
perf test: Reset shadow counts before loading
Otherwise load counting is an average. Without this change duration_time in test_memory_bandwidth will alter its value if an earlier test contains duration_time. This patch fixes an issue that's introduced in the proposed patch: https://lore.kernel.org/lkml/[email protected]/ in perf test "Parse and process metrics". Signed-off-by: Ian Rogers <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: John Garry <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 6c48103 commit 1aa79e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/tests/parse-metric.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist,
109109
struct evsel *evsel;
110110
u64 count;
111111

112+
perf_stat__reset_shadow_stats();
112113
evlist__for_each_entry(evlist, evsel) {
113114
count = find_value(evsel->name, vals);
114115
perf_stat__update_shadow_stats(evsel, count, 0, st);

0 commit comments

Comments
 (0)