public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 12/12] perf intel-pt: Add support for decoding PSB+ only
Date: Mon, 20 Jul 2020 15:25:02 -0700	[thread overview]
Message-ID: <20200720222502.GC1180481@tassilo.jf.intel.com> (raw)
In-Reply-To: <20200710151104.15137-13-adrian.hunter@intel.com>

On Fri, Jul 10, 2020 at 06:11:04PM +0300, Adrian Hunter wrote:
> A single q option decodes ip from only FUP/TIP packets. Make it so that
> repeating the q option (i.e. qq) decodes only PSB+, getting ip if there is
> a FUP packet within PSB+ (i.e. between PSB and PSBEND).
> 
> Example:
> 
>  $ perf record -e intel_pt//u grep -rI pudding drivers
>  [ perf record: Woken up 52 times to write data ]
>  [ perf record: Captured and wrote 57.870 MB perf.data ]
>  $ time perf script --itrace=bi | wc -l
>  58948289
> 
>  real    1m23.863s
>  user    1m23.251s
>  sys     0m7.452s
>  $ time perf script --itrace=biq | wc -l
>  3385694
> 
>  real    0m4.453s
>  user    0m4.455s
>  sys     0m0.328s
>  $ time perf script --itrace=biqq | wc -l
>  1883
> 
>  real    0m0.047s
>  user    0m0.043s
>  sys     0m0.009s
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/Documentation/perf-intel-pt.txt     | 15 +++++++++++++++
>  .../util/intel-pt-decoder/intel-pt-decoder.c   | 18 ++++++++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt
> index f9fe4a4040ba..d5a266d7f15b 100644
> --- a/tools/perf/Documentation/perf-intel-pt.txt
> +++ b/tools/perf/Documentation/perf-intel-pt.txt
> @@ -999,6 +999,21 @@ What *will* be decoded with the (single) q option:
>  Note the q option does not specify what events will be synthesized e.g. the p
>  option must be used also to show power events.
>  
> +Repeating the q option (double-q i.e. qq) results in even faster decoding and even
> +less detail.  The decoder decodes only extended PSB (PSB+) packets, getting the
> +instruction pointer if there is a FUP packet within PSB+ (i.e. between PSB and
> +PSBEND).  Note PSB packets occur regularly in the trace based on the psb_period
> +config term (refer config terms section).  There will be a FUP packet if the
> +PSB+ occurs while control flow is being traced.

Some estimate would be good how frequent that is.

If we assume one bit per instruction then a 2K period it's roughly 16k instructions,
with the 16K period roughly 128K instructions.

Could be added in a followon patch.

But looks overall the patches look good to me now.

(for the whole series)
Reviewed-by: Andi Kleen <ak@linux.intel.com>

  reply	other threads:[~2020-07-20 22:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 15:10 [PATCH V2 00/12] perf intel-pt: Add support for decoding FUP/TIP only Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 01/12] perf intel-pt: Fix FUP packet state Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 02/12] perf intel-pt: Fix duplicate branch after CBR Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 03/12] perf tools: Improve aux_output not supported error Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 04/12] perf auxtrace: Add missing itrace options to help text Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 05/12] perf auxtrace: Add optional error flags to the itrace 'e' option Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 06/12] perf intel-pt: Use itrace error flags to suppress some errors Adrian Hunter
2020-07-10 15:10 ` [PATCH V2 07/12] perf auxtrace: Add optional log flags to the itrace 'd' option Adrian Hunter
2020-07-10 15:11 ` [PATCH V2 08/12] perf intel-pt: Use itrace debug log flags to suppress some messages Adrian Hunter
2020-07-10 15:11 ` [PATCH V2 09/12] perf intel-pt: Time filter logged perf events Adrian Hunter
2020-07-10 15:11 ` [PATCH V2 10/12] perf auxtrace: Add itrace 'q' option for quicker, less detailed decoding Adrian Hunter
2020-07-20 22:27   ` Andi Kleen
2020-07-10 15:11 ` [PATCH V2 11/12] perf intel-pt: Add support for decoding FUP/TIP only Adrian Hunter
2020-07-10 15:11 ` [PATCH V2 12/12] perf intel-pt: Add support for decoding PSB+ only Adrian Hunter
2020-07-20 22:25   ` Andi Kleen [this message]
2020-08-06 12:03     ` Arnaldo Carvalho de Melo
2020-08-04 13:34 ` [PATCH V2 00/12] perf intel-pt: Add support for decoding FUP/TIP only Adrian Hunter
2020-08-04 14:59   ` Arnaldo Carvalho de Melo

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=20200720222502.GC1180481@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox