mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>, Andi Kleen <ak@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, kan.liang@intel.com,
	yao.jin@intel.com
Subject: Re: [PATCH] perf stat: Fix uncore event mixed metric with workload error issue
Date: Wed, 29 Apr 2020 19:50:48 +0800	[thread overview]
Message-ID: <a73d121d-d457-fc17-032f-b1b572cad858@linux.intel.com> (raw)
In-Reply-To: <20200429081639.GJ1476763@krava>

Hi Jiri,

On 4/29/2020 4:16 PM, Jiri Olsa wrote:
> On Tue, Apr 28, 2020 at 02:19:22PM -0700, Andi Kleen wrote:
>>> I wonder this would break some expectations.. would it be
>>> more safe to detect duration event and bypass it from the
>>> decission? but maybe the case I'm worried about is not a
>>> problem at all.. Andi?
>>
>> Don't see what it would break.
>>
>> Yes maybe we need to special case duration_time more, but that would
>> be a much bigger patch.
> 
> would below change work for you? if duration_time is the only
> case, I'd rather go with the special case for it
> 
> jirka
> 
> 

Just tested, for the case of DRAM_BW_Use, it can work.

root@lkp-csl-2sp5 ~# perf stat -M DRAM_BW_Use -- sleep 1

  Performance counter stats for 'system wide':

               9.54 MiB  uncore_imc/cas_count_read/
               3.26 MiB  uncore_imc/cas_count_write/
         1002109793 ns   duration_time

        1.002109793 seconds time elapsed

Thanks
Jin Yao

> ---
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 9207b6c45475..2518204cffd1 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1853,6 +1853,8 @@ static void setup_system_wide(int forks)
>   		struct evsel *counter;
>   
>   		evlist__for_each_entry(evsel_list, counter) {
> +			if (counter->tool_event == PERF_TOOL_DURATION_TIME)
> +				continue;
>   			if (!counter->core.system_wide)
>   				return;
>   		}
> 

      reply	other threads:[~2020-04-29 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 14:41 Jin Yao
2020-04-28 10:51 ` Jiri Olsa
2020-04-28 21:19   ` Andi Kleen
2020-04-29  8:16     ` Jiri Olsa
2020-04-29 11:50       ` Jin, Yao [this message]

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=a73d121d-d457-fc17-032f-b1b572cad858@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®