Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
trace_events.c File Reference
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include <linux/kthread.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <asm/setup.h>
#include "trace_output.h"

Go to the source code of this file.

Macros

#define TRACE_SYSTEM   "TRACE_SYSTEM"
 
#define __common_field(type, item)
 
#define EVENT_BUF_SIZE   127
 
#define for_each_event(event, start, end)
 

Enumerations

enum  { FORMAT_HEADER = 1, FORMAT_FIELD_SEPERATOR = 2, FORMAT_PRINTFMT = 3 }
 

Functions

 DEFINE_MUTEX (event_mutex)
 
 DEFINE_MUTEX (event_storage_mutex)
 
 EXPORT_SYMBOL_GPL (event_storage_mutex)
 
 EXPORT_SYMBOL_GPL (event_storage)
 
 LIST_HEAD (ftrace_events)
 
 LIST_HEAD (ftrace_common_fields)
 
struct list_headtrace_get_fields (struct ftrace_event_call *event_call)
 
int trace_define_field (struct ftrace_event_call *call, const char *type, const char *name, int offset, int size, int is_signed, int filter_type)
 
 EXPORT_SYMBOL_GPL (trace_define_field)
 
void trace_destroy_fields (struct ftrace_event_call *call)
 
int trace_event_raw_init (struct ftrace_event_call *call)
 
 EXPORT_SYMBOL_GPL (trace_event_raw_init)
 
int ftrace_event_reg (struct ftrace_event_call *call, enum trace_reg type, void *data)
 
 EXPORT_SYMBOL_GPL (ftrace_event_reg)
 
void trace_event_enable_cmd_record (bool enable)
 
int trace_set_clr_event (const char *system, const char *event, int set)
 
 EXPORT_SYMBOL_GPL (trace_set_clr_event)
 
int trace_add_event_call (struct ftrace_event_call *call)
 
void trace_remove_event_call (struct ftrace_event_call *call)
 
 __setup ("trace_event=", setup_trace_event)
 
 core_initcall (event_trace_enable)
 
 fs_initcall (event_trace_init)
 

Variables

char event_storage [EVENT_STORAGE_SIZE]
 
struct ftrace_event_call__start_ftrace_events []
 
struct ftrace_event_call__stop_ftrace_events []
 

Macro Definition Documentation

#define __common_field (   type,
  item 
)
Value:
ret = __trace_define_field(&ftrace_common_fields, #type, \
"common_" #item, \
sizeof(ent.item), \
if (ret) \
return ret;

Definition at line 101 of file trace_events.c.

#define EVENT_BUF_SIZE   127

Definition at line 370 of file trace_events.c.

#define for_each_event (   event,
  start,
  end 
)
Value:
for (event = start; \
(unsigned long)event < (unsigned long)end; \

Definition at line 1307 of file trace_events.c.

#define TRACE_SYSTEM   "TRACE_SYSTEM"

Definition at line 26 of file trace_events.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
FORMAT_HEADER 
FORMAT_FIELD_SEPERATOR 
FORMAT_PRINTFMT 

Definition at line 636 of file trace_events.c.

Function Documentation

__setup ( )
core_initcall ( event_trace_enable  )
DEFINE_MUTEX ( event_mutex  )
DEFINE_MUTEX ( event_storage_mutex  )
EXPORT_SYMBOL_GPL ( event_storage_mutex  )
EXPORT_SYMBOL_GPL ( event_storage  )
EXPORT_SYMBOL_GPL ( trace_define_field  )
EXPORT_SYMBOL_GPL ( trace_event_raw_init  )
EXPORT_SYMBOL_GPL ( ftrace_event_reg  )
EXPORT_SYMBOL_GPL ( trace_set_clr_event  )
fs_initcall ( event_trace_init  )
int ftrace_event_reg ( struct ftrace_event_call call,
enum trace_reg  type,
void data 
)

Definition at line 150 of file trace_events.c.

LIST_HEAD ( ftrace_events  )
LIST_HEAD ( ftrace_common_fields  )
int trace_add_event_call ( struct ftrace_event_call call)

Definition at line 1254 of file trace_events.c.

int trace_define_field ( struct ftrace_event_call call,
const char type,
const char name,
int  offset,
int  size,
int  is_signed,
int  filter_type 
)

Definition at line 86 of file trace_events.c.

void trace_destroy_fields ( struct ftrace_event_call call)

Definition at line 124 of file trace_events.c.

void trace_event_enable_cmd_record ( bool  enable)

Definition at line 185 of file trace_events.c.

int trace_event_raw_init ( struct ftrace_event_call call)

Definition at line 138 of file trace_events.c.

struct list_head* trace_get_fields ( struct ftrace_event_call event_call)
read

Definition at line 40 of file trace_events.c.

void trace_remove_event_call ( struct ftrace_event_call call)

Definition at line 1298 of file trace_events.c.

int trace_set_clr_event ( const char system,
const char event,
int  set 
)

trace_set_clr_event - enable or disable an event : system name to match (NULL for any system) : event name to match (NULL for all events, within system) : 1 to enable, 0 to disable

This is a way for other parts of the kernel to enable or disable event recording.

Returns 0 on success, -EINVAL if the parameters do not match any registered events.

Definition at line 363 of file trace_events.c.

Variable Documentation

struct ftrace_event_call* __start_ftrace_events[]
struct ftrace_event_call* __stop_ftrace_events[]
char event_storage[EVENT_STORAGE_SIZE]

Definition at line 33 of file trace_events.c.