From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 3/5] perf hists: Link hist entries before inserting to an output tree
Date: Fri, 07 Dec 2012 17:45:06 +0900 [thread overview]
Message-ID: <87zk1qcktp.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20121206162543.GC1080@krava.brq.redhat.com> (Jiri Olsa's message of "Thu, 6 Dec 2012 17:25:43 +0100")
Hi,
On Thu, 6 Dec 2012 17:25:43 +0100, Jiri Olsa wrote:
> On Fri, Dec 07, 2012 at 12:09:39AM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@lge.com>
>>
>> For matching and/or linking hist entries, they need to be sorted by
>> given sort keys. However current hists__match/link did this on the
>> output trees, so that the entries in the output tree need to be resort
>> before doing it.
>>
>> This looks not so good since we have trees for collecting or
>> collapsing entries before passing them to an output tree and they're
>> already sorted by the given sort keys. Since we don't need to print
>> anything at the time of matching/linking, we can use these internal
>> trees directly instead of bothering with double resort on the output
>> tree.
>
> this patch also makes diff working over collapsed entries,
> which was not possible before.. nice ;)
>
> outputs like:
>
> [jolsa@krava perf]$ ./perf diff -s comm
> # Event 'cycles:u'
> #
> # Baseline Delta Command
> # ........ ....... ...............
> #
> 5.24% +68.96% firefox
> 2.34% +5.66% X
> 48.51% -41.53% mocp
> 14.98% -11.53% skype
> 18.01% -15.35% plugin-containe
> 1.03% +1.48% xchat
> 5.54% -4.61% gkrellm
> 1.41% -0.93% xterm
> +0.33% xmonad-x86_64-l
> +0.23% vim
> +0.07% xscreensaver
> 0.19% -0.14% swapper
> 1.00% -0.97% NetworkManager
> 0.28% -0.25% ssh
> 0.11% -0.09% sleep
> 0.84% -0.83% dbus-daemon
> 0.02% -0.01% perf
> 0.40% -0.40% wpa_supplicant
> 0.05% -0.05% gpm
> 0.04% -0.04% crond
>
>
> small nitpick below, otherwise
>
> Acked-by: Jiri Olsa <jolsa@redhat.com>
Thanks!
>
>
>>
>> Its only user - at the time of this writing - perf diff can be easily
>> converted to use the internal tree and can save some lines too by
>> getting rid of unnecessary resorting codes.
>>
>> Cc: Jiri Olsa <jolsa@redhat.com>
>> Cc: Stephane Eranian <eranian@google.com>
>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>> ---
>> tools/perf/builtin-diff.c | 65 ++++++++++++---------------------------------
>> tools/perf/util/hist.c | 49 +++++++++++++++++++++++++---------
>> 2 files changed, 54 insertions(+), 60 deletions(-)
>>
>> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
>> index b2e7d39f099b..044ad99dcc90 100644
>> --- a/tools/perf/builtin-diff.c
>> +++ b/tools/perf/builtin-diff.c
>> @@ -275,43 +275,6 @@ static struct perf_tool tool = {
>> return NULL;A
>
> SNIP
>
>> }
>>
>> -static void perf_evlist__resort_hists(struct perf_evlist *evlist, bool name)
>> +static void perf_evlist__resort_hists(struct perf_evlist *evlist)
>
> this could be called 'perf_evlist__collapse_resort' now
Will change in the next spin.
Thanks,
Namhyung
next prev parent reply other threads:[~2012-12-07 8:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 15:09 [PATCH 0/5] perf hists: Changes on hists__{match,link} (v3) Namhyung Kim
2012-12-06 15:09 ` [PATCH 1/5] perf diff: Removing displacement output option Namhyung Kim
2012-12-06 15:09 ` [PATCH 2/5] perf hists: Exchange order of comparing items when collapsing hists Namhyung Kim
2012-12-06 16:53 ` Jiri Olsa
2012-12-06 19:09 ` Arnaldo Carvalho de Melo
2012-12-07 8:38 ` Namhyung Kim
2012-12-07 10:18 ` Jiri Olsa
2012-12-06 15:09 ` [PATCH 3/5] perf hists: Link hist entries before inserting to an output tree Namhyung Kim
2012-12-06 16:25 ` Jiri Olsa
2012-12-07 8:45 ` Namhyung Kim [this message]
2012-12-06 15:09 ` [PATCH 4/5] perf diff: Use internal rb tree for compute resort Namhyung Kim
2012-12-06 16:51 ` Jiri Olsa
2012-12-07 8:53 ` Namhyung Kim
2012-12-06 15:09 ` [PATCH 5/5] perf test: Add a test case for hists__{match,link} 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=87zk1qcktp.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--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
Powered by JetHome