alistair23-linux/tools
Steven Rostedt 12e55569a2 tools lib traceevent: Use helper trace-seq in print functions like kernel does
Jiri Olsa reported that his plugin for scsi was chopping off part of the
output. Investigating this, I found that Jiri used the same functions as
what is in the kernel, which adds the following:

	trace_seq_putc(p, 0);

This adds a '\0' to the output string. The reason this works in the
kernel is that the "p" that is passed to the function helper is a
temporary trace_seq. But in the libtraceevent library, it's the pointer
to the trace_seq used to output. By adding the '\0', it truncates the
line and nothing added after that will be printed.

We can solve this in two ways. One is to have the helper functions for
the library not add the unnecessary '\0'. The other is to change the
library to also use a helper trace_seq structure that gets copied to the
main trace_seq just like the kernel does.

The latter allows the helper functions in the plugins to be the same as
the kernel, which is the better solution.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Reported-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20131119182937.401668e3@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-11-27 14:58:34 -03:00
..
cgroup
firewire
hv Tools: hv: use single send+recv buffer 2013-09-26 12:03:31 -07:00
include/tools tools/include: use stdint types for user-space byteshift headers 2013-07-03 16:02:28 +02:00
lguest tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. 2013-07-15 11:18:32 +09:30
lib tools lib traceevent: Use helper trace-seq in print functions like kernel does 2013-11-27 14:58:34 -03:00
net filter: add minimal BPF JIT image disassembler 2013-03-21 11:35:41 -04:00
nfsd
perf tools/perf/stat: Add event unit and scale support 2013-11-27 11:16:39 +01:00
power cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states 2013-07-05 01:52:19 +02:00
scripts tools: Harmonize the various build messages in perf, lib-traceevent, lib-lk 2013-10-11 12:18:08 -03:00
testing H8/300 has been dead for several years, the kernel for it has 2013-11-12 14:13:14 +09:00
thermal/tmon tools/thermal: Introduce tmon, a tool for thermal subsystem 2013-11-07 08:45:34 +08:00
usb tools: usb: ffs-test: Fix build failure 2013-03-07 12:23:17 +08:00
virtio virtio_test: verify if virtqueue_kick() succeeded 2013-10-29 11:28:16 +10:30
vm tools/vm/page-types.c: support KPF_SOFTDIRTY bit 2013-11-13 12:09:07 +09:00
Makefile tools/thermal: Introduce tmon, a tool for thermal subsystem 2013-11-07 08:45:34 +08:00