public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>
Subject: Re: [PATCHSET v2 0/6] perf report: Make --stat output more compact
Date: Tue, 27 Apr 2021 15:15:10 +0200	[thread overview]
Message-ID: <YIgOXhhbe9qwOSgd@krava> (raw)
In-Reply-To: <20210427013717.1651674-1-namhyung@kernel.org>

On Mon, Apr 26, 2021 at 06:37:11PM -0700, Namhyung Kim wrote:
> Hello,
> 
> This patchset changes the output of perf report --stat.
> 
> Changes from v1)
>  * fix build error in TUI  (Jiri)
>  * print percentage of each event  (Andi)
> 
> 
> The perf report --stat shows event statistics like below:
> 
>   $ perf report --stat
> 
>   Aggregated stats:
>              TOTAL events:      20064
>               MMAP events:        239
>               LOST events:          0
>               COMM events:       1518
>               EXIT events:          1
>           THROTTLE events:          0
>         UNTHROTTLE events:          0
>               FORK events:       1517
>               READ events:          0
>             SAMPLE events:       4015
>              MMAP2 events:      12769
>                AUX events:          0
>       ITRACE_START events:          0
>       LOST_SAMPLES events:          0
>             SWITCH events:          0
>    SWITCH_CPU_WIDE events:          0
>         NAMESPACES events:          0
>            KSYMBOL events:          0
>          BPF_EVENT events:          0
>             CGROUP events:          0
>          TEXT_POKE events:          0
>               ATTR events:          0
>         EVENT_TYPE events:          0
>       TRACING_DATA events:          0
>           BUILD_ID events:          0
>     FINISHED_ROUND events:          2
>           ID_INDEX events:          0
>      AUXTRACE_INFO events:          0
>           AUXTRACE events:          0
>     AUXTRACE_ERROR events:          0
>         THREAD_MAP events:          1
>            CPU_MAP events:          1
>        STAT_CONFIG events:          0
>               STAT events:          0
>         STAT_ROUND events:          0
>       EVENT_UPDATE events:          0
>          TIME_CONV events:          1
>            FEATURE events:          0
>         COMPRESSED events:          0
> 
> But it's too long and mostly 0 so we can make it more compact.  Also
> perf report -D has similar output at the end with each event's sample
> count.  It'd be better if we can have the same output in both case.
> 
> So I added --skip-empty (and --no-skip-empty automatically) to suppres
> the 0 output and add the event stats like below.
> 
>   $ perf report --stat --skip-empty
>   
>   Aggregated stats:
>              TOTAL events:      20064
>               MMAP events:        239  ( 1.2%)
>               COMM events:       1518  ( 7.6%)
>               EXIT events:          1  ( 0.0%)
>               FORK events:       1517  ( 7.6%)
>             SAMPLE events:       4015  (20.0%)
>              MMAP2 events:      12769  (63.6%)
>     FINISHED_ROUND events:          2  ( 0.0%)
>         THREAD_MAP events:          1  ( 0.0%)
>            CPU_MAP events:          1  ( 0.0%)
>          TIME_CONV events:          1  ( 0.0%)
>   cycles stats:
>             SAMPLE events:       2475
>   instructions stats:
>             SAMPLE events:       1540
> 
> 
> And I make it enabled by default with a new config option
> report.skip-empty to change the behavior if needed.
> 
> Thanks,
> Namhyung
> 
> 
> Namhyung Kim (6):
>   perf top: Use evlist->events_stat to count events
>   perf hists: Split hists_stats from events_stats
>   perf report: Show event sample counts in --stat output
>   perf report: Add --skip-empty option to suppress 0 event stat
>   perf report: Make --skip-empty as default
>   perf report: Print percentage of each event statistics

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka


      parent reply	other threads:[~2021-04-27 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  1:37 [PATCHSET v2 0/6] perf report: Make --stat output more compact Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 1/6] perf top: Use evlist->events_stat to count events Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 2/6] perf hists: Split hists_stats from events_stats Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 3/6] perf report: Show event sample counts in --stat output Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 4/6] perf report: Add --skip-empty option to suppress 0 event stat Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 5/6] perf report: Make --skip-empty as default Namhyung Kim
2021-04-27  1:37 ` [PATCH v2 6/6] perf report: Print percentage of each event statistics Namhyung Kim
2021-04-27  5:05 ` [PATCHSET v2 0/6] perf report: Make --stat output more compact Andi Kleen
2021-04-27 13:15 ` Jiri Olsa [this message]

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=YIgOXhhbe9qwOSgd@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox