From: Pekka Enberg <penberg@iki.fi>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
David Ahern <dsahern@gmail.com>,
Stephane Eranian <eranian@google.com>,
Andi Kleen <andi@firstfloor.org>,
Pekka Enberg <penberg@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [RFC 0/3] perf tools: Show time info (v1)
Date: Mon, 02 Dec 2013 11:35:04 +0200 [thread overview]
Message-ID: <529C5448.7090902@iki.fi> (raw)
In-Reply-To: <1385967199-3759-1-git-send-email-namhyung@kernel.org>
On 12/02/2013 08:53 AM, Namhyung Kim wrote:
> Sometimes users might want to see time information along with the
> performance result but the perf cannot provide it currently.
>
> In this patchset, I added such feature using sample->time. When the
> perf processes sample events, it calculate time info and update last
> timestamp. It keeps the last timestamp for each evsel (and for each
> cpu if it's a per-cpu session).
>
> It guesses whether a session is per-cpu if it found PERF_SAMPLE_CPU in
> a evsel->attr.sample_type since I couldn't find a better way. However
> it'll have a trouble if used with tracepoint events since they require
> the cpu info in the sample_type even for the per-thread sessions.
>
> The sample time will usually be proportional to the overhead but
> sometimes it show a different result especially in idle state.
>
> With this patch, perf report can show time information in the header
> (on --stdio output only for now) and a new column which can be enabled
> by --show-time-info option.
>
> $ perf record -- perf bench sched messaging
> $ perf report --stdio --show-time-info
>
> # Samples: 10K of event 'cycles'
> # Event count (approx.): 5168954556
> # Total sampling time : 0.179102 (sec) <--- here
> #
> # Overhead Time Command Shared Object Symbol
> # ........ .......... ............... .................. ............................
> #
> 6.59% 0.006093 sched-messaging [unknown] [.] 0x0000003153ebc7ed
> 4.81% 0.005354 sched-messaging [kernel.kallsyms] [k] copy_user_generic_string
> 3.89% 0.004098 sched-messaging [kernel.kallsyms] [k] avc_has_perm_flags
> 3.77% 0.003630 sched-messaging [kernel.kallsyms] [k] unix_stream_recvmsg
> 3.37% 0.003733 sched-messaging [kernel.kallsyms] [k] _raw_spin_lock
> 2.97% 0.003489 sched-messaging [kernel.kallsyms] [k] _raw_spin_lock_irqsave
> 2.73% 0.002615 sched-messaging [kernel.kallsyms] [k] __slab_free
> 2.56% 0.002392 sched-messaging [kernel.kallsyms] [k] page_fault
> 2.45% 0.002572 sched-messaging [kernel.kallsyms] [k] sock_alloc_send_pskb
>
> I put the series on 'perf/time-sample-v1' branch in my tree:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
>
> Any comments are welcome, thanks
Reviewed-by: Pekka Enberg <penberg@kernel.org>
for the whole series.
next prev parent reply other threads:[~2013-12-02 9:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 6:53 [RFC 0/3] perf tools: Show time info (v1) Namhyung Kim
2013-12-02 6:53 ` [PATCH 1/3] perf tools: Record total sampling time Namhyung Kim
2013-12-02 12:45 ` Ingo Molnar
2013-12-02 12:57 ` Ingo Molnar
2013-12-02 15:43 ` Namhyung Kim
2013-12-02 16:36 ` Ingo Molnar
2013-12-02 20:24 ` Arnaldo Carvalho de Melo
2013-12-03 5:44 ` Namhyung Kim
2013-12-03 14:30 ` David Ahern
2013-12-04 10:00 ` Ingo Molnar
2013-12-04 10:02 ` Ingo Molnar
2013-12-03 5:33 ` Namhyung Kim
2013-12-02 15:05 ` Namhyung Kim
2013-12-02 18:51 ` Arnaldo Carvalho de Melo
2013-12-02 6:53 ` [PATCH 2/3] perf tools: Record sampling time for each entry Namhyung Kim
2013-12-02 12:39 ` Arnaldo Carvalho de Melo
2013-12-02 14:57 ` Namhyung Kim
2013-12-02 18:49 ` Arnaldo Carvalho de Melo
2013-12-03 4:33 ` Namhyung Kim
2013-12-02 6:53 ` [PATCH 3/3] perf report: Add --show-time-info option Namhyung Kim
2013-12-02 12:33 ` Arnaldo Carvalho de Melo
2013-12-02 14:38 ` Namhyung Kim
2013-12-02 9:35 ` Pekka Enberg [this message]
2013-12-03 2:28 ` [RFC 0/3] perf tools: Show time info (v1) Namhyung Kim
2013-12-02 17:04 ` Andi Kleen
2013-12-03 2:34 ` 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=529C5448.7090902@iki.fi \
--to=penberg@iki.fi \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=penberg@kernel.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