[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101028192704.GA26131@Krystal>
Date: Thu, 28 Oct 2010 15:27:04 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: David Sharp <dhsharp@...gle.com>
Cc: linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Michael Rubin <mrubin@...gle.com>
Subject: Re: Benchmarks of kernel tracing options (ftrace, ktrace, lttng
and perf)
* David Sharp (dhsharp@...gle.com) wrote:
[...]
> I hope this produces a fair comparison. I've detailed my steps below
> for all of the tracers in case there are improvements to be made.
>
[...]
> Results for amount of time to execute a tracepoint (includes previous results):
> ktrace: 200ns (old)
> ftrace: 224ns (old, w/ handcoded tracepoint, not syscall tracing)
> lttng: 449ns (new)
> perf: 1047ns (new)
>
> Also interesting:
> ftrace: 587ns (old, w/ syscall tracing)
> This just shows that syscall tracing is much slower than a normal tracepoint.
Hrm, not quite fair actually. LTTng enables a thread flag that causes
syscall_trace to be called on sycall entry/exit by default. Please try with the
following patch to remove the extra syscall overhead.
Thanks,
Mathieu
for google benchmarks: remove syscall tracing from LTTng modules
Syscall tracing is enabled by default when lttng is tracing, which causes the
full registers to be saved and a sycall_trace call upon syscall entry/exit.
This patch is for testing only.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
---
ltt-tracer.c | 2 --
1 file changed, 2 deletions(-)
Index: lttng-modules/ltt-tracer.c
===================================================================
--- lttng-modules.orig/ltt-tracer.c
+++ lttng-modules/ltt-tracer.c
@@ -839,7 +839,6 @@ int ltt_trace_alloc(const char *trace_na
if (list_empty(<t_traces.head)) {
mod_timer(<t_async_wakeup_timer,
jiffies + LTT_PERCPU_TIMER_INTERVAL);
- set_kernel_trace_flag_all_tasks();
}
list_add_rcu(&trace->list, <t_traces.head);
synchronize_trace();
@@ -917,7 +916,6 @@ static int _ltt_trace_destroy(struct ltt
list_del_rcu(&trace->list);
synchronize_trace();
if (list_empty(<t_traces.head)) {
- clear_kernel_trace_flag_all_tasks();
/*
* We stop the asynchronous delivery of reader wakeup, but
* we must make one last check for reader wakeups pending
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
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