From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, peterz@infradead.org, jolsa@kernel.org,
mingo@kernel.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 8/8] perf stat: Add computation of TopDown formulas
Date: Fri, 20 May 2016 12:23:27 +0200 [thread overview]
Message-ID: <20160520102327.GB28818@krava> (raw)
In-Reply-To: <1463190297-17408-9-git-send-email-andi@firstfloor.org>
On Fri, May 13, 2016 at 06:44:57PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Implement the TopDown formulas in perf stat. The topdown basic metrics
> reported by the kernel are collected, and the formulas are computed
> and output as normal metrics.
>
> See the kernel commit exporting the events for details on the used
> metrics.
>
> v2: Always print all metrics, only use thresholds for coloring.
> v3: Mark retiring over threshold green, not red.
> v4:
> Only print one decimal digit
> Fix color printing of one metric
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/util/stat-shadow.c | 156 ++++++++++++++++++++++++++++++++++++++++++
> tools/perf/util/stat.c | 5 ++
> tools/perf/util/stat.h | 5 ++
> 3 files changed, 166 insertions(+)
>
> diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
> index fdb71961143e..182050f2785a 100644
> --- a/tools/perf/util/stat-shadow.c
> +++ b/tools/perf/util/stat-shadow.c
> @@ -36,6 +36,11 @@ static struct stats runtime_dtlb_cache_stats[NUM_CTX][MAX_NR_CPUS];
> static struct stats runtime_cycles_in_tx_stats[NUM_CTX][MAX_NR_CPUS];
> static struct stats runtime_transaction_stats[NUM_CTX][MAX_NR_CPUS];
> static struct stats runtime_elision_stats[NUM_CTX][MAX_NR_CPUS];
> +static struct stats runtime_topdown_total_slots[NUM_CTX][MAX_NR_CPUS];
> +static struct stats runtime_topdown_slots_issued[NUM_CTX][MAX_NR_CPUS];
> +static struct stats runtime_topdown_slots_retired[NUM_CTX][MAX_NR_CPUS];
> +static struct stats runtime_topdown_fetch_bubbles[NUM_CTX][MAX_NR_CPUS];
> +static struct stats runtime_topdown_recovery_bubbles[NUM_CTX][MAX_NR_CPUS];
> static bool have_frontend_stalled;
>
> struct stats walltime_nsecs_stats;
> @@ -82,6 +87,12 @@ void perf_stat__reset_shadow_stats(void)
> sizeof(runtime_transaction_stats));
> memset(runtime_elision_stats, 0, sizeof(runtime_elision_stats));
> memset(&walltime_nsecs_stats, 0, sizeof(walltime_nsecs_stats));
> + memset(runtime_topdown_total_slots, 0, sizeof(runtime_topdown_total_slots));
> + memset(runtime_topdown_slots_retired, 0, sizeof(runtime_topdown_slots_retired));
> + memset(runtime_topdown_slots_issued, 0, sizeof(runtime_topdown_slots_issued));
> + memset(runtime_topdown_fetch_bubbles, 0, sizeof(runtime_topdown_fetch_bubbles));
> + memset(runtime_topdown_recovery_bubbles, 0, sizeof(runtime_topdown_recovery_bubbles));
> + have_frontend_stalled = pmu_have_event("cpu", "stalled-cycles-frontend");
why to initialize this one in here? it's already in perf_stat__init_shadow_stats
jirka
next prev parent reply other threads:[~2016-05-20 10:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-14 1:44 Add top down metrics to perf stat Andi Kleen
2016-05-14 1:44 ` [PATCH 1/8] x86/topology: Add topology_max_smt_threads() Andi Kleen
2016-05-14 1:44 ` [PATCH 2/8] perf/x86: Support sysfs files depending on SMT status Andi Kleen
2016-05-14 1:44 ` [PATCH 3/8] perf/x86/intel: Add Top Down events to Intel Core Andi Kleen
2016-05-14 1:44 ` [PATCH 4/8] perf/x86/intel: Add Top Down events to Intel Atom Andi Kleen
2016-05-14 1:44 ` [PATCH 5/8] perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround Andi Kleen
2016-05-14 1:44 ` [PATCH 6/8] perf stat: Avoid fractional digits for integer scales Andi Kleen
2016-05-16 12:53 ` Jiri Olsa
2016-05-14 1:44 ` [PATCH 7/8] perf stat: Basic support for TopDown in perf stat Andi Kleen
2016-05-14 1:44 ` [PATCH 8/8] perf stat: Add computation of TopDown formulas Andi Kleen
2016-05-20 10:23 ` Jiri Olsa [this message]
2016-05-20 13:38 ` Andi Kleen
2016-05-20 13:43 ` Jiri Olsa
2016-05-20 14:15 ` Andi Kleen
2016-05-20 13:43 ` Andi Kleen
2016-05-16 12:58 ` Add top down metrics to perf stat Jiri Olsa
2016-05-19 23:51 ` Andi Kleen
2016-05-20 9:59 ` Jiri Olsa
2016-05-20 14:18 ` Andi Kleen
2016-05-20 10:24 ` Jiri Olsa
-- strict thread matches above, loose matches on Subject: below --
2016-05-20 0:09 Andi Kleen
2016-05-20 0:10 ` [PATCH 8/8] perf stat: Add computation of TopDown formulas Andi Kleen
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=20160520102327.GB28818@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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.