public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 0/4] perf tools: New comm infrastructure
Date: Fri, 13 Sep 2013 15:32:34 +0900	[thread overview]
Message-ID: <87y571qlj1.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1379017783-27032-1-git-send-email-fweisbec@gmail.com> (Frederic Weisbecker's message of "Thu, 12 Sep 2013 22:29:39 +0200")

Hi Frederic,

On Thu, 12 Sep 2013 22:29:39 +0200, Frederic Weisbecker wrote:
> The way we handle hists sorted by comm is to first gather them by tid then
> in the end merge/collapse hists that end up with the same comm.
>
> But merging hists has shown some performances issues, especially with callchain
> where the operation can be very heavy.
>
> So this new comm infrastructure aims at removing comm collapses. It brings
> two features:
>
> 1) Keep track of comms lifecycle by storing timestamps when the comms
> are set. This way we can map the precise comm to any thread:time couple.
> This only works if the PERF_SAMPLE_ID comes along comm and fork events,
> otherwise we only track the latest comm set for a thread.
>
> This can provide us more precise comm sorted hists by distinguishing pre and
> post exec timeframes into seperate hists for a single thread.
>
> Note that although the comm infrastructure is ready to do this, I haven't
> yet made the perf tools support that. It's a TODO entry.
>
>
> 2) Allocate comms only once instead of duplicating them for all threads sharing
> a same one. Two threads having the same comm should now point to the same string.
> As a result we can compare hists thread comm by address.
>
> The big upside is that we can now live sort comm hists instead of collapsing
> them in the end of the processing.
>
> I've seen very nice performance results on perf report. Roughly a 1.5x to 2x
> on perf report default stdio output with callchains.
>
> You can try this branch:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> 	perf/comm
>
> May be merging that with Namhyung callchains patches could provide some
> cumulative nice results.

I got this:

ui/browsers/hists.c: In function ‘hists__browser_title’:
ui/browsers/hists.c:1258:10: error: passing argument 1 of ‘thread__comm_curr’ discards ‘const’ qualifier from pointer target type [-Werror]
In file included from ui/browsers/../../util/sort.h:24:0,
                 from ui/browsers/hists.c:11:
ui/browsers/../../util/thread.h:39:13: note: expected ‘struct thread *’ but argument is of type ‘const struct thread *’
ui/browsers/hists.c: In function ‘perf_evsel__hists_browse’:
ui/browsers/hists.c:1581:9: error: passing argument 1 of ‘thread__comm_curr’ discards ‘const’ qualifier from pointer target type [-Werror]
In file included from ui/browsers/../../util/sort.h:24:0,
                 from ui/browsers/hists.c:11:
ui/browsers/../../util/thread.h:39:13: note: expected ‘struct thread *’ but argument is of type ‘const struct thread *’
ui/browsers/hists.c:1704:10: error: passing argument 1 of ‘thread__comm_curr’ discards ‘const’ qualifier from pointer target type [-Werror]
In file included from ui/browsers/../../util/sort.h:24:0,
                 from ui/browsers/hists.c:11:
ui/browsers/../../util/thread.h:39:13: note: expected ‘struct thread *’ but argument is of type ‘const struct thread *’
cc1: all warnings being treated as errors
make: *** [ui/browsers/hists.o] Error 1
make: *** Waiting for unfinished jobs....

Thanks,
Namhyung

  parent reply	other threads:[~2013-09-13  6:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 20:29 [PATCH 0/4] perf tools: New comm infrastructure Frederic Weisbecker
2013-09-12 20:29 ` [PATCH 1/4] perf tools: Use an accessor to read thread comm Frederic Weisbecker
2013-09-12 20:29 ` [PATCH 2/4] perf tools: Add time argument on comm setting Frederic Weisbecker
2013-09-12 20:29 ` [PATCH 3/4] perf tools: Add new comm infrastructure Frederic Weisbecker
2013-09-12 20:29 ` [PATCH 4/4] perf tools: Compare hists comm by addresses Frederic Weisbecker
2013-09-13  8:07   ` Namhyung Kim
2013-09-13 13:59     ` Frederic Weisbecker
2013-09-17  1:46       ` Namhyung Kim
2013-09-12 20:36 ` [PATCH 0/4] perf tools: New comm infrastructure Ingo Molnar
2013-09-13 12:43   ` Frederic Weisbecker
2013-09-13 15:59     ` David Ahern
2013-09-14  6:11     ` Ingo Molnar
2013-09-17  5:54       ` Namhyung Kim
2013-09-17  7:16         ` Ingo Molnar
2013-09-18 14:20         ` Arnaldo Carvalho de Melo
2013-09-18 15:12           ` Arnaldo Carvalho de Melo
2013-09-18 15:58             ` Arnaldo Carvalho de Melo
2013-09-18 16:17               ` Namhyung Kim
2013-09-13  6:32 ` Namhyung Kim [this message]
2013-09-13 12:46   ` 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=87y571qlj1.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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