All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, jolsa@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH v3 10/11] perf tools report: Implement browsing of individual samples
Date: Mon, 4 Mar 2019 15:48:55 +0100	[thread overview]
Message-ID: <20190304144855.GL30476@krava> (raw)
In-Reply-To: <20190228183550.14126-11-andi@firstfloor.org>

On Thu, Feb 28, 2019 at 10:35:49AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Now report can show whole time periods with perf script,
> but the user still has to find individual samples of interest
> manually.
> 
> It would be expensive and complicated to search for the
> right samples in the whole perf file. Typically users
> only need to look at a small number of samples for useful
> analysis.
> 
> Also the full scripts tend to show samples of all CPUs and all
> threads mixed up, which can be very confusing on larger systems.
> 
> Add a new --samples option to save a small random number of samples
> per hist entry
> 
> Use a reservoir sample technique to select a representatve
> number of samples.
> 
> Then allow browsing the samples using perf script
> as part of the hist entry context menu. This automatically
> adds the right filters, so only the thread or cpu of the sample
> is displayed. Then we use less' search functionality
> to directly jump the to the time stamp of the selected
> sample.
> 
> It uses different menus for assembler and source display.
> Assembler needs xed installed and source needs debuginfo.
> 
> Currently it only supports as many samples as fit on
> the screen due to some limitations in the slang ui code.
> 
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> 
> ---
> v2:
> Free names on error path
> Pass --inline and --show-*-event to child perf as needed.
> ---
>  tools/perf/Documentation/perf-report.txt |  4 ++
>  tools/perf/builtin-report.c              |  2 +
>  tools/perf/ui/browsers/Build             |  1 +
>  tools/perf/ui/browsers/hists.c           | 47 ++++++++++++++
>  tools/perf/ui/browsers/res_sample.c      | 80 ++++++++++++++++++++++++
>  tools/perf/ui/browsers/scripts.c         |  2 +-
>  tools/perf/util/hist.c                   | 36 +++++++++++
>  tools/perf/util/hist.h                   | 19 ++++++
>  tools/perf/util/sort.h                   |  8 +++
>  tools/perf/util/symbol.c                 |  1 +
>  tools/perf/util/symbol_conf.h            |  1 +
>  11 files changed, 200 insertions(+), 1 deletion(-)
>  create mode 100644 tools/perf/ui/browsers/res_sample.c
> 
> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
> index 546d87221ad8..f441baa794ce 100644
> --- a/tools/perf/Documentation/perf-report.txt
> +++ b/tools/perf/Documentation/perf-report.txt
> @@ -461,6 +461,10 @@ include::itrace.txt[]
>  --socket-filter::
>  	Only report the samples on the processor socket that match with this filter
>  
> +--samples=N::
> +	Save N individual samples for each histogram entry to show context in perf
> +	report tui browser.

maybe we could set some default value (50?)

jirka

  parent reply	other threads:[~2019-03-04 14:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 18:35 Support sample context in perf report Andi Kleen
2019-02-28 18:35 ` [PATCH v3 01/11] perf tools: Add utility function to fetch executable Andi Kleen
2019-03-04 14:48   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 02/11] perf tools script: Support insn output for normal samples Andi Kleen
2019-03-04 14:48   ` Jiri Olsa
2019-03-04 18:14     ` Andi Kleen
2019-02-28 18:35 ` [PATCH v3 03/11] perf tools report: Support nano seconds Andi Kleen
2019-02-28 18:35 ` [PATCH v3 04/11] perf tools report: Parse time quantum Andi Kleen
2019-03-04 14:49   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 05/11] perf tools report: Support time sort key Andi Kleen
2019-02-28 18:35 ` [PATCH v3 06/11] perf tools report: Use less for scripts output Andi Kleen
2019-02-28 18:35 ` [PATCH v3 07/11] perf tools report: Support running scripts for current time range Andi Kleen
2019-03-04 14:48   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 08/11] perf tools report: Support builtin perf script in scripts menu Andi Kleen
2019-02-28 18:35 ` [PATCH v3 09/11] perf tools: Add utility function to print ns time stamps Andi Kleen
2019-02-28 18:35 ` [PATCH v3 10/11] perf tools report: Implement browsing of individual samples Andi Kleen
2019-03-04 14:47   ` Jiri Olsa
2019-03-04 14:48   ` Jiri Olsa
2019-03-04 14:48   ` Jiri Olsa [this message]
2019-03-04 18:13     ` Andi Kleen
2019-03-04 15:27   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 11/11] perf tools: Add some new tips describing the new options 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=20190304144855.GL30476@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=linux-perf-users@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 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.