linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Du, Changbin" <changbin.du@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: "Du, Changbin" <changbin.du@intel.com>,
	peterz@infradead.org, Namhyung Kim <namhyung@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Wang Nan <wangnan0@huawei.com>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf report: show sort_order in title
Date: Wed, 15 Mar 2017 10:11:37 +0800	[thread overview]
Message-ID: <20170315021137.GB28871@intel.com> (raw)
In-Reply-To: <20170314130416.GB3089@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3251 bytes --]

On Tue, Mar 14, 2017 at 10:04:16AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 14, 2017 at 10:16:44AM +0800, Du, Changbin escreveu:
> > On Mon, Mar 13, 2017 at 11:57:18AM -0300, Arnaldo Carvalho de Melo wrote:
> > > But then, while testing, 
> 
> > > Before:
> 
> > >   $ perf report
> > >   Samples: 405  of event 'cycles', Event count (approx.): 101733003
> > >   Overhead  Command          Shared Object                        Symbol
> > >     11.15%  swapper          [kernel.vmlinux]                     [k] intel_idle
> 
> > >   Tip: Save output of perf stat using: perf stat record <target workload>
> 
> > > After:
> 
> > >   $ perf report
> > >   Samples: 405  of event 'cycles', Event count (approx.): 101733003, Sort by: Children,Overhead,Command,Shared Object,Symbol
> > >   Overhead  Command          Shared Object                        Symbol
> > >     11.15%  swapper          [kernel.vmlinux]                     [k] intel_idle
> 
> > > I see now duplication of info, where is the value? Can you show the usecase in
> > > a compelling way?
>  
> > Thanks for trying. The key idea is to show how does the data sort, especially
> > the first sort key. When I use some GUI based perf tool, I can see how
> > my data is sorted by checking the report header status. I think this is
> > a good for browser.
>  
> > You are right, the info is duplicated. I got another idea that we show a '↓' at
> > the header string and only for the first sort key. What do you think?
>  
> > $ perf report
> >    Samples: 405  of event 'cycles', Event count (approx.): 101733003
> >    ↓Overhead  Command          Shared Object                        Symbol
> 
> this is much more compact, but you need to make it abundantly clear what
> you are trying to achieve by showind counter examples were what we get
> on that line starting with your suggested marker isn't the sort order.
> Otherwise even a character is one too much :-)
> 
Yes, I just want get know how does perf data sort. Because sometimes the
real sort order doesn't match the '-s' option I given. In this case, I
was confused about the sorting before reading into the code.

> >      11.15%  swapper          [kernel.vmlinux]                     [k] intel_idle
> >       3.00%  firefox          libxul.so                            [.] 0x0000000001298b8d
> >       1.74%  swapper          [kernel.vmlinux]                     [k] update_blocked_averages
> 
> > Another idea I want to add is to support dynamic sorting. For me, I use perf to
> > analysing entire system performance, and the data is very large. Then sometimes
> > it take as long as ~10 minitues to read perf data. So I think if we can change
> > sort w/o reload data will be good.
> 
> And in some cases it is even possible! I.e. if you haven't collapsed too
> much, you will not have to reprocess the file to get to the new order.
> 
> BTW, have you played with:
> 
>   perf top --hierarchy
> 
> Try it with -g and --call-graph dwarf
> 
> Also try:
> 
>   perf report --hierarchy
> 
> - Arnaldo

Sounds great! I tried '--hierarchy' option, but still don't know how to
resort the report. Could you give a hint?

-- 
Thanks,
Changbin Du

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2017-03-15  2:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13  8:36 [PATCH] perf report: show sort_order in title changbin.du
2017-03-13 14:47 ` Arnaldo Carvalho de Melo
2017-03-13 14:57   ` Arnaldo Carvalho de Melo
2017-03-14  2:16     ` Du, Changbin
2017-03-14 13:04       ` Arnaldo Carvalho de Melo
2017-03-15  2:11         ` Du, Changbin [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=20170315021137.GB28871@intel.com \
    --to=changbin.du@intel.com \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).