Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c72bb316 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tracing changes from Steven Rostedt:
 "The majority of the changes here are cleanups for the large changes
  that were added to 3.10, which includes several bug fixes that have
  been marked for stable.

  As for new features, there were a few, but nothing to write to LWN
  about.  These include:

  New function trigger called "dump" and "cpudump" that will cause
  ftrace to dump its buffer to the console when the function is called.
  The difference between "dump" and "cpudump" is that "dump" will dump
  the entire contents of the ftrace buffer, where as "cpudump" will only
  dump the contents of the ftrace buffer for the CPU that called the
  function.

  Another small enhancement is a new sysctl switch called
  "traceoff_on_warning" which, when enabled, will disable tracing if any
  WARN_ON() is triggered.  This is useful if you want to debug what
  caused a warning and do not want to risk losing your trace data by the
  ring buffer overwriting the data before you can disable it.  There's
  also a kernel command line option that will make this enabled at boot
  up called the same thing"

* tag 'trace-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (34 commits)
  tracing: Make tracing_open_generic_{tr,tc}() static
  tracing: Remove ftrace() function
  tracing: Remove TRACE_EVENT_TYPE enum definition
  tracing: Make tracer_tracing_{off,on,is_on}() static
  tracing: Fix irqs-off tag display in syscall tracing
  uprobes: Fix return value in error handling path
  tracing: Fix race between deleting buffer and setting events
  tracing: Add trace_array_get/put() to event handling
  tracing: Get trace_array ref counts when accessing trace files
  tracing: Add trace_array_get/put() to handle instance refs better
  tracing: Protect ftrace_trace_arrays list in trace_events.c
  tracing: Make trace_marker use the correct per-instance buffer
  ftrace: Do not run selftest if command line parameter is set
  tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit()
  tracing: Use flag buffer_disabled for irqsoff tracer
  tracing/kprobes: Turn trace_probe->files into list_head
  tracing: Fix disabling of soft disable
  tracing: Add missing syscall_metadata comment
  tracing: Simplify code for showing of soft disabled flag
  tracing/kprobes: Kill probe_enable_lock
  ...
parents 6d128e1e dcc30223
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -3081,6 +3081,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			See also Documentation/trace/ftrace.txt "trace options"
			See also Documentation/trace/ftrace.txt "trace options"
			section.
			section.


	traceoff_on_warning
			[FTRACE] enable this option to disable tracing when a
			warning is hit. This turns off "tracing_on". Tracing can
			be enabled again by echoing '1' into the "tracing_on"
			file located in /sys/kernel/debug/tracing/

			This option is useful, as it disables the trace before
			the WARNING dump is called, which prevents the trace to
			be filled with content caused by the warning output.

			This option can also be set at run time via the sysctl
			option:  kernel/traceoff_on_warning

	transparent_hugepage=
	transparent_hugepage=
			[KNL]
			[KNL]
			Format: [always|madvise|never]
			Format: [always|madvise|never]
+12 −3
Original line number Original line Diff line number Diff line
@@ -183,13 +183,22 @@ The relational-operators depend on the type of the field being tested:


The operators available for numeric fields are:
The operators available for numeric fields are:


==, !=, <, <=, >, >=
==, !=, <, <=, >, >=, &


And for string fields they are:
And for string fields they are:


==, !=
==, !=, ~


Currently, only exact string matches are supported.
The glob (~) only accepts a wild card character (*) at the start and or
end of the string. For example:

  prev_comm ~ "*sh"
  prev_comm ~ "sh*"
  prev_comm ~ "*sh*"

But does not allow for it to be within the string:

  prev_comm ~ "ba*sh"   <-- is invalid


5.2 Setting filters
5.2 Setting filters
-------------------
-------------------
+13 −0
Original line number Original line Diff line number Diff line
@@ -2430,6 +2430,19 @@ The following commands are supported:
   echo '!schedule:disable_event:sched:sched_switch' > \
   echo '!schedule:disable_event:sched:sched_switch' > \
   	 set_ftrace_filter
   	 set_ftrace_filter


- dump
  When the function is hit, it will dump the contents of the ftrace
  ring buffer to the console. This is useful if you need to debug
  something, and want to dump the trace when a certain function
  is hit. Perhaps its a function that is called before a tripple
  fault happens and does not allow you to get a regular dump.

- cpudump
  When the function is hit, it will dump the contents of the ftrace
  ring buffer for the current CPU to the console. Unlike the "dump"
  command, it only prints out the contents of the ring buffer for the
  CPU that executed the function that triggered the dump.

trace_pipe
trace_pipe
----------
----------


+5 −4
Original line number Original line Diff line number Diff line
@@ -566,10 +566,6 @@ static inline ssize_t ftrace_filter_write(struct file *file, const char __user *
			    size_t cnt, loff_t *ppos) { return -ENODEV; }
			    size_t cnt, loff_t *ppos) { return -ENODEV; }
static inline ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
static inline ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
			     size_t cnt, loff_t *ppos) { return -ENODEV; }
			     size_t cnt, loff_t *ppos) { return -ENODEV; }
static inline loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int whence)
{
	return -ENODEV;
}
static inline int
static inline int
ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; }
ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; }
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* CONFIG_DYNAMIC_FTRACE */
@@ -828,10 +824,15 @@ enum ftrace_dump_mode;


extern enum ftrace_dump_mode ftrace_dump_on_oops;
extern enum ftrace_dump_mode ftrace_dump_on_oops;


extern void disable_trace_on_warning(void);
extern int __disable_trace_on_warning;

#ifdef CONFIG_PREEMPT
#ifdef CONFIG_PREEMPT
#define INIT_TRACE_RECURSION		.trace_recursion = 0,
#define INIT_TRACE_RECURSION		.trace_recursion = 0,
#endif
#endif


#else /* CONFIG_TRACING */
static inline void  disable_trace_on_warning(void) { }
#endif /* CONFIG_TRACING */
#endif /* CONFIG_TRACING */


#ifndef INIT_TRACE_RECURSION
#ifndef INIT_TRACE_RECURSION
+1 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@
 * @nb_args: number of parameters it takes
 * @nb_args: number of parameters it takes
 * @types: list of types as strings
 * @types: list of types as strings
 * @args: list of args as strings (args[i] matches types[i])
 * @args: list of args as strings (args[i] matches types[i])
 * @enter_fields: list of fields for syscall_enter trace event
 * @enter_event: associated syscall_enter trace event
 * @enter_event: associated syscall_enter trace event
 * @exit_event: associated syscall_exit trace event
 * @exit_event: associated syscall_exit trace event
 */
 */
Loading