From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.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: Support metrics with perf stat --per-thread
Date: Thu, 12 Oct 2017 20:13:02 +0800 [thread overview]
Message-ID: <002d04ce-72a5-4a8f-30c2-ec1bcfd08358@linux.intel.com> (raw)
In-Reply-To: <20171012113019.GA4872@krava>
>
> I wonder if patch below would be enough for this
>
> jirka
>
>
Hi Jiri,
I think below patch and next patch (in your another mail) is OK, thanks!
Do I need to upgrade my patch to v2 according to your modifications?
Or you will post your patches? Both OK for me. :)
Thanks
Jin Yao
> ---
> diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
> index 35e9848734d6..56a0a36d0653 100644
> --- a/tools/perf/util/stat.c
> +++ b/tools/perf/util/stat.c
> @@ -259,6 +259,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
> struct perf_counts_values *aggr = &evsel->counts->aggr;
> static struct perf_counts_values zero;
> bool skip = false;
> + u64 val;
>
> if (check_per_pkg(evsel, count, cpu, &skip)) {
> pr_err("failed to read per-pkg counter\n");
> @@ -270,6 +271,9 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
>
> switch (config->aggr_mode) {
> case AGGR_THREAD:
> + val = count->val * evsel->scale;
> + perf_stat__update_shadow_stats(evsel, &val, 0);
> + break;
> case AGGR_CORE:
> case AGGR_SOCKET:
> case AGGR_NONE:
>
next prev parent reply other threads:[~2017-10-12 12:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 9:05 [PATCH] perf stat: Support metrics with perf stat --per-thread Jin Yao
2017-10-12 11:30 ` Jiri Olsa
2017-10-12 12:13 ` Jin, Yao [this message]
2017-10-12 13:06 ` Jiri Olsa
2017-10-12 13:09 ` Jin, Yao
2017-10-12 11:30 ` Jiri Olsa
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=002d04ce-72a5-4a8f-30c2-ec1bcfd08358@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 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.