Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
trace.h File Reference
#include <linux/fs.h>
#include <linux/atomic.h>
#include <linux/sched.h>
#include <linux/clocksource.h>
#include <linux/ring_buffer.h>
#include <linux/mmiotrace.h>
#include <linux/tracepoint.h>
#include <linux/ftrace.h>
#include <linux/hw_breakpoint.h>
#include <linux/trace_seq.h>
#include <linux/ftrace_event.h>
#include "trace_entries.h"

Go to the source code of this file.

Data Structures

struct  syscall_trace_enter
 
struct  syscall_trace_exit
 
struct  kprobe_trace_entry_head
 
struct  kretprobe_trace_entry_head
 
struct  uprobe_trace_entry_head
 
struct  trace_array_cpu
 
struct  trace_array
 
struct  tracer_opt
 
struct  tracer_flags
 
struct  tracer
 
struct  trace_parser
 
struct  ftrace_event_field
 
struct  event_filter
 
struct  event_subsystem
 
struct  regex
 
struct  filter_pred
 

Macros

#define __field(type, item)   type item;
 
#define __field_struct(type, item)   __field(type, item)
 
#define __field_desc(type, container, item)
 
#define __array(type, item, size)   type item[size];
 
#define __array_desc(type, container, item, size)
 
#define __dynamic_array(type, item)   type item[];
 
#define F_STRUCT(args...)   args
 
#define TP_ARGS(args...)   args
 
#define FTRACE_ENTRY_REG(name, struct_name, id, tstruct, print, filter, regfn)
 
#define TRACE_BUF_SIZE   1024
 
#define FTRACE_CMP_TYPE(var, type)   __builtin_types_compatible_p(typeof(var), type *)
 
#define IF_ASSIGN(var, entry, etype, id)
 
#define trace_assign_type(var, ent)
 
#define TRACER_OPT(s, b)   .name = #s, .bit = b
 

Enumerations

enum  trace_type {
  __TRACE_FIRST_TYPE = 0, TRACE_FN, TRACE_CTX, TRACE_WAKE,
  TRACE_STACK, TRACE_PRINT, TRACE_BPRINT, TRACE_MMIO_RW,
  TRACE_MMIO_MAP, TRACE_BRANCH, TRACE_GRAPH_RET, TRACE_GRAPH_ENT,
  TRACE_USER_STACK, TRACE_BLK, __TRACE_LAST_TYPE
}
 
enum  trace_flag_type {
  TRACE_FLAG_IRQS_OFF = 0x01, TRACE_FLAG_IRQS_NOSUPPORT = 0x02, TRACE_FLAG_NEED_RESCHED = 0x04, TRACE_FLAG_HARDIRQ = 0x08,
  TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_IRQS_OFF = 0x01, TRACE_FLAG_IRQS_NOSUPPORT = 0x02, TRACE_FLAG_NEED_RESCHED = 0x04,
  TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_IRQS_OFF = 0x01, TRACE_FLAG_IRQS_NOSUPPORT = 0x02,
  TRACE_FLAG_NEED_RESCHED = 0x04, TRACE_FLAG_HARDIRQ = 0x08, TRACE_FLAG_SOFTIRQ = 0x10
}
 

Functions

void __ftrace_bad_type (void)
 

: the name chosen to select it on the available_tracers file

struct tracer - a specific tracer and its callbacks to interact with debugfs

: called when one switches to this tracer (echo name > current_tracer) : called when one switches to another tracer : called when tracing is unpaused (echo 1 > tracing_enabled) : called when tracing is paused (echo 0 > tracing_enabled) : called when the trace file is opened : called when the trace_pipe file is opened : override how the user waits for traces on trace_pipe : called when the trace file is released : called when the trace_pipe file is released : override the default read callback on trace_pipe : override the default splice_read callback on trace_pipe : selftest to run on boot (see trace_selftest.c) : override the first lines that describe your columns : callback that prints a trace : signals one of your private flags changed (trace_options file) : your private flags

#define FTRACE_ENTRY(name, struct_name, id, tstruct, print, filter)
 
#define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk, filter)
 
#define trace_recursion_inc()   do { (current)->trace_recursion++; } while (0)
 
#define trace_recursion_dec()   do { (current)->trace_recursion--; } while (0)
 
#define trace_recursion_buffer()   ((current)->trace_recursion & 0x3ff)
 
#define TRACE_INTERNAL_BIT   (1<<11)
 
#define TRACE_GLOBAL_BIT   (1<<12)
 
#define TRACE_CONTROL_BIT   (1<<13)
 
#define TRACE_IRQ_BIT   (1<<13)
 
#define trace_recursion_set(bit)   do { (current)->trace_recursion |= (bit); } while (0)
 
#define trace_recursion_clear(bit)   do { (current)->trace_recursion &= ~(bit); } while (0)
 
#define trace_recursion_test(bit)   ((current)->trace_recursion & (bit))
 
#define TRACE_PIPE_ALL_CPU   -1
 
#define for_each_tracing_cpu(cpu)   for_each_cpu(cpu, tracing_buffer_mask)
 
#define DYN_FTRACE_TEST_NAME   trace_selftest_dynamic_test_func
 
#define DYN_FTRACE_TEST_NAME2   trace_selftest_dynamic_test_func2
 
#define TRACE_ITER_SYM_MASK   (TRACE_ITER_PRINT_PARENT|TRACE_ITER_SYM_OFFSET|TRACE_ITER_SYM_ADDR)
 
#define FILTER_PRED_INVALID   ((unsigned short)-1)
 
#define FILTER_PRED_IS_RIGHT   (1 << 15)
 
#define FILTER_PRED_FOLD   (1 << 15)
 
#define MAX_FILTER_PRED   16384
 
#define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter)
 
#define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print, filter)
 
#define perf_ftrace_event_register   NULL
 
enum  trace_file_type { TRACE_FILE_LAT_FMT = 1, TRACE_FILE_ANNOTATE = 2 }
 
enum  trace_iterator_flags {
  TRACE_ITER_PRINT_PARENT = 0x01, TRACE_ITER_SYM_OFFSET = 0x02, TRACE_ITER_SYM_ADDR = 0x04, TRACE_ITER_VERBOSE = 0x08,
  TRACE_ITER_RAW = 0x10, TRACE_ITER_HEX = 0x20, TRACE_ITER_BIN = 0x40, TRACE_ITER_BLOCK = 0x80,
  TRACE_ITER_STACKTRACE = 0x100, TRACE_ITER_PRINTK = 0x200, TRACE_ITER_PREEMPTONLY = 0x400, TRACE_ITER_BRANCH = 0x800,
  TRACE_ITER_ANNOTATE = 0x1000, TRACE_ITER_USERSTACKTRACE = 0x2000, TRACE_ITER_SYM_USEROBJ = 0x4000, TRACE_ITER_PRINTK_MSGONLY = 0x8000,
  TRACE_ITER_CONTEXT_INFO = 0x10000, TRACE_ITER_LATENCY_FMT = 0x20000, TRACE_ITER_SLEEP_TIME = 0x40000, TRACE_ITER_GRAPH_TIME = 0x80000,
  TRACE_ITER_RECORD_CMD = 0x100000, TRACE_ITER_OVERWRITE = 0x200000, TRACE_ITER_STOP_ON_FREE = 0x400000, TRACE_ITER_IRQ_INFO = 0x800000,
  TRACE_ITER_MARKERS = 0x1000000
}
 
enum  { TRACE_EVENT_TYPE_PRINTF = 1, TRACE_EVENT_TYPE_RAW = 2 }
 
enum  regex_type { MATCH_FULL = 0, MATCH_FRONT_ONLY, MATCH_MIDDLE_ONLY, MATCH_END_ONLY }
 
typedef int(* filter_pred_fn_t )(struct filter_pred *pred, void *event)
 
typedef int(* regex_match_func )(char *str, struct regex *r, int len)
 
cpumask_var_t __read_mostly tracing_buffer_mask
 
unsigned long tracing_thresh
 
int ring_buffer_expanded
 
bool tracing_selftest_disabled
 
unsigned long trace_flags
 
int trace_clock_id
 
struct list_head ftrace_pids
 
struct tracer nop_trace
 
struct list_head ftrace_common_fields
 
struct mutex event_mutex
 
struct list_head ftrace_events
 
const char__start___trace_bprintk_fmt []
 
const char__stop___trace_bprintk_fmt []
 
int tracer_init (struct tracer *t, struct trace_array *tr)
 
int tracing_is_enabled (void)
 
void trace_wake_up (void)
 
void tracing_reset (struct trace_array *tr, int cpu)
 
void tracing_reset_online_cpus (struct trace_array *tr)
 
void tracing_reset_current (int cpu)
 
void tracing_reset_current_online_cpus (void)
 
int tracing_open_generic (struct inode *inode, struct file *filp)
 
struct dentrytrace_create_file (const char *name, umode_t mode, struct dentry *parent, void *data, const struct file_operations *fops)
 
struct dentrytracing_init_dentry (void)
 
struct ring_buffer_eventtrace_buffer_lock_reserve (struct ring_buffer *buffer, int type, unsigned long len, unsigned long flags, int pc)
 
void trace_buffer_unlock_commit (struct ring_buffer *buffer, struct ring_buffer_event *event, unsigned long flags, int pc)
 
struct trace_entrytracing_get_trace_entry (struct trace_array *tr, struct trace_array_cpu *data)
 
struct trace_entrytrace_find_next_entry (struct trace_iterator *iter, int *ent_cpu, u64 *ent_ts)
 
int trace_empty (struct trace_iterator *iter)
 
voidtrace_find_next_entry_inc (struct trace_iterator *iter)
 
void trace_init_global_iter (struct trace_iterator *iter)
 
void tracing_iter_reset (struct trace_iterator *iter, int cpu)
 
void default_wait_pipe (struct trace_iterator *iter)
 
void poll_wait_pipe (struct trace_iterator *iter)
 
void ftrace (struct trace_array *tr, struct trace_array_cpu *data, unsigned long ip, unsigned long parent_ip, unsigned long flags, int pc)
 
void tracing_sched_switch_trace (struct trace_array *tr, struct task_struct *prev, struct task_struct *next, unsigned long flags, int pc)
 
void tracing_sched_wakeup_trace (struct trace_array *tr, struct task_struct *wakee, struct task_struct *cur, unsigned long flags, int pc)
 
void trace_function (struct trace_array *tr, unsigned long ip, unsigned long parent_ip, unsigned long flags, int pc)
 
void trace_graph_function (struct trace_array *tr, unsigned long ip, unsigned long parent_ip, unsigned long flags, int pc)
 
void trace_latency_header (struct seq_file *m)
 
void trace_default_header (struct seq_file *m)
 
void print_trace_header (struct seq_file *m, struct trace_iterator *iter)
 
void trace_graph_return (struct ftrace_graph_ret *trace)
 
int trace_graph_entry (struct ftrace_graph_ent *trace)
 
void set_graph_array (struct trace_array *tr)
 
void tracing_start_cmdline_record (void)
 
void tracing_stop_cmdline_record (void)
 
void tracing_sched_switch_assign_trace (struct trace_array *tr)
 
void tracing_stop_sched_switch_record (void)
 
void tracing_start_sched_switch_record (void)
 
int register_tracer (struct tracer *type)
 
void unregister_tracer (struct tracer *type)
 
int is_tracing_stopped (void)
 
unsigned long nsecs_to_usecs (unsigned long nsecs)
 
cycle_t ftrace_now (int cpu)
 
void trace_find_cmdline (int pid, char comm[])
 
int DYN_FTRACE_TEST_NAME (void)
 
int DYN_FTRACE_TEST_NAME2 (void)
 
 DECLARE_PER_CPU (int, ftrace_cpu_disabled)
 
voidhead_page (struct trace_array_cpu *data)
 
unsigned long long ns2usecs (cycle_t nsec)
 
int trace_vbprintk (unsigned long ip, const char *fmt, va_list args)
 
int trace_vprintk (unsigned long ip, const char *fmt, va_list args)
 
int trace_array_vprintk (struct trace_array *tr, unsigned long ip, const char *fmt, va_list args)
 
int trace_array_printk (struct trace_array *tr, unsigned long ip, const char *fmt,...)
 
void trace_printk_seq (struct trace_seq *s)
 
enum print_line_t print_trace_line (struct trace_iterator *iter)
 
int ftrace_event_is_function (struct ftrace_event_call *call)
 
int trace_parser_get_init (struct trace_parser *parser, int size)
 
void trace_parser_put (struct trace_parser *parser)
 
int trace_get_user (struct trace_parser *parser, const char __user *ubuf, size_t cnt, loff_t *ppos)
 
int tracing_update_buffers (void)
 
enum regex_type filter_parse_regex (char *buff, int len, char **search, int *not)
 
void print_event_filter (struct ftrace_event_call *call, struct trace_seq *s)
 
int apply_event_filter (struct ftrace_event_call *call, char *filter_string)
 
int apply_subsystem_event_filter (struct event_subsystem *system, char *filter_string)
 
void print_subsystem_event_filter (struct event_subsystem *system, struct trace_seq *s)
 
int filter_assign_type (const char *type)
 
struct list_headtrace_get_fields (struct ftrace_event_call *event_call)
 
void trace_event_enable_cmd_record (bool enable)
 
void trace_printk_init_buffers (void)
 

Macro Definition Documentation

#define __array (   type,
  item,
  size 
)    type item[size];

Definition at line 47 of file trace.h.

#define __array_desc (   type,
  container,
  item,
  size 
)

Definition at line 50 of file trace.h.

#define __dynamic_array (   type,
  item 
)    type item[];

Definition at line 53 of file trace.h.

#define __field (   type,
  item 
)    type item;

Definition at line 38 of file trace.h.

#define __field_desc (   type,
  container,
  item 
)

Definition at line 44 of file trace.h.

#define __field_struct (   type,
  item 
)    __field(type, item)

Definition at line 41 of file trace.h.

#define DYN_FTRACE_TEST_NAME   trace_selftest_dynamic_test_func

Definition at line 476 of file trace.h.

#define DYN_FTRACE_TEST_NAME2   trace_selftest_dynamic_test_func2

Definition at line 478 of file trace.h.

#define F_STRUCT (   args...)    args

Definition at line 56 of file trace.h.

#define FILTER_PRED_FOLD   (1 << 15)

Definition at line 757 of file trace.h.

#define FILTER_PRED_INVALID   ((unsigned short)-1)

Definition at line 755 of file trace.h.

#define FILTER_PRED_IS_RIGHT   (1 << 15)

Definition at line 756 of file trace.h.

#define for_each_tracing_cpu (   cpu)    for_each_cpu(cpu, tracing_buffer_mask)

Definition at line 419 of file trace.h.

#define FTRACE_CMP_TYPE (   var,
  type 
)    __builtin_types_compatible_p(typeof(var), type *)

Definition at line 168 of file trace.h.

#define FTRACE_ENTRY (   name,
  struct_name,
  id,
  tstruct,
  print,
  filter 
)
Value:
struct struct_name { \
tstruct \
}

Definition at line 846 of file trace.h.

#define FTRACE_ENTRY (   call,
  struct_name,
  id,
  tstruct,
  print,
  filter 
)
Value:
extern struct ftrace_event_call \
__attribute__((__aligned__(4))) event_##call;

Definition at line 846 of file trace.h.

#define FTRACE_ENTRY_DUP (   name,
  name_struct,
  id,
  tstruct,
  printk,
  filter 
)

Definition at line 850 of file trace.h.

#define FTRACE_ENTRY_DUP (   call,
  struct_name,
  id,
  tstruct,
  print,
  filter 
)
Value:
FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print), \

Definition at line 850 of file trace.h.

#define FTRACE_ENTRY_REG (   name,
  struct_name,
  id,
  tstruct,
  print,
  filter,
  regfn 
)
Value:
FTRACE_ENTRY(name, struct_name, id, PARAMS(tstruct), PARAMS(print), \

Definition at line 72 of file trace.h.

#define IF_ASSIGN (   var,
  entry,
  etype,
  id 
)
Value:
if (FTRACE_CMP_TYPE(var, etype)) { \
var = (typeof(var))(entry); \
WARN_ON(id && (entry)->type != id); \
break; \
}

Definition at line 172 of file trace.h.

#define MAX_FILTER_PRED   16384

Definition at line 766 of file trace.h.

#define perf_ftrace_event_register   NULL

Definition at line 859 of file trace.h.

#define TP_ARGS (   args...)    args

Definition at line 66 of file trace.h.

#define trace_assign_type (   var,
  ent 
)
Value:
do { \
IF_ASSIGN(var, ent, struct ftrace_entry, TRACE_FN); \
IF_ASSIGN(var, ent, struct ctx_switch_entry, 0); \
IF_ASSIGN(var, ent, struct stack_entry, TRACE_STACK); \
IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\
IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \
IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \
IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \
IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \
IF_ASSIGN(var, ent, struct trace_branch, TRACE_BRANCH); \
IF_ASSIGN(var, ent, struct ftrace_graph_ent_entry, \
IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry, \
__ftrace_bad_type(); \
} while (0)

Definition at line 195 of file trace.h.

#define TRACE_BUF_SIZE   1024

Definition at line 128 of file trace.h.

#define TRACE_CONTROL_BIT   (1<<13)

Definition at line 303 of file trace.h.

#define TRACE_GLOBAL_BIT   (1<<12)

Definition at line 302 of file trace.h.

#define TRACE_INTERNAL_BIT   (1<<11)

Definition at line 301 of file trace.h.

#define TRACE_IRQ_BIT   (1<<13)

Definition at line 312 of file trace.h.

Definition at line 690 of file trace.h.

#define TRACE_PIPE_ALL_CPU   -1

Definition at line 318 of file trace.h.

#define trace_recursion_buffer ( )    ((current)->trace_recursion & 0x3ff)

Definition at line 298 of file trace.h.

#define trace_recursion_clear (   bit)    do { (current)->trace_recursion &= ~(bit); } while (0)

Definition at line 315 of file trace.h.

#define trace_recursion_dec ( )    do { (current)->trace_recursion--; } while (0)

Definition at line 295 of file trace.h.

#define trace_recursion_inc ( )    do { (current)->trace_recursion++; } while (0)

Definition at line 294 of file trace.h.

#define trace_recursion_set (   bit)    do { (current)->trace_recursion |= (bit); } while (0)

Definition at line 314 of file trace.h.

#define trace_recursion_test (   bit)    ((current)->trace_recursion & (bit))

Definition at line 316 of file trace.h.

#define TRACER_OPT (   s,
  b 
)    .name = #s, .bit = b

Definition at line 235 of file trace.h.

Typedef Documentation

typedef int(* filter_pred_fn_t)(struct filter_pred *pred, void *event)

Definition at line 771 of file trace.h.

typedef int(* regex_match_func)(char *str, struct regex *r, int len)

Definition at line 773 of file trace.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
TRACE_EVENT_TYPE_PRINTF 
TRACE_EVENT_TYPE_RAW 

Definition at line 723 of file trace.h.

enum regex_type
Enumerator:
MATCH_FULL 
MATCH_FRONT_ONLY 
MATCH_MIDDLE_ONLY 
MATCH_END_ONLY 

Definition at line 775 of file trace.h.

Enumerator:
TRACE_FILE_LAT_FMT 
TRACE_FILE_ANNOTATE 

Definition at line 412 of file trace.h.

Enumerator:
TRACE_FLAG_IRQS_OFF 
TRACE_FLAG_IRQS_NOSUPPORT 
TRACE_FLAG_NEED_RESCHED 
TRACE_FLAG_HARDIRQ 
TRACE_FLAG_SOFTIRQ 
TRACE_FLAG_IRQS_OFF 
TRACE_FLAG_IRQS_NOSUPPORT 
TRACE_FLAG_NEED_RESCHED 
TRACE_FLAG_HARDIRQ 
TRACE_FLAG_SOFTIRQ 
TRACE_FLAG_IRQS_OFF 
TRACE_FLAG_IRQS_NOSUPPORT 
TRACE_FLAG_NEED_RESCHED 
TRACE_FLAG_HARDIRQ 
TRACE_FLAG_SOFTIRQ 

Definition at line 120 of file trace.h.

Enumerator:
TRACE_ITER_PRINT_PARENT 
TRACE_ITER_SYM_OFFSET 
TRACE_ITER_SYM_ADDR 
TRACE_ITER_VERBOSE 
TRACE_ITER_RAW 
TRACE_ITER_HEX 
TRACE_ITER_BIN 
TRACE_ITER_BLOCK 
TRACE_ITER_STACKTRACE 
TRACE_ITER_PRINTK 
TRACE_ITER_PREEMPTONLY 
TRACE_ITER_BRANCH 
TRACE_ITER_ANNOTATE 
TRACE_ITER_USERSTACKTRACE 
TRACE_ITER_SYM_USEROBJ 
TRACE_ITER_PRINTK_MSGONLY 
TRACE_ITER_CONTEXT_INFO 
TRACE_ITER_LATENCY_FMT 
TRACE_ITER_SLEEP_TIME 
TRACE_ITER_GRAPH_TIME 
TRACE_ITER_RECORD_CMD 
TRACE_ITER_OVERWRITE 
TRACE_ITER_STOP_ON_FREE 
TRACE_ITER_IRQ_INFO 
TRACE_ITER_MARKERS 

Definition at line 658 of file trace.h.

enum trace_type
Enumerator:
__TRACE_FIRST_TYPE 
TRACE_FN 
TRACE_CTX 
TRACE_WAKE 
TRACE_STACK 
TRACE_PRINT 
TRACE_BPRINT 
TRACE_MMIO_RW 
TRACE_MMIO_MAP 
TRACE_BRANCH 
TRACE_GRAPH_RET 
TRACE_GRAPH_ENT 
TRACE_USER_STACK 
TRACE_BLK 
__TRACE_LAST_TYPE 

Definition at line 16 of file trace.h.

Function Documentation

void __ftrace_bad_type ( void  )
int apply_event_filter ( struct ftrace_event_call call,
char filter_string 
)

Definition at line 1861 of file trace_events_filter.c.

int apply_subsystem_event_filter ( struct event_subsystem system,
char filter_string 
)

Definition at line 1910 of file trace_events_filter.c.

DECLARE_PER_CPU ( int  ,
ftrace_cpu_disabled   
)
void default_wait_pipe ( struct trace_iterator iter)

Definition at line 3389 of file trace.c.

int DYN_FTRACE_TEST_NAME ( void  )

Definition at line 3 of file trace_selftest_dynamic.c.

int DYN_FTRACE_TEST_NAME2 ( void  )

Definition at line 9 of file trace_selftest_dynamic.c.

int filter_assign_type ( const char type)

Definition at line 893 of file trace_events_filter.c.

enum regex_type filter_parse_regex ( char buff,
int  len,
char **  search,
int not 
)

filter_parse_regex - parse a basic regex : the raw regex : length of the regex : will point to the beginning of the string to compare : tell whether the match will have to be inverted

This passes in a buffer containing a regex and this function will set search to point to the search part of the buffer and return the type of search it is (see enum above). This does modify buff.

Returns enum type. search returns the pointer to use for comparison. not returns 1 if buff started with a '!' 0 otherwise.

Definition at line 309 of file trace_events_filter.c.

void ftrace ( struct trace_array tr,
struct trace_array_cpu data,
unsigned long  ip,
unsigned long  parent_ip,
unsigned long  flags,
int  pc 
)

Definition at line 1276 of file trace.c.

int ftrace_event_is_function ( struct ftrace_event_call call)

Definition at line 193 of file trace_export.c.

cycle_t ftrace_now ( int  cpu)

Definition at line 173 of file trace.c.

void* head_page ( struct trace_array_cpu data)
int is_tracing_stopped ( void  )

Definition at line 963 of file trace.c.

unsigned long long ns2usecs ( cycle_t  nsec)

Definition at line 142 of file trace.c.

unsigned long nsecs_to_usecs ( unsigned long  nsecs)

Definition at line 442 of file trace.c.

void poll_wait_pipe ( struct trace_iterator iter)

Definition at line 3413 of file trace.c.

void print_event_filter ( struct ftrace_event_call call,
struct trace_seq s 
)

Definition at line 634 of file trace_events_filter.c.

void print_subsystem_event_filter ( struct event_subsystem system,
struct trace_seq s 
)

Definition at line 647 of file trace_events_filter.c.

void print_trace_header ( struct seq_file m,
struct trace_iterator iter 
)

Definition at line 2020 of file trace.c.

enum print_line_t print_trace_line ( struct trace_iterator iter)

Definition at line 2246 of file trace.c.

int register_tracer ( struct tracer type)

register_tracer - register a tracer with the ftrace system. - the plugin for the tracer

Register a new plugin tracer.

Definition at line 766 of file trace.c.

void set_graph_array ( struct trace_array tr)

Definition at line 354 of file trace_functions_graph.c.

int trace_array_printk ( struct trace_array tr,
unsigned long  ip,
const char fmt,
  ... 
)

Definition at line 1637 of file trace.c.

int trace_array_vprintk ( struct trace_array tr,
unsigned long  ip,
const char fmt,
va_list  args 
)

Definition at line 1652 of file trace.c.

struct ring_buffer_event* trace_buffer_lock_reserve ( struct ring_buffer buffer,
int  type,
unsigned long  len,
unsigned long  flags,
int  pc 
)
read

Definition at line 1163 of file trace.c.

void trace_buffer_unlock_commit ( struct ring_buffer buffer,
struct ring_buffer_event event,
unsigned long  flags,
int  pc 
)

Definition at line 1196 of file trace.c.

struct dentry* trace_create_file ( const char name,
umode_t  mode,
struct dentry parent,
void data,
const struct file_operations fops 
)
read

Definition at line 4628 of file trace.c.

void trace_default_header ( struct seq_file m)

Definition at line 2298 of file trace.c.

int trace_empty ( struct trace_iterator iter)

Definition at line 2212 of file trace.c.

void trace_event_enable_cmd_record ( bool  enable)

Definition at line 185 of file trace_events.c.

void trace_find_cmdline ( int  pid,
char  comm[] 
)

Definition at line 1101 of file trace.c.

struct trace_entry* trace_find_next_entry ( struct trace_iterator iter,
int ent_cpu,
u64 ent_ts 
)
read

Definition at line 1803 of file trace.c.

void* trace_find_next_entry_inc ( struct trace_iterator iter)

Definition at line 1810 of file trace.c.

void trace_function ( struct trace_array tr,
unsigned long  ip,
unsigned long  parent_ip,
unsigned long  flags,
int  pc 
)

Definition at line 1250 of file trace.c.

struct list_head* trace_get_fields ( struct ftrace_event_call event_call)
read

Definition at line 40 of file trace_events.c.

int trace_get_user ( struct trace_parser parser,
const char __user ubuf,
size_t  cnt,
loff_t *  ppos 
)

Definition at line 522 of file trace.c.

int trace_graph_entry ( struct ftrace_graph_ent trace)

Definition at line 239 of file trace_functions_graph.c.

void trace_graph_function ( struct trace_array tr,
unsigned long  ip,
unsigned long  parent_ip,
unsigned long  flags,
int  pc 
)

Definition at line 303 of file trace_functions_graph.c.

void trace_graph_return ( struct ftrace_graph_ret trace)

Definition at line 333 of file trace_functions_graph.c.

void trace_init_global_iter ( struct trace_iterator iter)

Definition at line 4946 of file trace.c.

void trace_latency_header ( struct seq_file m)

Definition at line 2283 of file trace.c.

int trace_parser_get_init ( struct trace_parser parser,
int  size 
)

Definition at line 491 of file trace.c.

void trace_parser_put ( struct trace_parser parser)

Definition at line 506 of file trace.c.

void trace_printk_init_buffers ( void  )

Definition at line 1562 of file trace.c.

void trace_printk_seq ( struct trace_seq s)

Definition at line 4932 of file trace.c.

int trace_vbprintk ( unsigned long  ip,
const char fmt,
va_list  args 
)

trace_vbprintk - write binary msg to tracing buffer

Definition at line 1581 of file trace.c.

int trace_vprintk ( unsigned long  ip,
const char fmt,
va_list  args 
)

Definition at line 1706 of file trace.c.

void trace_wake_up ( void  )

trace_wake_up - wake up tasks waiting for trace input

Schedules a delayed work to wake up any task that is blocked on the trace_wait queue. These is used with trace_poll for tasks polling the trace.

Definition at line 403 of file trace.c.

int tracer_init ( struct tracer t,
struct trace_array tr 
)

Definition at line 3009 of file trace.c.

struct trace_entry* tracing_get_trace_entry ( struct trace_array tr,
struct trace_array_cpu data 
)
read
struct dentry* tracing_init_dentry ( void  )
read

Definition at line 4441 of file trace.c.

int tracing_is_enabled ( void  )

tracing_is_enabled - return tracer_enabled status

This function is used by other tracers to know the status of the tracer_enabled flag. Tracers may use this function to know if it should enable their features when starting up. See irqsoff tracer for an example (start_irqsoff_tracer).

Definition at line 212 of file trace.c.

void tracing_iter_reset ( struct trace_iterator iter,
int  cpu 
)

Definition at line 1854 of file trace.c.

int tracing_open_generic ( struct inode inode,
struct file filp 
)

Definition at line 2464 of file trace.c.

void tracing_reset ( struct trace_array tr,
int  cpu 
)

Definition at line 904 of file trace.c.

void tracing_reset_current ( int  cpu)

Definition at line 935 of file trace.c.

void tracing_reset_current_online_cpus ( void  )

Definition at line 940 of file trace.c.

void tracing_reset_online_cpus ( struct trace_array tr)

Definition at line 917 of file trace.c.

void tracing_sched_switch_assign_trace ( struct trace_array tr)

tracing_sched_switch_assign_trace - assign a trace array for ctx switch : trace array pointer to assign

Some tracers might want to record the context switches in their trace. This function lets those tracers assign the trace array to use.

Definition at line 245 of file trace_sched_switch.c.

void tracing_sched_switch_trace ( struct trace_array tr,
struct task_struct prev,
struct task_struct next,
unsigned long  flags,
int  pc 
)

Definition at line 25 of file trace_sched_switch.c.

void tracing_sched_wakeup_trace ( struct trace_array tr,
struct task_struct wakee,
struct task_struct cur,
unsigned long  flags,
int  pc 
)

Definition at line 81 of file trace_sched_switch.c.

void tracing_start_cmdline_record ( void  )

Definition at line 193 of file trace_sched_switch.c.

void tracing_start_sched_switch_record ( void  )

tracing_start_sched_switch_record - start tracing context switches

Turns on context switch tracing for a tracer.

Definition at line 208 of file trace_sched_switch.c.

void tracing_stop_cmdline_record ( void  )

Definition at line 198 of file trace_sched_switch.c.

void tracing_stop_sched_switch_record ( void  )

tracing_stop_sched_switch_record - start tracing context switches

Turns off context switch tracing for a tracer.

Definition at line 227 of file trace_sched_switch.c.

int tracing_update_buffers ( void  )

tracing_update_buffers - used by tracing facility to expand ring buffers

To save on memory when the tracing is never used on a system with it configured in. The ring buffers are set to a minimum size. But once a user starts to use the tracing facility, then they need to grow to their default size.

This function is to be called when a tracer is about to be used.

Definition at line 3129 of file trace.c.

void unregister_tracer ( struct tracer type)

Definition at line 878 of file trace.c.

Variable Documentation

const char* __start___trace_bprintk_fmt[]
const char* __stop___trace_bprintk_fmt[]
struct mutex event_mutex
struct list_head ftrace_common_fields
struct list_head ftrace_events
struct list_head ftrace_pids
struct tracer nop_trace
int ring_buffer_expanded

Definition at line 49 of file trace.c.

int trace_clock_id

Definition at line 486 of file trace.c.

unsigned long trace_flags

Definition at line 328 of file trace.c.

cpumask_var_t __read_mostly tracing_buffer_mask

Definition at line 90 of file trace.c.

bool tracing_selftest_disabled

Definition at line 63 of file trace.c.

unsigned long tracing_thresh

Definition at line 650 of file trace.c.