From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>,
Stephane Eranian <eranian@google.com>,
Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH 3/6] perf tools: Fix command line filters in hierarchy mode
Date: Wed, 9 Mar 2016 21:44:28 +0900 [thread overview]
Message-ID: <20160309124428.GA7678@danjae.kornet> (raw)
In-Reply-To: <20160309091356.GA25692@krava.redhat.com>
Hi Jiri,
On Wed, Mar 09, 2016 at 10:13:56AM +0100, Jiri Olsa wrote:
> On Wed, Mar 09, 2016 at 12:06:40AM +0900, Namhyung Kim wrote:
> > When a command-line filter was applied in hierarchy mode, output was
> > broken especially when filtering on lower level. The higher level
> > entries didn't show up so it's hard to see the result.
> >
> > Also it needs to handle multi sort keys in a single level of hierarchy.
> >
> > Before:
> >
> > $ perf report --hierarchy -s 'cpu,{dso,comm}' --comms swapper --stdio
> > ...
> > # Overhead CPU / Shared Object+Command
> > # ........... ...........................
> > #
> > 13.79% [kernel.vmlinux] swapper
> > 31.71% 000
> > 13.80% [kernel.vmlinux] swapper
> > 0.43% [e1000e] swapper
> > 11.89% [kernel.vmlinux] swapper
> > 9.18% [kernel.vmlinux] swapper
> >
> > After:
> >
> > # Overhead CPU / Shared Object+Command
> > # ........... ...............................
> > #
> > 33.09% 003
> > 13.79% [kernel.vmlinux] swapper
> > 31.71% 000
> > 13.80% [kernel.vmlinux] swapper
> > 0.43% [e1000e] swapper
> > 21.90% 002
> > 11.89% [kernel.vmlinux] swapper
> > 13.30% 001
> > 9.18% [kernel.vmlinux] swapper
>
> I'm getting funny numbers when using 'F' toggle in tui mode
>
> [jolsa@krava perf]$ ./perf report --hierarchy -s 'cpu,{dso,comm}' --comms swapper
>
> Samples: 254 of event 'cycles:pp', Event count (approx.): 132263887
> Overhead CPU / Shared Object+Command ◆
> + 69.85% 001 ▒
> + 44.28% 000 ▒
> + 41.62% 002 ▒
> + 36.80% 003
>
>
> [jolsa@krava perf]$ sudo ./perf top --hierarchy -s 'cpu,{dso,comm}' --comms swapper
>
> Overhead CPU / Shared O+Command
> + 320.64% 000
> + 179.91% 002
> + 137.05% 003
> + 88.37% 001
Hmm.. I think it's because that the total period is a sum of periods
of leaf nodes. But if a filter is applied, sum of periods of upper
level entries can be different than sum of the lower level entries.
So it should use top-level entries periods instead IMHO.
I will send a fix.
Thanks,
Namhyung
next prev parent reply other threads:[~2016-03-09 12:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 15:06 [PATCH 1/6] perf tools: Fix hist_entry__filter() for hierarchy Namhyung Kim
2016-03-08 15:06 ` [PATCH 2/6] perf tools: Add more sort entry check functions Namhyung Kim
2016-03-08 15:06 ` [PATCH 3/6] perf tools: Fix command line filters in hierarchy mode Namhyung Kim
2016-03-09 9:13 ` Jiri Olsa
2016-03-09 12:44 ` Namhyung Kim [this message]
2016-03-08 15:06 ` [PATCH 4/6] perf tools: Remove hist_entry->fmt field Namhyung Kim
2016-03-08 15:06 ` [PATCH 5/6] perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry() Namhyung Kim
2016-03-08 15:06 ` [PATCH 6/6] perf tools: Remove nr_sort_keys field Namhyung Kim
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=20160309124428.GA7678@danjae.kornet \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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