linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: Reset shadow counts before loading
@ 2021-11-28  8:58 Ian Rogers
  2021-11-28 16:29 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2021-11-28  8:58 UTC (permalink / raw)
  To: Andi Kleen, Jiri Olsa, Namhyung Kim, John Garry, Kajol Jain,
	Paul A . Clarke, Arnaldo Carvalho de Melo, Kan Liang,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	linux-perf-users, linux-kernel
  Cc: eranian, Ian Rogers

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/20211124015226.3317994-1-irogers@google.com/
in perf test "Parse and process metrics".

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/parse-metric.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
index 574b7e4efd3a..07b6f4ec024f 100644
--- a/tools/perf/tests/parse-metric.c
+++ b/tools/perf/tests/parse-metric.c
@@ -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);
-- 
2.34.0.rc2.393.gf8c9666880-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf test: Reset shadow counts before loading
  2021-11-28  8:58 [PATCH] perf test: Reset shadow counts before loading Ian Rogers
@ 2021-11-28 16:29 ` Jiri Olsa
  2021-11-30 14:50   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2021-11-28 16:29 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Andi Kleen, Namhyung Kim, John Garry, Kajol Jain,
	Paul A . Clarke, Arnaldo Carvalho de Melo, Kan Liang,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	linux-perf-users, linux-kernel, eranian

On Sun, Nov 28, 2021 at 12:58:10AM -0800, Ian Rogers wrote:
> 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/20211124015226.3317994-1-irogers@google.com/
> in perf test "Parse and process metrics".
> 
> Signed-off-by: Ian Rogers <irogers@google.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

jirka

> ---
>  tools/perf/tests/parse-metric.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
> index 574b7e4efd3a..07b6f4ec024f 100644
> --- a/tools/perf/tests/parse-metric.c
> +++ b/tools/perf/tests/parse-metric.c
> @@ -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);
> -- 
> 2.34.0.rc2.393.gf8c9666880-goog
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf test: Reset shadow counts before loading
  2021-11-28 16:29 ` Jiri Olsa
@ 2021-11-30 14:50   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-11-30 14:50 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ian Rogers, Andi Kleen, Namhyung Kim, John Garry, Kajol Jain,
	Paul A . Clarke, Kan Liang, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, linux-perf-users, linux-kernel,
	eranian

Em Sun, Nov 28, 2021 at 05:29:29PM +0100, Jiri Olsa escreveu:
> On Sun, Nov 28, 2021 at 12:58:10AM -0800, Ian Rogers wrote:
> > 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/20211124015226.3317994-1-irogers@google.com/
> > in perf test "Parse and process metrics".
> > 
> > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

Thanks, applied.

- Arnaldo

 
> jirka
> 
> > ---
> >  tools/perf/tests/parse-metric.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
> > index 574b7e4efd3a..07b6f4ec024f 100644
> > --- a/tools/perf/tests/parse-metric.c
> > +++ b/tools/perf/tests/parse-metric.c
> > @@ -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);
> > -- 
> > 2.34.0.rc2.393.gf8c9666880-goog
> > 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-30 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28  8:58 [PATCH] perf test: Reset shadow counts before loading Ian Rogers
2021-11-28 16:29 ` Jiri Olsa
2021-11-30 14:50   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).