Namhyung Kim
504586e095
tools lib traceevent: Get rid of malloc_or_die() in trace_seq_init()
...
Use plain malloc() and check its return value.
Signed-off-by: Namhyung Kim <[email protected] >
Reviewed-by: Jiri Olsa <[email protected] >
Acked-by: Steven Rostedt <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-15 15:10:32 -03:00
Namhyung Kim
3026bba3c3
tools lib traceevent: Check return value of realloc()
...
If realloc() fails, it'll leak the buffer. Also increate buffer size
only if the allocation succeeded.
Signed-off-by: Namhyung Kim <[email protected] >
Reviewed-by: Jiri Olsa <[email protected] >
Acked-by: Steven Rostedt <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-15 15:10:28 -03:00
Namhyung Kim
3c6d8d8442
tools lib traceevent: Add state member to struct trace_seq
...
The trace_seq->state is for tracking errors during the use of trace_seq
APIs and getting rid of die() in it.
Signed-off-by: Namhyung Kim <[email protected] >
Reviewed-by: Jiri Olsa <[email protected] >
Acked-by: Steven Rostedt <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-15 15:10:19 -03:00
Namhyung Kim
6a48aec3a7
tools lib traceevent: Add trace_seq_reset()
...
Sometimes it'd be useful if existing trace_seq can be reused. But
currently it's impossible since there's no API to reset the trace_seq.
Let's add trace_seq_reset() for this case.
Signed-off-by: Namhyung Kim <[email protected] >
Acked-by: Steven Rostedt <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-07-12 13:52:12 -03:00
Jon Stanley
7b9f6b402c
tools lib traceevent: Update FSF postal address to be URL's.
...
The FSF now prefers to use URL's in copyright headers rather than
their postal address. This change updates the address to be
<http://www.gnu.org/licenses > per http://www.gnu.org/licenses/gpl-howto.html
Signed-off-by: Jon Stanley <[email protected] >
Acked-by: Steven Rostedt <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-01-24 16:40:17 -03:00
Steven Rostedt
668fe01f1c
events: Update tools/lib/traceevent to work with perf
...
Some of the util functions of libtraceevent.a conflict with perf,
such as die(), warning() and others. Move them into event-util.h
that is not included by the perf tools.
Also, as perf compiles with 'bool' the filter_arg->bool needs to
be renamed to filter_arg->boolean.
Signed-off-by: Steven Rostedt <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Steven Rostedt <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Arun Sharma <[email protected] >
Cc: Namhyung Kim <[email protected] >
Signed-off-by: Frederic Weisbecker <[email protected] >
2012-04-25 13:12:26 +02:00
Steven Rostedt
f7d82350e5
tools/events: Add files to create libtraceevent.a
...
Copy over the files from trace-cmd to the Linux tools directory
such that applications like perf and latencytrace can use the
more advanced parsing code.
Because some of the file names of perf conflict with trace-cmd file
names, the trace-cmd files have been renamed as follows:
parse-events.c ==> event-parse.c
parse-events.h ==> event-parse.h
utils.h ==> event-utils.h
The files have been updated to handle the changes to the header files
but other than that, they are identical to what was in the trace-cmd
repository. The history of these files, including authorship is
available at the git repo:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
The Makefile was also copied over, but most of it was removed to
focus on the parse-events code first. The parts of the Makefile for
the plugins have also been removed, but will be added back when the
plugin code is copied over as well. But that may be in its own
separate directory.
Signed-off-by: Steven Rostedt <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Steven Rostedt <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Arun Sharma <[email protected] >
Cc: Namhyung Kim <[email protected] >
Signed-off-by: Frederic Weisbecker <[email protected] >
2012-04-25 12:28:28 +02:00