From: Ingo Molnar <mingo@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Stephane Eranian <eranian@google.com>,
Jiri Olsa <jolsa@redhat.com>,
Rodrigo Campos <rodrigo@sdfg.com.ar>,
Arun Sharma <asharma@fb.com>
Subject: Re: [RFC/PATCHSET 00/14] perf report: Add support to accumulate hist periods (v2)
Date: Thu, 31 Oct 2013 09:09:32 +0100 [thread overview]
Message-ID: <20131031080932.GA8479@gmail.com> (raw)
In-Reply-To: <1383202576-28141-1-git-send-email-namhyung@kernel.org>
* Namhyung Kim <namhyung@kernel.org> wrote:
> When the -g cumulative option is given, it'll be shown like this:
>
> $ perf report -g cumulative --stdio
>
> # Overhead Overhead (Acc) Command Shared Object Symbol
> # ........ .............. ....... ................. .......................
> #
> 0.00% 88.29% abc libc-2.17.so [.] __libc_start_main
> 0.00% 88.29% abc abc [.] main
> 0.00% 88.29% abc abc [.] c
> 0.00% 88.29% abc abc [.] b
> 88.29% 88.29% abc abc [.] a
> 0.00% 11.61% abc ld-2.17.so [k] _dl_sysdep_start
> 0.00% 9.43% abc ld-2.17.so [.] dl_main
> 9.43% 9.43% abc ld-2.17.so [.] _dl_relocate_object
> 2.27% 2.27% abc [kernel.kallsyms] [k] page_fault
> 0.00% 2.18% abc ld-2.17.so [k] _dl_start_user
> 0.00% 0.10% abc ld-2.17.so [.] _start
>
> As you can see __libc_start_main -> main -> c -> b -> a callchain
> show up in the output.
This looks really useful!
A couple of details:
1)
This is pretty close to SysProf output, right? So why not use the
well-known SysProf naming and call the first column 'self' and the
second column 'total'? I think those names are pretty intuitive and
it would help people who come from SysProf over to perf.
2)
Is it possible to configure the default 'report -g' style, so that
people who'd like to use it all the time don't have to type '-g
cumulative' all the time?
3)
I'd even argue that we enable this reporting feature by default, if
a data file includes call-chain data: the first column will still
show the well-known percentage that perf report produces today, the
second column will be a new feature in essence.
The only open question would be, by which column should we sort:
'sysprof style' sorts by 'total', 'perf style' sorts by 'self'.
Agreed?
4)
This is not directly related to the new feature you added:
call-graph profiling still takes quite a bit of time. It might make
sense to save the ordered histogram to a perf.data.ordered file, so
that repeat invocations of 'perf report' don't have to recalculate
everything again and again?
This file would be maintained transparently and would only be
re-created when the perf.data file changes, or something like that.
5)
I realize that this is an early RFC, still there are some usability
complaints I have about call-graph recording/reporting which should
be addressed before adding new features.
For example I tried to get a list of the -g output modi via:
$ perf report -g help
Which produced a lot of options - I think it should produce only a
list of -g options. It also doesn't list cumulative:
-g, --call-graph <output_type,min_percent[,print_limit],call_order>
Display callchains using output_type
(graph, flat, fractal, or none) , min percent threshold, optional
print limit, callchain order, key (function or address). Default:
fractal,0.5,callee,function
Also, the list is very long and not very readable - I think there
should be more newlines.
Then I tried to do:
$ perf report -g
which, somewhat surprisingly, was accepted. Given that call-graph
perf.data is recognized automatically by 'perf report', the -g
option should only accept -g <type> syntax and provide a list of
options when '-g' or '-g help' is provided.
6)
A similar UI problem exists on the 'perf record' side: 'perf record
--call-graph help' should produce a specific list of call-graph
possibilities, not the two screens full output it does today.
> I know it have some rough edges or even bugs, but I really want to
> release it and get reviews. It does not handle event groups and
> annotations and it has a bug on TUI.
>
> You can also get this series on 'perf/cumulate-v2' branch in my tree at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
So I tried it out on top of tip:master, with your testcase, and in
the --stdio case it works very well:
# Overhead Overhead (Acc) Command Shared Object Symbol
# ........ .............. ....... ................. ..........................................
#
0.00% 100.00% abc abc [.] _start
0.00% 100.00% abc libc-2.17.so [.] __libc_start_main
0.00% 100.00% abc abc [.] main
0.00% 100.00% abc abc [.] c
0.00% 100.00% abc abc [.] b
99.79% 100.00% abc abc [.] a
0.01% 0.21% abc [kernel.kallsyms] [k] apic_timer_interrupt
In the TUI output the 'c' entry is not visible:
99.79% 100.00% abc abc [.] a
0.00% 99.79% abc abc [.] b
0.01% 0.21% abc [kernel.kallsyms] [k] apic_timer_interrupt
0.00% 0.19% abc [kernel.kallsyms] [k] smp_apic_timer_interrupt
I suspect this is the 'TUI bug' you mentioned?
> Any comments are welcome, thanks.
Cool stuff, let's fix & merge it ASAP! :-)
Thanks,
Ingo
next prev parent reply other threads:[~2013-10-31 8:09 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 6:56 Namhyung Kim
2013-10-31 6:56 ` [PATCH 01/14] perf tools: Consolidate __hists__add_*entry() Namhyung Kim
2013-11-01 11:56 ` Jiri Olsa
2013-11-06 5:43 ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
2013-10-31 6:56 ` [PATCH 02/14] perf tools: Introduce struct add_entry_iter Namhyung Kim
2013-11-01 12:07 ` Jiri Olsa
2013-11-05 7:09 ` Namhyung Kim
2013-11-01 12:09 ` Jiri Olsa
2013-11-05 7:16 ` Namhyung Kim
2013-10-31 6:56 ` [PATCH 03/14] perf hists: Convert hist entry functions to use struct he_stat Namhyung Kim
2013-11-04 23:45 ` Arnaldo Carvalho de Melo
2013-11-05 7:17 ` Namhyung Kim
2013-10-31 6:56 ` [PATCH 04/14] perf hists: Add support for accumulated stat of hist entry Namhyung Kim
2013-10-31 6:56 ` [PATCH 05/14] perf hists: Check if accumulated when adding a " Namhyung Kim
2013-10-31 6:56 ` [PATCH 06/14] perf hists: Accumulate hist entry stat based on the callchain Namhyung Kim
2013-10-31 6:56 ` [PATCH 07/14] perf tools: Update cpumode for each cumulative entry Namhyung Kim
2013-11-01 12:55 ` Jiri Olsa
2013-11-05 7:41 ` Namhyung Kim
2013-10-31 6:56 ` [PATCH 08/14] perf report: Cache cumulative callchains Namhyung Kim
2013-10-31 11:13 ` Rodrigo Campos
2013-11-01 7:07 ` Namhyung Kim
2013-11-01 14:24 ` Rodrigo Campos
2013-11-01 15:16 ` Rodrigo Campos
2013-11-01 12:29 ` Jiri Olsa
2013-11-01 12:57 ` Jiri Olsa
2013-10-31 6:56 ` [PATCH 09/14] perf hists: Sort hist entries by accumulated period Namhyung Kim
2013-10-31 6:56 ` [PATCH 10/14] perf ui/hist: Add support to accumulated hist stat Namhyung Kim
2013-10-31 6:56 ` [PATCH 11/14] perf ui/browser: " Namhyung Kim
2013-10-31 6:56 ` [PATCH 12/14] perf ui/gtk: " Namhyung Kim
2013-10-31 6:56 ` [PATCH 13/14] perf tools: Apply percent-limit to cumulative percentage Namhyung Kim
2013-10-31 6:56 ` [PATCH 14/14] perf report: Add -g cumulative option Namhyung Kim
2013-11-01 13:17 ` Jiri Olsa
2013-11-05 7:44 ` Namhyung Kim
2013-10-31 8:09 ` Ingo Molnar [this message]
2013-11-01 6:48 ` [RFC/PATCHSET 00/14] perf report: Add support to accumulate hist periods (v2) Namhyung Kim
2013-11-01 7:55 ` Ingo Molnar
2013-11-01 9:18 ` Pekka Enberg
2013-11-01 9:22 ` Namhyung Kim
2013-11-01 9:27 ` Ingo Molnar
2013-11-05 7:31 ` Namhyung Kim
2013-11-05 7:46 ` Ingo Molnar
2013-11-05 9:05 ` Namhyung Kim
2013-11-05 11:58 ` Ingo Molnar
2013-11-06 7:56 ` Namhyung Kim
2013-11-06 8:30 ` Ingo Molnar
2013-11-06 9:17 ` Namhyung Kim
2013-11-06 11:47 ` Ingo Molnar
2013-11-06 12:14 ` Frederic Weisbecker
2013-11-11 12:13 ` Ingo Molnar
2013-11-11 13:08 ` Frederic Weisbecker
2013-11-11 13:56 ` Ingo Molnar
2013-11-11 15:45 ` Frederic Weisbecker
2013-11-06 15:33 ` David Ahern
2013-11-11 12:19 ` Ingo Molnar
2013-11-11 14:44 ` David Ahern
2013-11-12 12:08 ` Pekka Enberg
2013-11-06 16:09 ` Peter Zijlstra
2013-11-11 12:17 ` Ingo Molnar
2013-11-06 12:10 ` Frederic Weisbecker
2013-11-11 12:12 ` Ingo Molnar
2013-11-11 13:01 ` Frederic Weisbecker
2013-11-04 13:27 ` Frederic Weisbecker
2013-11-04 13:23 ` Frederic Weisbecker
2013-11-04 13:34 ` Frederic Weisbecker
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=20131031080932.GA8479@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=asharma@fb.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=rodrigo@sdfg.com.ar \
/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