From: Jiri Olsa <jolsa@redhat.com>
To: Jin Yao <yao.jin@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, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH] perf stat: Fix uncore event mixed metric with workload error issue
Date: Tue, 28 Apr 2020 12:51:55 +0200 [thread overview]
Message-ID: <20200428105155.GG1476763@krava> (raw)
In-Reply-To: <20200427144116.27330-1-yao.jin@linux.intel.com>
On Mon, Apr 27, 2020 at 10:41:16PM +0800, Jin Yao wrote:
SNIP
> index 9207b6c45475..b01ee06b1965 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -1841,8 +1841,8 @@ static void setup_system_wide(int forks)
> * conditions is met:
> *
> * - there's no workload specified
> - * - there is workload specified but all requested
> - * events are system wide events
> + * - there is workload specified but at least one requested
> + * event is system wide event
> */
> if (!target__none(&target))
> return;
> @@ -1851,13 +1851,16 @@ static void setup_system_wide(int forks)
> target.system_wide = true;
> else {
> struct evsel *counter;
> + bool system_wide = false;
>
> evlist__for_each_entry(evsel_list, counter) {
> - if (!counter->core.system_wide)
> - return;
> + if (counter->core.system_wide) {
> + system_wide = true;
> + break;
> + }
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?
jirka
> }
>
> - if (evsel_list->core.nr_entries)
> + if (evsel_list->core.nr_entries && system_wide)
> target.system_wide = true;
> }
> }
> --
> 2.17.1
>
next prev parent reply other threads:[~2020-04-28 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 14:41 [PATCH] perf stat: Fix uncore event mixed metric with workload error issue Jin Yao
2020-04-28 10:51 ` Jiri Olsa [this message]
2020-04-28 21:19 ` Andi Kleen
2020-04-29 8:16 ` Jiri Olsa
2020-04-29 11:50 ` Jin, Yao
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=20200428105155.GG1476763@krava \
--to=jolsa@redhat.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=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.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