[ltt-dev] Kernel crashes when creating a trace
Mathieu Desnoyers
mathieu.desnoyers at polymtl.ca
Tue Nov 17 16:19:14 EST 2009
* Ashwin Tanugula (ashwin.tanugula at broadcom.com) wrote:
>
>
>
> > > > I tested with the "return 1;" at the beginning of trace_clock_async_tsc_read
> > > >
> > > >I am able to generate the trace, but I cannot view it. (tried it many times, even tried hybrid mode and flight mode)
>
>
> > > OK, I think I found the problem. Can you re-try this with lttng 0.172,
> > >lttv 0.12.21 ?
>
>
> > And can you try with this patch on top of 0.172 for the MIPS32 trace clock ?
>
> With this patch, the kernel hangs during ltt-armall
>
>
> Connecting /proc/sys/debug/ltt/markers/kernel/tasklet_high_entry
> Connecting /proc/sys/debug/ltt/markers/kernel/tasklet_high_exit
> Connecting /proc/sys/debug/ltt/markers/kernel/tasklet_low_entry
> Connecting /proc/sys/debug/ltt/markers/
>
>
> With "return 1;", I can generate the trace data, but I cannot view it.
>
OK, I've hit such problem too and fixed this today. Can you try with
LTTng 0.173, ltt-control 0.76, lttv 0.12.22 ?
(the patch I send you is integrated in lttng 0.173 though, beware)
If you can reproduce the hang caused by the trace clock with lockdep
activated, it could help me debugging this problem.
Thanks,
Mathieu
>
> $ lttv-gui -t trace1
> Xlib: extension "RANDR" missing on display ":0.0".
> ** Message: statistics viewer : background computation data ready.
>
> ** ERROR **: Kernel/LTTV event size differs for event da_writepages: kernel 41, LTTV 37
> aborting...
> ./lttv-gui: line 10: 3754 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
>
> $ lttv-gui -t trace4
> Xlib: extension "RANDR" missing on display ":0.0".
> ** Message: statistics viewer : background computation data ready.
>
> ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 4, LTTV 0
> aborting...
> ./lttv-gui: line 10: 4001 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
>
>
> $ lttv-gui -t trace3
> Xlib: extension "RANDR" missing on display ":0.0".
> ** Message: statistics viewer : background computation data ready.
>
> ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 4, LTTV 0
> aborting...
> ./lttv-gui: line 10: 3950 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
>
>
>
> Thanks,
> Ashwin
>
>
>
>
> mips trace clock fix order
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
> ---
> arch/mips/kernel/trace-clock.c | 31 +++++++++++++++----------------
> 1 file changed, 15 insertions(+), 16 deletions(-)
>
> Index: linux-2.6-lttng/arch/mips/kernel/trace-clock.c
> ===================================================================
> --- linux-2.6-lttng.orig/arch/mips/kernel/trace-clock.c 2009-11-16 23:35:55.000000000 -0500
> +++ linux-2.6-lttng/arch/mips/kernel/trace-clock.c 2009-11-16 23:45:17.000000000 -0500
> @@ -138,15 +138,15 @@ void get_trace_clock(void)
> {
> int cpu;
>
> - get_synthetic_tsc();
> spin_lock(&async_tsc_lock);
> - if (async_tsc_refcount++ || tsc_is_sync())
> - goto end;
> -
> - async_tsc_enabled = 1;
> - for_each_online_cpu(cpu)
> - enable_trace_clock(cpu);
> -end:
> + if (async_tsc_refcount++ || tsc_is_sync()) {
> + get_synthetic_tsc();
> + } else {
> + async_tsc_enabled = 1;
> + get_synthetic_tsc();
> + for_each_online_cpu(cpu)
> + enable_trace_clock(cpu);
> + }
> spin_unlock(&async_tsc_lock);
> }
> EXPORT_SYMBOL_GPL(get_trace_clock);
> @@ -157,15 +157,14 @@ void put_trace_clock(void)
>
> spin_lock(&async_tsc_lock);
> WARN_ON(async_tsc_refcount <= 0);
> - if (async_tsc_refcount != 1 || !async_tsc_enabled)
> - goto end;
> -
> - for_each_online_cpu(cpu)
> - disable_trace_clock(cpu);
> - async_tsc_enabled = 0;
> -end:
> + if (async_tsc_refcount != 1 || !async_tsc_enabled) {
> + put_synthetic_tsc();
> + } else {
> + for_each_online_cpu(cpu)
> + disable_trace_clock(cpu);
> + async_tsc_enabled = 0;
> + }
> async_tsc_refcount--;
> spin_unlock(&async_tsc_lock);
> - put_synthetic_tsc();
> }
> EXPORT_SYMBOL_GPL(put_trace_clock);
>
>
>
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list