[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090703094301.GL3902@elte.hu>
Date: Fri, 3 Jul 2009 11:43:01 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Li Zefan <lizf@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] kmemtrace: print binary output only if 'bin' option
is set
* Li Zefan <lizf@...fujitsu.com> wrote:
> Currently by default the output of kmemtrace is binary format
> instead of human-readable output.
>
> This patch makes the following changes:
> - We'll see human-readable output by default
> - We'll see binary output if 'bin' option is set
>
> Note: you may probably need to explicitly disable context-info binary
> output:
>
> # echo 0 > options/context-info
> # echo 1 > options/bin
> # cat trace_pipe
>
> v2:
> - use %pF to print call_site
>
> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> Acked-by: Pekka Enberg <penberg@...helsinki.fi>
> Acked-by: Eduard - Gabriel Munteanu <eduard.munteanu@...ux360.ro>
> ---
> kernel/trace/kmemtrace.c | 120 ++++++++++++++++++++++++++++++++++-----------
> 1 files changed, 90 insertions(+), 30 deletions(-)
Applied to tip:tracing/core (for .32), thanks guys!
Btw., any progress on turning kmemtrace into a 'perf kmemtrace' kind
of tool? It would be really cool: mixing it with PMU events would
enhance it to a large degree and there's various good output modes
implemented in tools/perf/ that would make analysis rather
expressive and flexible.
For that we'd have to extend PERF_TYPE_TRACEPOINT to do samples as
well. See kernel/perf_counter.c, include/linux/perf_counter.h, etc.
For example, using call-graphs one can get output like the one
attached below. (it shows the SLAB profile details from a hackbench
run, a graph form.)
Ingo
#
# (39812 samples)
#
# Overhead Symbol
# ........ ......
#
23.58% [k] _spin_lock
|
|--9.77%-- get_partial_node
| |
| |--8.76%-- __slab_alloc
| | |
| | |--5.22%-- kmem_cache_alloc_node
| | | __alloc_skb
| | | sock_alloc_send_pskb
| | | __sk_free
| | | unix_stream_sendmsg
| | | __sock_recvmsg
| | | sock_aio_read
| | | do_sync_write
| | | vfs_write
| | | sys_write
| | | sysenter_dispatch
| | | 0xf7f07430
| | | 0xffe8255000000014
| | |
| | --3.54%-- __kmalloc_node_track_caller
| | __alloc_skb
| | sock_alloc_send_pskb
| | __sk_free
| | unix_stream_sendmsg
| | __sock_recvmsg
| | sock_aio_read
| | do_sync_write
| | vfs_write
| | sys_write
| | sysenter_dispatch
| | 0xf7f07430
| | 0xffe8255000000014
| |
| --1.00%-- get_any_partial
| __slab_alloc
| |
| |--0.56%-- kmem_cache_alloc_node
| | __alloc_skb
| | sock_alloc_send_pskb
| | __sk_free
| | unix_stream_sendmsg
| | __sock_recvmsg
| | sock_aio_read
| | do_sync_write
| | vfs_write
| | sys_write
| | sysenter_dispatch
| | 0xf7f07430
| | 0xffe8255000000014
| |
| --0.44%-- __kmalloc_node_track_caller
| __alloc_skb
| sock_alloc_send_pskb
| __sk_free
| unix_stream_sendmsg
| __sock_recvmsg
| sock_aio_read
| do_sync_write
| vfs_write
| sys_write
| sysenter_dispatch
| 0xf7f07430
| 0xffe8255000000014
|
|--9.51%-- add_partial
| __slab_free
| |
| |--5.60%-- kmem_cache_free
| | |
| | |--5.60%-- skb_tstamp_tx
| | | skb_tstamp_tx
| | | unix_stream_recvmsg
| | | sock_aio_read
| | | sys_getsockopt
| | | do_sync_read
| | | vfs_read
| | | sys_read
| | | sysenter_dispatch
| | | 0xf7f07430
| | | 0x9000007d0
| | |
| | --0.00%-- __d_free
| | d_free
| | d_kill
| | dput
| | __fput
| | fput
| | filp_close
| | put_files_struct
| | exit_files
| | do_exit
| | do_group_exit
| | sys_exit_group
| | sysenter_dispatch
| |
| --3.91%-- kfree
| |
| |--3.91%-- pskb_expand_head
| | __pskb_pull_tail
| | kfree_skb
| | skb_tstamp_tx
| | unix_stream_recvmsg
| | sock_aio_read
| | sys_getsockopt
| | do_sync_read
| | vfs_read
| | sys_read
| | sysenter_dispatch
| | 0xf7f07430
| | 0x9000007d0
| |
| --0.00%-- free_counter_rcu
| __rcu_process_callbacks
| rcu_process_callbacks
| __do_softirq
| call_softirq
| do_softirq
| irq_exit
| smp_apic_timer_interrupt
| apic_timer_interrupt
| 0xf7f07430
| 0x9000007d0
|
|--2.04%-- unix_stream_sendmsg
| __sock_recvmsg
| sock_aio_read
| do_sync_write
| vfs_write
| sys_write
| sysenter_dispatch
| 0xf7f07430
| |
| |--2.03%-- 0xffe8255000000014
| |
| --0.01%-- 0x700000006
|
|--1.26%-- task_rq_lock
| try_to_wake_up
| default_wake_function
| |
| |--1.26%-- autoremove_wake_function
| | __wake_up_common
| | __wake_up_sync_key
| | |
[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists