[ltt-dev] Kernel crashes when creating a trace
Mathieu Desnoyers
mathieu.desnoyers at polymtl.ca
Wed Nov 18 00:37:17 EST 2009
* Ashwin Tanugula (ashwin.tanugula at broadcom.com) wrote:
>
>
> > > Connecting /proc/sys/debug/ltt/markers/vm_state/vm_map
> > > #
> > > #
> > > #
> > > # cd ltt-control-0.75-15112009/lttctl/.libs/
> > > # lttctl -C -w /tmp/trace1 trace1
> > > Linux Trace Toolkit Trace Control 0.75-15112009
>
>
> > OK, it makes more sense. Can you try the latest lttng with this patch then ?
>
> Mathieu,
>
> Without "return 1;", it still hangs, I will enable lockdep and send you the log ASAP.
>
Oh ! I found the mistake. Erroneous "cmpxchg" in the 32-bit version of
the trace clock. That should work without the return 1; now. Please try
0.174.
Now if you still have some "Kernel/LTTV event size differs for event.."
that's another problem we'll have to address. It seems to work fine on
x86 32/64 here though. Do you view the trace on the same architecture
you record it on ? What are the arch endiannesses ?
Mathieu
> With "return 1", I still cannot view the trace.
>
> $ lttv-gui -t trace2
> 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 8, LTTV 0
> aborting...
> lttv/lttv/lttv-gui: line 10: 23282 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 8, LTTV 0
> aborting...
>
> lttv/lttv/lttv-gui: line 10: 23303 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
>
> trace clock provide sleep free get put
>
>
> Thanks,
> Ashwin
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
> ---
> kernel/trace/trace-clock-32-to-64.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> Index: linux-2.6-lttng/kernel/trace/trace-clock-32-to-64.c
> ===================================================================
> --- linux-2.6-lttng.orig/kernel/trace/trace-clock-32-to-64.c 2009-11-17 17:28:21.000000000 -0500
> +++ linux-2.6-lttng/kernel/trace/trace-clock-32-to-64.c 2009-11-17 17:30:33.000000000 -0500
> @@ -232,21 +232,27 @@ static int __cpuinit hotcpu_callback(str
> switch (action) {
> case CPU_UP_PREPARE:
> case CPU_UP_PREPARE_FROZEN:
> + spin_lock(&synthetic_tsc_lock);
> if (synthetic_tsc_refcount)
> prepare_synthetic_tsc(hotcpu);
> + spin_unlock(&synthetic_tsc_lock);
> break;
> case CPU_ONLINE:
> case CPU_ONLINE_FROZEN:
> + spin_lock(&synthetic_tsc_lock);
> if (synthetic_tsc_refcount)
> enable_synthetic_tsc(hotcpu);
> + spin_unlock(&synthetic_tsc_lock);
> break;
> #ifdef CONFIG_HOTPLUG_CPU
> case CPU_UP_CANCELED:
> case CPU_UP_CANCELED_FROZEN:
> case CPU_DEAD:
> case CPU_DEAD_FROZEN:
> + spin_lock(&synthetic_tsc_lock);
> if (synthetic_tsc_refcount)
> disable_synthetic_tsc(hotcpu);
> + spin_unlock(&synthetic_tsc_lock);
> break;
> #endif /* CONFIG_HOTPLUG_CPU */
> }
> @@ -257,7 +263,6 @@ void get_synthetic_tsc(void) {
> int cpu;
>
> - get_online_cpus();
> spin_lock(&synthetic_tsc_lock);
> if (synthetic_tsc_refcount++)
> goto end;
> @@ -269,7 +274,6 @@ void get_synthetic_tsc(void)
> }
> end:
> spin_unlock(&synthetic_tsc_lock);
> - put_online_cpus();
> }
> EXPORT_SYMBOL_GPL(get_synthetic_tsc);
>
> @@ -277,7 +281,6 @@ void put_synthetic_tsc(void) {
> int cpu;
>
> - get_online_cpus();
> spin_lock(&synthetic_tsc_lock);
> WARN_ON(synthetic_tsc_refcount <= 0);
> if (synthetic_tsc_refcount != 1 || !synthetic_tsc_enabled) @@ -289,7 +292,6 @@ void put_synthetic_tsc(void)
> end:
> synthetic_tsc_refcount--;
> spin_unlock(&synthetic_tsc_lock);
> - put_online_cpus();
> }
> EXPORT_SYMBOL_GPL(put_synthetic_tsc);
>
>
> >
> > Thanks,
> > Ashwin
> >
> >
>
> --
> Mathieu Desnoyers
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
>
>
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list