Bug #858
closedbabeltrace cannot parse following on mips. I think second read of perf_cpu_cycles seems very off
100%
Description
lttng enable-channel syscalls --kernel --num-subbuf 16 $SESSION
lttng add-context $SESSION -c syscalls -k --type pid --type tid
lttng add-context $SESSION -c syscalls -k -t prio -t perf:cpu:cycles
lttng enable-event --kernel --syscall -a $SESSION -c syscalls
syscalls_0 100% 808KB 808.0KB/s 00:00
syscalls_0.idx 100% 296 0.3KB/s 00:00
syscalls_1.idx 100% 184 0.2KB/s 00:00
syscalls_1 100% 392KB 392.0KB/s 00:00 l
metadata 100% 92KB 92.0KB/s 00:00
umut$ babeltrace kernel/
[15:09:14.976549620] (+?.?????????) axis-00408cc5a889 exit_syscall: { cpu_id = 0 }, { pid = 2523, tid = 2527, prio = 20, perf_cpu_cycles = 288705510 }, { ret = 1 }
[15:09:14.976811465] (+0.000261845) axis-00408cc5a889 sys_ioctl: { cpu_id = 0 }, { pid = 2527, tid = 20, prio = 288798108, perf_cpu_cycles = 2306113510548963354 }, { fd = 1, cmd = 2, arg = 3726872232 }
[error] Event id 2523 is outside range.
[error] Reading event failed.
Error printing trace.
umuttl@lnxumuttl:umut$ babeltrace --version
Error parsing options.
BabelTrace Trace Viewer and Converter 1.2.2
Files
Updated by Lars Persson over 9 years ago
I have seen this problem when attaching a context with 64 bit data size to kernel tracepoints.
Updated by Mathieu Desnoyers over 9 years ago
- Status changed from New to Confirmed
It is a lttng-modules issue (and we perhaps have the same issue in lttng-ust). The context size allocation/write code do not align the context structure on the largest field size as it should.
Note: this can be reproduced on architectures that typically don't use alignment with this simple modification:
diff --git a/lttng-tracer-core.h b/lttng-tracer-core.h index b946dce..7d9691c 100644 --- a/lttng-tracer-core.h +++ b/lttng-tracer-core.h @@ -27,7 +27,7 @@ #include <linux/list.h> #include <linux/percpu.h> -#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS +#if 1 /* Align data on its natural alignment */ #define RING_BUFFER_ALIGN #endif
Updated by Mathieu Desnoyers over 9 years ago
Should be fixed both in modules and UST now. Thanks for reporting!
Mathieu
Updated by Mathieu Desnoyers over 9 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset modules|commit:a9dd15dadd7d58f58cfd19d2503d3b6b541723bc.