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

Commit 60eaa019 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tracing updates from Steven Rostedt:
 "This pull request has a new feature to ftrace, namely the trace event
  triggers by Tom Zanussi.  A trigger is a way to enable an action when
  an event is hit.  The actions are:

   o  trace on/off - enable or disable tracing
   o  snapshot     - save the current trace buffer in the snapshot
   o  stacktrace   - dump the current stack trace to the ringbuffer
   o  enable/disable events - enable or disable another event

  Namhyung Kim added updates to the tracing uprobes code.  Having the
  uprobes add support for fetch methods.

  The rest are various bug fixes with the new code, and minor ones for
  the old code"

* tag 'trace-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (38 commits)
  tracing: Fix buggered tee(2) on tracing_pipe
  tracing: Have trace buffer point back to trace_array
  ftrace: Fix synchronization location disabling and freeing ftrace_ops
  ftrace: Have function graph only trace based on global_ops filters
  ftrace: Synchronize setting function_trace_op with ftrace_trace_function
  tracing: Show available event triggers when no trigger is set
  tracing: Consolidate event trigger code
  tracing: Fix counter for traceon/off event triggers
  tracing: Remove double-underscore naming in syscall trigger invocations
  tracing/kprobes: Add trace event trigger invocations
  tracing/probes: Fix build break on !CONFIG_KPROBE_EVENT
  tracing/uprobes: Add @+file_offset fetch method
  uprobes: Allocate ->utask before handler_chain() for tracing handlers
  tracing/uprobes: Add support for full argument access methods
  tracing/uprobes: Fetch args before reserving a ring buffer
  tracing/uprobes: Pass 'is_return' to traceprobe_parse_probe_arg()
  tracing/probes: Implement 'memory' fetch method for uprobes
  tracing/probes: Add fetch{,_size} member into deref fetch method
  tracing/probes: Move 'symbol' fetch method to kprobes
  tracing/probes: Implement 'stack' fetch method for uprobes
  ...
parents df32e43a 92fdd98c
Loading
Loading
Loading
Loading
+207 −0
Original line number Original line Diff line number Diff line
@@ -287,3 +287,210 @@ their old filters):
prev_pid == 0
prev_pid == 0
# cat sched_wakeup/filter
# cat sched_wakeup/filter
common_pid == 0
common_pid == 0

6. Event triggers
=================

Trace events can be made to conditionally invoke trigger 'commands'
which can take various forms and are described in detail below;
examples would be enabling or disabling other trace events or invoking
a stack trace whenever the trace event is hit.  Whenever a trace event
with attached triggers is invoked, the set of trigger commands
associated with that event is invoked.  Any given trigger can
additionally have an event filter of the same form as described in
section 5 (Event filtering) associated with it - the command will only
be invoked if the event being invoked passes the associated filter.
If no filter is associated with the trigger, it always passes.

Triggers are added to and removed from a particular event by writing
trigger expressions to the 'trigger' file for the given event.

A given event can have any number of triggers associated with it,
subject to any restrictions that individual commands may have in that
regard.

Event triggers are implemented on top of "soft" mode, which means that
whenever a trace event has one or more triggers associated with it,
the event is activated even if it isn't actually enabled, but is
disabled in a "soft" mode.  That is, the tracepoint will be called,
but just will not be traced, unless of course it's actually enabled.
This scheme allows triggers to be invoked even for events that aren't
enabled, and also allows the current event filter implementation to be
used for conditionally invoking triggers.

The syntax for event triggers is roughly based on the syntax for
set_ftrace_filter 'ftrace filter commands' (see the 'Filter commands'
section of Documentation/trace/ftrace.txt), but there are major
differences and the implementation isn't currently tied to it in any
way, so beware about making generalizations between the two.

6.1 Expression syntax
---------------------

Triggers are added by echoing the command to the 'trigger' file:

  # echo 'command[:count] [if filter]' > trigger

Triggers are removed by echoing the same command but starting with '!'
to the 'trigger' file:

  # echo '!command[:count] [if filter]' > trigger

The [if filter] part isn't used in matching commands when removing, so
leaving that off in a '!' command will accomplish the same thing as
having it in.

The filter syntax is the same as that described in the 'Event
filtering' section above.

For ease of use, writing to the trigger file using '>' currently just
adds or removes a single trigger and there's no explicit '>>' support
('>' actually behaves like '>>') or truncation support to remove all
triggers (you have to use '!' for each one added.)

6.2 Supported trigger commands
------------------------------

The following commands are supported:

- enable_event/disable_event

  These commands can enable or disable another trace event whenever
  the triggering event is hit.  When these commands are registered,
  the other trace event is activated, but disabled in a "soft" mode.
  That is, the tracepoint will be called, but just will not be traced.
  The event tracepoint stays in this mode as long as there's a trigger
  in effect that can trigger it.

  For example, the following trigger causes kmalloc events to be
  traced when a read system call is entered, and the :1 at the end
  specifies that this enablement happens only once:

  # echo 'enable_event:kmem:kmalloc:1' > \
      /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger

  The following trigger causes kmalloc events to stop being traced
  when a read system call exits.  This disablement happens on every
  read system call exit:

  # echo 'disable_event:kmem:kmalloc' > \
      /sys/kernel/debug/tracing/events/syscalls/sys_exit_read/trigger

  The format is:

      enable_event:<system>:<event>[:count]
      disable_event:<system>:<event>[:count]

  To remove the above commands:

  # echo '!enable_event:kmem:kmalloc:1' > \
      /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger

  # echo '!disable_event:kmem:kmalloc' > \
      /sys/kernel/debug/tracing/events/syscalls/sys_exit_read/trigger

  Note that there can be any number of enable/disable_event triggers
  per triggering event, but there can only be one trigger per
  triggered event. e.g. sys_enter_read can have triggers enabling both
  kmem:kmalloc and sched:sched_switch, but can't have two kmem:kmalloc
  versions such as kmem:kmalloc and kmem:kmalloc:1 or 'kmem:kmalloc if
  bytes_req == 256' and 'kmem:kmalloc if bytes_alloc == 256' (they
  could be combined into a single filter on kmem:kmalloc though).

- stacktrace

  This command dumps a stacktrace in the trace buffer whenever the
  triggering event occurs.

  For example, the following trigger dumps a stacktrace every time the
  kmalloc tracepoint is hit:

  # echo 'stacktrace' > \
        /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger

  The following trigger dumps a stacktrace the first 5 times a kmalloc
  request happens with a size >= 64K

  # echo 'stacktrace:5 if bytes_req >= 65536' > \
        /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger

  The format is:

      stacktrace[:count]

  To remove the above commands:

  # echo '!stacktrace' > \
        /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger

  # echo '!stacktrace:5 if bytes_req >= 65536' > \
        /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger

  The latter can also be removed more simply by the following (without
  the filter):

  # echo '!stacktrace:5' > \
        /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger

  Note that there can be only one stacktrace trigger per triggering
  event.

- snapshot

  This command causes a snapshot to be triggered whenever the
  triggering event occurs.

  The following command creates a snapshot every time a block request
  queue is unplugged with a depth > 1.  If you were tracing a set of
  events or functions at the time, the snapshot trace buffer would
  capture those events when the trigger event occured:

  # echo 'snapshot if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  To only snapshot once:

  # echo 'snapshot:1 if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  To remove the above commands:

  # echo '!snapshot if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  # echo '!snapshot:1 if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  Note that there can be only one snapshot trigger per triggering
  event.

- traceon/traceoff

  These commands turn tracing on and off when the specified events are
  hit. The parameter determines how many times the tracing system is
  turned on and off. If unspecified, there is no limit.

  The following command turns tracing off the first time a block
  request queue is unplugged with a depth > 1.  If you were tracing a
  set of events or functions at the time, you could then examine the
  trace buffer to see the sequence of events that led up to the
  trigger event:

  # echo 'traceoff:1 if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  To always disable tracing when nr_rq  > 1 :

  # echo 'traceoff if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  To remove the above commands:

  # echo '!traceoff:1 if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  # echo '!traceoff if nr_rq > 1' > \
        /sys/kernel/debug/tracing/events/block/block_unplug/trigger

  Note that there can be only one traceon or traceoff trigger per
  triggering event.
+31 −5
Original line number Original line Diff line number Diff line
@@ -19,18 +19,44 @@ user to calculate the offset of the probepoint in the object.


Synopsis of uprobe_tracer
Synopsis of uprobe_tracer
-------------------------
-------------------------
  p[:[GRP/]EVENT] PATH:SYMBOL[+offs] [FETCHARGS] : Set a uprobe
  p[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS] : Set a uprobe
  r[:[GRP/]EVENT] PATH:SYMBOL[+offs] [FETCHARGS] : Set a return uprobe (uretprobe)
  r[:[GRP/]EVENT] PATH:OFFSET [FETCHARGS] : Set a return uprobe (uretprobe)
  -:[GRP/]EVENT                           : Clear uprobe or uretprobe event
  -:[GRP/]EVENT                           : Clear uprobe or uretprobe event


  GRP           : Group name. If omitted, "uprobes" is the default value.
  GRP           : Group name. If omitted, "uprobes" is the default value.
  EVENT         : Event name. If omitted, the event name is generated based
  EVENT         : Event name. If omitted, the event name is generated based
                  on SYMBOL+offs.
                  on PATH+OFFSET.
  PATH          : Path to an executable or a library.
  PATH          : Path to an executable or a library.
  SYMBOL[+offs] : Symbol+offset where the probe is inserted.
  OFFSET        : Offset where the probe is inserted.


  FETCHARGS     : Arguments. Each probe can have up to 128 args.
  FETCHARGS     : Arguments. Each probe can have up to 128 args.
   %REG         : Fetch register REG
   %REG         : Fetch register REG
   @ADDR	: Fetch memory at ADDR (ADDR should be in userspace)
   @+OFFSET	: Fetch memory at OFFSET (OFFSET from same file as PATH)
   $stackN	: Fetch Nth entry of stack (N >= 0)
   $stack	: Fetch stack address.
   $retval	: Fetch return value.(*)
   +|-offs(FETCHARG) : Fetch memory at FETCHARG +|- offs address.(**)
   NAME=FETCHARG     : Set NAME as the argument name of FETCHARG.
   FETCHARG:TYPE     : Set TYPE as the type of FETCHARG. Currently, basic types
		       (u8/u16/u32/u64/s8/s16/s32/s64), "string" and bitfield
		       are supported.

  (*) only for return probe.
  (**) this is useful for fetching a field of data structures.

Types
-----
Several types are supported for fetch-args. Uprobe tracer will access memory
by given type. Prefix 's' and 'u' means those types are signed and unsigned
respectively. Traced arguments are shown in decimal (signed) or hex (unsigned).
String type is a special type, which fetches a "null-terminated" string from
user space.
Bitfield is another special type, which takes 3 parameters, bit-width, bit-
offset, and container-size (usually 32). The syntax is;

 b<bit-width>@<bit-offset>/<container-size>



Event Profiling
Event Profiling
---------------
---------------
+0 −2
Original line number Original line Diff line number Diff line
@@ -570,8 +570,6 @@ 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 */


loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence);

/* totally disable ftrace - can not re-enable after this */
/* totally disable ftrace - can not re-enable after this */
void ftrace_kill(void);
void ftrace_kill(void);


+139 −0
Original line number Original line Diff line number Diff line

#ifndef _LINUX_FTRACE_EVENT_H
#ifndef _LINUX_FTRACE_EVENT_H
#define _LINUX_FTRACE_EVENT_H
#define _LINUX_FTRACE_EVENT_H


@@ -264,6 +265,8 @@ enum {
	FTRACE_EVENT_FL_NO_SET_FILTER_BIT,
	FTRACE_EVENT_FL_NO_SET_FILTER_BIT,
	FTRACE_EVENT_FL_SOFT_MODE_BIT,
	FTRACE_EVENT_FL_SOFT_MODE_BIT,
	FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
	FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
	FTRACE_EVENT_FL_TRIGGER_MODE_BIT,
	FTRACE_EVENT_FL_TRIGGER_COND_BIT,
};
};


/*
/*
@@ -275,6 +278,8 @@ enum {
 *  SOFT_MODE     - The event is enabled/disabled by SOFT_DISABLED
 *  SOFT_MODE     - The event is enabled/disabled by SOFT_DISABLED
 *  SOFT_DISABLED - When set, do not trace the event (even though its
 *  SOFT_DISABLED - When set, do not trace the event (even though its
 *                   tracepoint may be enabled)
 *                   tracepoint may be enabled)
 *  TRIGGER_MODE  - When set, invoke the triggers associated with the event
 *  TRIGGER_COND  - When set, one or more triggers has an associated filter
 */
 */
enum {
enum {
	FTRACE_EVENT_FL_ENABLED		= (1 << FTRACE_EVENT_FL_ENABLED_BIT),
	FTRACE_EVENT_FL_ENABLED		= (1 << FTRACE_EVENT_FL_ENABLED_BIT),
@@ -283,6 +288,8 @@ enum {
	FTRACE_EVENT_FL_NO_SET_FILTER	= (1 << FTRACE_EVENT_FL_NO_SET_FILTER_BIT),
	FTRACE_EVENT_FL_NO_SET_FILTER	= (1 << FTRACE_EVENT_FL_NO_SET_FILTER_BIT),
	FTRACE_EVENT_FL_SOFT_MODE	= (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT),
	FTRACE_EVENT_FL_SOFT_MODE	= (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT),
	FTRACE_EVENT_FL_SOFT_DISABLED	= (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT),
	FTRACE_EVENT_FL_SOFT_DISABLED	= (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT),
	FTRACE_EVENT_FL_TRIGGER_MODE	= (1 << FTRACE_EVENT_FL_TRIGGER_MODE_BIT),
	FTRACE_EVENT_FL_TRIGGER_COND	= (1 << FTRACE_EVENT_FL_TRIGGER_COND_BIT),
};
};


struct ftrace_event_file {
struct ftrace_event_file {
@@ -292,6 +299,7 @@ struct ftrace_event_file {
	struct dentry			*dir;
	struct dentry			*dir;
	struct trace_array		*tr;
	struct trace_array		*tr;
	struct ftrace_subsystem_dir	*system;
	struct ftrace_subsystem_dir	*system;
	struct list_head		triggers;


	/*
	/*
	 * 32 bit flags:
	 * 32 bit flags:
@@ -299,6 +307,7 @@ struct ftrace_event_file {
	 *   bit 1:		enabled cmd record
	 *   bit 1:		enabled cmd record
	 *   bit 2:		enable/disable with the soft disable bit
	 *   bit 2:		enable/disable with the soft disable bit
	 *   bit 3:		soft disabled
	 *   bit 3:		soft disabled
	 *   bit 4:		trigger enabled
	 *
	 *
	 * Note: The bits must be set atomically to prevent races
	 * Note: The bits must be set atomically to prevent races
	 * from other writers. Reads of flags do not need to be in
	 * from other writers. Reads of flags do not need to be in
@@ -310,6 +319,7 @@ struct ftrace_event_file {
	 */
	 */
	unsigned long		flags;
	unsigned long		flags;
	atomic_t		sm_ref;	/* soft-mode reference counter */
	atomic_t		sm_ref;	/* soft-mode reference counter */
	atomic_t		tm_ref;	/* trigger-mode reference counter */
};
};


#define __TRACE_EVENT_FLAGS(name, value)				\
#define __TRACE_EVENT_FLAGS(name, value)				\
@@ -337,6 +347,14 @@ struct ftrace_event_file {


#define MAX_FILTER_STR_VAL	256	/* Should handle KSYM_SYMBOL_LEN */
#define MAX_FILTER_STR_VAL	256	/* Should handle KSYM_SYMBOL_LEN */


enum event_trigger_type {
	ETT_NONE		= (0),
	ETT_TRACE_ONOFF		= (1 << 0),
	ETT_SNAPSHOT		= (1 << 1),
	ETT_STACKTRACE		= (1 << 2),
	ETT_EVENT_ENABLE	= (1 << 3),
};

extern void destroy_preds(struct ftrace_event_file *file);
extern void destroy_preds(struct ftrace_event_file *file);
extern void destroy_call_preds(struct ftrace_event_call *call);
extern void destroy_call_preds(struct ftrace_event_call *call);
extern int filter_match_preds(struct event_filter *filter, void *rec);
extern int filter_match_preds(struct event_filter *filter, void *rec);
@@ -347,6 +365,127 @@ extern int filter_check_discard(struct ftrace_event_file *file, void *rec,
extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec,
extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec,
				     struct ring_buffer *buffer,
				     struct ring_buffer *buffer,
				     struct ring_buffer_event *event);
				     struct ring_buffer_event *event);
extern enum event_trigger_type event_triggers_call(struct ftrace_event_file *file,
						   void *rec);
extern void event_triggers_post_call(struct ftrace_event_file *file,
				     enum event_trigger_type tt);

/**
 * ftrace_trigger_soft_disabled - do triggers and test if soft disabled
 * @file: The file pointer of the event to test
 *
 * If any triggers without filters are attached to this event, they
 * will be called here. If the event is soft disabled and has no
 * triggers that require testing the fields, it will return true,
 * otherwise false.
 */
static inline bool
ftrace_trigger_soft_disabled(struct ftrace_event_file *file)
{
	unsigned long eflags = file->flags;

	if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
		if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
			event_triggers_call(file, NULL);
		if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
			return true;
	}
	return false;
}

/*
 * Helper function for event_trigger_unlock_commit{_regs}().
 * If there are event triggers attached to this event that requires
 * filtering against its fields, then they wil be called as the
 * entry already holds the field information of the current event.
 *
 * It also checks if the event should be discarded or not.
 * It is to be discarded if the event is soft disabled and the
 * event was only recorded to process triggers, or if the event
 * filter is active and this event did not match the filters.
 *
 * Returns true if the event is discarded, false otherwise.
 */
static inline bool
__event_trigger_test_discard(struct ftrace_event_file *file,
			     struct ring_buffer *buffer,
			     struct ring_buffer_event *event,
			     void *entry,
			     enum event_trigger_type *tt)
{
	unsigned long eflags = file->flags;

	if (eflags & FTRACE_EVENT_FL_TRIGGER_COND)
		*tt = event_triggers_call(file, entry);

	if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags))
		ring_buffer_discard_commit(buffer, event);
	else if (!filter_check_discard(file, entry, buffer, event))
		return false;

	return true;
}

/**
 * event_trigger_unlock_commit - handle triggers and finish event commit
 * @file: The file pointer assoctiated to the event
 * @buffer: The ring buffer that the event is being written to
 * @event: The event meta data in the ring buffer
 * @entry: The event itself
 * @irq_flags: The state of the interrupts at the start of the event
 * @pc: The state of the preempt count at the start of the event.
 *
 * This is a helper function to handle triggers that require data
 * from the event itself. It also tests the event against filters and
 * if the event is soft disabled and should be discarded.
 */
static inline void
event_trigger_unlock_commit(struct ftrace_event_file *file,
			    struct ring_buffer *buffer,
			    struct ring_buffer_event *event,
			    void *entry, unsigned long irq_flags, int pc)
{
	enum event_trigger_type tt = ETT_NONE;

	if (!__event_trigger_test_discard(file, buffer, event, entry, &tt))
		trace_buffer_unlock_commit(buffer, event, irq_flags, pc);

	if (tt)
		event_triggers_post_call(file, tt);
}

/**
 * event_trigger_unlock_commit_regs - handle triggers and finish event commit
 * @file: The file pointer assoctiated to the event
 * @buffer: The ring buffer that the event is being written to
 * @event: The event meta data in the ring buffer
 * @entry: The event itself
 * @irq_flags: The state of the interrupts at the start of the event
 * @pc: The state of the preempt count at the start of the event.
 *
 * This is a helper function to handle triggers that require data
 * from the event itself. It also tests the event against filters and
 * if the event is soft disabled and should be discarded.
 *
 * Same as event_trigger_unlock_commit() but calls
 * trace_buffer_unlock_commit_regs() instead of trace_buffer_unlock_commit().
 */
static inline void
event_trigger_unlock_commit_regs(struct ftrace_event_file *file,
				 struct ring_buffer *buffer,
				 struct ring_buffer_event *event,
				 void *entry, unsigned long irq_flags, int pc,
				 struct pt_regs *regs)
{
	enum event_trigger_type tt = ETT_NONE;

	if (!__event_trigger_test_discard(file, buffer, event, entry, &tt))
		trace_buffer_unlock_commit_regs(buffer, event,
						irq_flags, pc, regs);

	if (tt)
		event_triggers_post_call(file, tt);
}


enum {
enum {
	FILTER_OTHER = 0,
	FILTER_OTHER = 0,
+21 −8
Original line number Original line Diff line number Diff line
@@ -418,6 +418,8 @@ static inline notrace int ftrace_get_offsets_##call( \
 *	struct ftrace_event_file *ftrace_file = __data;
 *	struct ftrace_event_file *ftrace_file = __data;
 *	struct ftrace_event_call *event_call = ftrace_file->event_call;
 *	struct ftrace_event_call *event_call = ftrace_file->event_call;
 *	struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
 *	struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
 *	unsigned long eflags = ftrace_file->flags;
 *	enum event_trigger_type __tt = ETT_NONE;
 *	struct ring_buffer_event *event;
 *	struct ring_buffer_event *event;
 *	struct ftrace_raw_<call> *entry; <-- defined in stage 1
 *	struct ftrace_raw_<call> *entry; <-- defined in stage 1
 *	struct ring_buffer *buffer;
 *	struct ring_buffer *buffer;
@@ -425,9 +427,12 @@ static inline notrace int ftrace_get_offsets_##call( \
 *	int __data_size;
 *	int __data_size;
 *	int pc;
 *	int pc;
 *
 *
 *	if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
 *	if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
 *		     &ftrace_file->flags))
 *		if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
 *			event_triggers_call(ftrace_file, NULL);
 *		if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
 *			return;
 *			return;
 *	}
 *
 *
 *	local_save_flags(irq_flags);
 *	local_save_flags(irq_flags);
 *	pc = preempt_count();
 *	pc = preempt_count();
@@ -445,8 +450,17 @@ static inline notrace int ftrace_get_offsets_##call( \
 *	{ <assign>; }  <-- Here we assign the entries by the __field and
 *	{ <assign>; }  <-- Here we assign the entries by the __field and
 *			   __array macros.
 *			   __array macros.
 *
 *
 *	if (!filter_check_discard(ftrace_file, entry, buffer, event))
 *	if (eflags & FTRACE_EVENT_FL_TRIGGER_COND)
 *		__tt = event_triggers_call(ftrace_file, entry);
 *
 *	if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
 *		     &ftrace_file->flags))
 *		ring_buffer_discard_commit(buffer, event);
 *	else if (!filter_check_discard(ftrace_file, entry, buffer, event))
 *		trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
 *		trace_buffer_unlock_commit(buffer, event, irq_flags, pc);
 *
 *	if (__tt)
 *		event_triggers_post_call(ftrace_file, __tt);
 * }
 * }
 *
 *
 * static struct trace_event ftrace_event_type_<call> = {
 * static struct trace_event ftrace_event_type_<call> = {
@@ -539,8 +553,7 @@ ftrace_raw_event_##call(void *__data, proto) \
	int __data_size;						\
	int __data_size;						\
	int pc;								\
	int pc;								\
									\
									\
	if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT,			\
	if (ftrace_trigger_soft_disabled(ftrace_file))			\
		     &ftrace_file->flags))				\
		return;							\
		return;							\
									\
									\
	local_save_flags(irq_flags);					\
	local_save_flags(irq_flags);					\
@@ -560,8 +573,8 @@ ftrace_raw_event_##call(void *__data, proto) \
									\
									\
	{ assign; }							\
	{ assign; }							\
									\
									\
	if (!filter_check_discard(ftrace_file, entry, buffer, event))	\
	event_trigger_unlock_commit(ftrace_file, buffer, event, entry, \
		trace_buffer_unlock_commit(buffer, event, irq_flags, pc); \
				    irq_flags, pc);		       \
}
}
/*
/*
 * The ftrace_test_probe is compiled out, it is only here as a build time check
 * The ftrace_test_probe is compiled out, it is only here as a build time check
Loading