diff options
author | Namhyung Kim <namhyung@kernel.org> | 2013-12-19 04:17:44 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-15 13:10:19 -0500 |
commit | 3c6d8d84423932f1d9949179c6acdf2405515ee4 (patch) | |
tree | 3a4d71442a447666dc3993049abb60f03323b757 /tools/lib/traceevent/event-parse.h | |
parent | 7d16c634233c411f54b89d0f1d51750dc85c5f7e (diff) |
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 <namhyung@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/87fvopalbb.fsf@sejong.aot.lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index cf5db9013f2c..3c890cb28db7 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -58,6 +58,12 @@ struct pevent_record { | |||
58 | #endif | 58 | #endif |
59 | }; | 59 | }; |
60 | 60 | ||
61 | enum trace_seq_fail { | ||
62 | TRACE_SEQ__GOOD, | ||
63 | TRACE_SEQ__BUFFER_POISONED, | ||
64 | TRACE_SEQ__MEM_ALLOC_FAILED, | ||
65 | }; | ||
66 | |||
61 | /* | 67 | /* |
62 | * Trace sequences are used to allow a function to call several other functions | 68 | * Trace sequences are used to allow a function to call several other functions |
63 | * to create a string of data to use (up to a max of PAGE_SIZE). | 69 | * to create a string of data to use (up to a max of PAGE_SIZE). |
@@ -68,6 +74,7 @@ struct trace_seq { | |||
68 | unsigned int buffer_size; | 74 | unsigned int buffer_size; |
69 | unsigned int len; | 75 | unsigned int len; |
70 | unsigned int readpos; | 76 | unsigned int readpos; |
77 | enum trace_seq_fail state; | ||
71 | }; | 78 | }; |
72 | 79 | ||
73 | void trace_seq_init(struct trace_seq *s); | 80 | void trace_seq_init(struct trace_seq *s); |