kernel-hacking-2024-linux-s.../kernel/trace
Steven Rostedt (Red Hat) 19a7fe2062 tracing: Add trace_seq_has_overflowed() and trace_handle_return()
Adding a trace_seq_has_overflowed() which returns true if the trace_seq
had too much written into it allows us to simplify the code.

Instead of checking the return value of every call to trace_seq_printf()
and friends, they can all be called normally, and at the end we can
return !trace_seq_has_overflowed() instead.

Several functions also return TRACE_TYPE_PARTIAL_LINE when the trace_seq
overflowed and TRACE_TYPE_HANDLED otherwise. Another helper function
was created called trace_handle_return() which takes a trace_seq and
returns these enums. Using this helper function also simplifies the
code.

This change also makes it possible to remove the return values of
trace_seq_printf() and friends. They should instead just be
void functions.

Link: http://lkml.kernel.org/r/20141114011410.365183157@goodmis.org

Reviewed-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-19 15:25:39 -05:00
..
blktrace.c
ftrace.c ftrace/x86/extable: Add is_ftrace_trampoline() function 2014-11-19 15:25:26 -05:00
Kconfig tracing: Remove function_trace_stop and HAVE_FUNCTION_TRACE_MCOUNT_TEST 2014-07-18 13:58:12 -04:00
Makefile tracing: Move the trace_seq_* functions into its own trace_seq.c file 2014-07-01 07:13:35 -04:00
power-traces.c
ring_buffer.c ring-buffer: Fix infinite spin in reading buffer 2014-10-02 16:51:18 -04:00
ring_buffer_benchmark.c sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule() 2014-09-19 12:35:17 +02:00
rpm-traces.c
trace.c tracing: Add trace_seq_has_overflowed() and trace_handle_return() 2014-11-19 15:25:39 -05:00
trace.h tracing: Add trace_seq_has_overflowed() and trace_handle_return() 2014-11-19 15:25:39 -05:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c tracing: Merge consecutive seq_puts calls 2014-11-13 21:33:34 -05:00
trace_clock.c tracing: Fix wraparound problems in "uptime" trace clock 2014-07-21 09:56:12 -04:00
trace_entries.h
trace_event_perf.c perf: Check permission only for parent tracepoint event 2014-07-28 10:01:38 +02:00
trace_events.c tracing: Replace seq_printf by simpler equivalents 2014-11-13 21:32:19 -05:00
trace_events_filter.c tracing: Kill "filter_string" arg of replace_preds() 2014-07-16 14:58:53 -04:00
trace_events_filter_test.h
trace_events_trigger.c trace: Replace single-character seq_puts with seq_putc 2014-11-14 07:55:55 -05:00
trace_export.c
trace_functions.c tracing: Fix race of function probes counting 2014-11-18 23:06:35 -05:00
trace_functions_graph.c function_graph: Fix micro seconds notations 2014-11-14 07:56:03 -05:00
trace_irqsoff.c
trace_kdb.c tracing: kdb: Fix kernel livelock with empty buffers 2014-11-13 21:27:25 -05:00
trace_kprobe.c trace: Replace single-character seq_puts with seq_putc 2014-11-14 07:55:55 -05:00
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Add trace_seq_has_overflowed() and trace_handle_return() 2014-11-19 15:25:39 -05:00
trace_output.h tracing: Add trace_seq_has_overflowed() and trace_handle_return() 2014-11-19 15:25:39 -05:00
trace_printk.c trace: Replace single-character seq_puts with seq_putc 2014-11-14 07:55:55 -05:00
trace_probe.c
trace_probe.h
trace_sched_switch.c tracing: Move tracing_sched_{switch,wakeup}() into wakeup tracer 2014-11-11 12:43:15 -05:00
trace_sched_wakeup.c tracing: Move tracing_sched_{switch,wakeup}() into wakeup tracer 2014-11-11 12:43:15 -05:00
trace_selftest.c Seems that Peter Zijlstra added a new check that is making old 2014-10-12 07:28:55 -04:00
trace_selftest_dynamic.c
trace_seq.c tracing: Fix trace_seq_bitmask() to start at current position 2014-11-19 15:25:38 -05:00
trace_stack.c sched: Add helper for task stack page overrun checking 2014-09-19 12:35:23 +02:00
trace_stat.c
trace_stat.h
trace_syscalls.c kernel: trace_syscalls: Replace rcu_assign_pointer() with RCU_INIT_POINTER() 2014-09-10 10:48:47 -04:00
trace_uprobe.c trace: Replace single-character seq_puts with seq_putc 2014-11-14 07:55:55 -05:00