All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	John Garry <john.garry@huawei.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	"Paul A . Clarke" <pc@us.ibm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	eranian@google.com
Subject: Re: [PATCH] perf test: Reset shadow counts before loading
Date: Sun, 28 Nov 2021 17:29:29 +0100	[thread overview]
Message-ID: <YaOuadwZWje6HeTg@krava> (raw)
In-Reply-To: <20211128085810.4027314-1-irogers@google.com>

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
> 


  reply	other threads:[~2021-11-28 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28  8:58 [PATCH] perf test: Reset shadow counts before loading Ian Rogers
2021-11-28 16:29 ` Jiri Olsa [this message]
2021-11-30 14:50   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YaOuadwZWje6HeTg@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=john.garry@huawei.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pc@us.ibm.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.