X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=include%2Flinux%2Fftrace_event.h;h=0bebb5c348b8268eff6135f24f1635c0adf2dbb1;hb=19a7fe206232cc875a3083211e0a21c08edd756e;hp=28672e87e9100c7a02e36e47db2317e0a46d3313;hpb=e400a40cffa77e45c60c5431ec8757579247cae2;p=deliverable%2Flinux.git diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 28672e87e910..0bebb5c348b8 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h @@ -138,6 +138,17 @@ enum print_line_t { TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ }; +/* + * Several functions return TRACE_TYPE_PARTIAL_LINE if the trace_seq + * overflowed, and TRACE_TYPE_HANDLED otherwise. This helper function + * simplifies those functions and keeps them in sync. + */ +static inline enum print_line_t trace_handle_return(struct trace_seq *s) +{ + return trace_seq_has_overflowed(s) ? + TRACE_TYPE_PARTIAL_LINE : TRACE_TYPE_HANDLED; +} + void tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, int pc);