perf test: Reset shadow counts before loading
Ian Rogers
reviewerPATCH 1/1 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".
--- tools/perf/tests/parse-metric.c | 1 + 1 file changed, 1 insertion(+)
tools/perf/tests/parse-metric.c +1 -0
@@ -109,6 +109,7 @@ static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist,struct evsel *evsel;u64 count; +perf_stat__reset_shadow_stats ();evlist__for_each_entry (evlist, evsel) { count =find_value (evsel->name, vals);perf_stat__update_shadow_stats (evsel, count,0 , st);
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
Quoted 9 lines · Ian Rogers
Otherwise load counting is an average. Without this change
duration_timeintest_memory_bandwidthwill alter its value if an earlier test containsduration_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]>
jirka
Quoted 19 lines
--- tools/perf/tests/parse-metric.c | 1 + 1 file changed, 1 insertion(+)tools/perf/tests/parse-metric.c +1
-0@@ -109,6 +109,7 @@ static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist,struct evsel *evsel;u64 count; +perf_stat__reset_shadow_stats ();evlist__for_each_entry (evlist, evsel) { count =find_value (evsel->name, vals);perf_stat__update_shadow_stats (evsel, count,0 , st);Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
Em Sun, Nov 28, 2021 at 05:29:29PM +0100, Jiri Olsa escreveu:
Quoted 5 lines · Ian Rogers
Quoted 4 lines
Otherwise load counting is an average. Without this change
duration_timeintest_memory_bandwidthwill alter its value if an earlier test containsduration_time.
Quoted 7 lines
Quoted 5 lines
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]>
Thanks, applied.
- Arnaldo
Quoted 21 lines
jirka
Quoted 19 lines
--- tools/perf/tests/parse-metric.c | 1 + 1 file changed, 1 insertion(+)tools/perf/tests/parse-metric.c +1
-0@@ -109,6 +109,7 @@ static void load_runtime_stat(struct runtime_stat *st, struct evlist *evlist,struct evsel *evsel;u64 count; +perf_stat__reset_shadow_stats ();evlist__for_each_entry (evlist, evsel) { count =find_value (evsel->name, vals);perf_stat__update_shadow_stats (evsel, count,0 , st);Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog
Signature · 1 line
- Arnaldo