From: Jiri Olsa <jolsa@redhat.com>
To: kan.liang@linux.intel.com
Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
namhyung@kernel.org, linux-kernel@vger.kernel.org,
eranian@google.com, ak@linux.intel.com
Subject: Re: [PATCH 0/4] TopDown metrics support for Ice Lake (perf tool)
Date: Wed, 26 Aug 2020 17:54:41 +0200 [thread overview]
Message-ID: <20200826155441.GA783610@krava> (raw)
In-Reply-To: <20200820164532.8011-1-kan.liang@linux.intel.com>
On Thu, Aug 20, 2020 at 09:45:28AM -0700, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
>
> The kernel patches have been merged into the tip's perf/core branch.
> The patch set is on top of commit 2cb5383b30d4 ("perf/x86/intel: Support
> per-thread RDPMC TopDown metrics") of the tip's perf/core branch.
>
> The changes for the perf tool include:
> - Extend --topdown option to support per thread TopDown metrics
> - Support sample-read topdown metric group
> - Add a complete document for the TopDown usage.
>
> Ice Lake has support for measuring the level 1 TopDown metrics
> directly in hardware. This is implemented by an additional METRICS
> register, and a new Fixed Counter 3 that measures pipeline SLOTS.
>
> New in Icelake
> - Do not require generic counters. This allows to collect TopDown always
> in addition to other events.
> - Measuring TopDown per thread/process instead of only per core
>
> For the Ice Lake implementation of performance metrics, the values in
> PERF_METRICS MSR are derived from fixed counter 3. Software should start
> both registers, PERF_METRICS and fixed counter 3, from zero.
> Additionally, software is recommended to periodically clear both
> registers in order to maintain accurate measurements. The latter is
> required for certain scenarios that involve sampling metrics at high
> rates. Software should always write fixed counter 3 before write to
> PERF_METRICS.
>
> IA32_PERF_GLOBAL_STATUS. OVF_PERF_METRICS[48]: If this bit is set,
> it indicates that some PERF_METRICS-related counter has overflowed and
> a PMI is triggered. Software has to synchronize, e.g. re-start,
> PERF_METRICS as well as fixed counter 3. Otherwise, PERF_METRICS may
> return invalid values.
>
> Limitation
> - To get accurate result and avoid reading the METRICS register multiple
> times, the TopDown metrics events and SLOTS event have to be in the
> same group.
> - METRICS and SLOTS registers have to be cleared after each read by SW.
> That is to prevent the lose of precision.
> - Cannot do sampling read SLOTS and TopDown metric events
>
> Please refer SDM Vol3, 18.3.9.3 Performance Metrics for the details of
> TopDown metrics.
>
> Andi Kleen (2):
> perf stat: Support new per thread TopDown metrics
> perf, tools: Add documentation for topdown metrics
>
> Kan Liang (2):
> perf tools: Rename group to topdown
> perf record: Support sample-read topdown metric group
I don't have Ice lake to actualy check, but it looks good
Acked-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
next prev parent reply other threads:[~2020-08-26 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 16:45 [PATCH 0/4] TopDown metrics support for Ice Lake (perf tool) kan.liang
2020-08-20 16:45 ` [PATCH 1/4] perf tools: Rename group to topdown kan.liang
2020-08-20 16:45 ` [PATCH 2/4] perf record: Support sample-read topdown metric group kan.liang
2020-08-20 16:45 ` [PATCH 3/4] perf stat: Support new per thread TopDown metrics kan.liang
2020-08-20 20:05 ` Andi Kleen
2020-08-20 16:45 ` [PATCH 4/4] perf, tools: Add documentation for topdown metrics kan.liang
2020-08-26 15:54 ` Jiri Olsa [this message]
2020-08-27 12:39 ` [PATCH 0/4] TopDown metrics support for Ice Lake (perf tool) Liang, Kan
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=20200826155441.GA783610@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@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.