Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162961
b: refs/heads/master
c: 0a1c49d
h: refs/heads/master
i:
  162959: 7dd56ee
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Sep 13, 2009
1 parent 92b72a2 commit acb8d0d
Show file tree
Hide file tree
Showing 3 changed files with 370 additions and 134 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16bb8eb1b73bf940d30ff88cae622bfcd3790f61
refs/heads/master: 0a1c49db8d91c538f104f8d70e560c6fdd589bd4
160 changes: 27 additions & 133 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,150 +42,45 @@ enum trace_type {
__TRACE_LAST_TYPE,
};

/*
* Function trace entry - function address and parent function addres:
*/
struct ftrace_entry {
struct trace_entry ent;
unsigned long ip;
unsigned long parent_ip;
};

/* Function call entry */
struct ftrace_graph_ent_entry {
struct trace_entry ent;
struct ftrace_graph_ent graph_ent;
enum kmemtrace_type_id {
KMEMTRACE_TYPE_KMALLOC = 0, /* kmalloc() or kfree(). */
KMEMTRACE_TYPE_CACHE, /* kmem_cache_*(). */
KMEMTRACE_TYPE_PAGES, /* __get_free_pages() and friends. */
};

/* Function return entry */
struct ftrace_graph_ret_entry {
struct trace_entry ent;
struct ftrace_graph_ret ret;
};
extern struct tracer boot_tracer;

/*
* Context switch trace entry - which task (and prio) we switched from/to:
*/
struct ctx_switch_entry {
struct trace_entry ent;
unsigned int prev_pid;
unsigned char prev_prio;
unsigned char prev_state;
unsigned int next_pid;
unsigned char next_prio;
unsigned char next_state;
unsigned int next_cpu;
};

/*
* Special (free-form) trace entry:
*/
struct special_entry {
struct trace_entry ent;
unsigned long arg1;
unsigned long arg2;
unsigned long arg3;
};

/*
* Stack-trace entry:
*/
#undef __field
#define __field(type, item) type item;

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

struct stack_entry {
struct trace_entry ent;
unsigned long caller[FTRACE_STACK_ENTRIES];
};
#undef __dynamic_array
#define __dynamic_array(type, item) type item[];

struct userstack_entry {
struct trace_entry ent;
unsigned int tgid;
unsigned long caller[FTRACE_STACK_ENTRIES];
};

/*
* trace_printk entry:
*/
struct bprint_entry {
struct trace_entry ent;
unsigned long ip;
const char *fmt;
u32 buf[];
};

struct print_entry {
struct trace_entry ent;
unsigned long ip;
char buf[];
};
#undef F_STRUCT
#define F_STRUCT(args...) args

struct trace_mmiotrace_rw {
struct trace_entry ent;
struct mmiotrace_rw rw;
};

struct trace_mmiotrace_map {
struct trace_entry ent;
struct mmiotrace_map map;
};

struct trace_boot_call {
struct trace_entry ent;
struct boot_trace_call boot_call;
};

struct trace_boot_ret {
struct trace_entry ent;
struct boot_trace_ret boot_ret;
};

#define TRACE_FUNC_SIZE 30
#define TRACE_FILE_SIZE 20
struct trace_branch {
struct trace_entry ent;
unsigned line;
char func[TRACE_FUNC_SIZE+1];
char file[TRACE_FILE_SIZE+1];
char correct;
};

struct hw_branch_entry {
struct trace_entry ent;
u64 from;
u64 to;
};

struct trace_power {
struct trace_entry ent;
struct power_trace state_data;
};
#undef FTRACE_ENTRY
#define FTRACE_ENTRY(name, struct_name, id, tstruct, print) \
struct struct_name { \
struct trace_entry ent; \
tstruct \
}

enum kmemtrace_type_id {
KMEMTRACE_TYPE_KMALLOC = 0, /* kmalloc() or kfree(). */
KMEMTRACE_TYPE_CACHE, /* kmem_cache_*(). */
KMEMTRACE_TYPE_PAGES, /* __get_free_pages() and friends. */
};
#undef TP_ARGS
#define TP_ARGS(args...) args

struct kmemtrace_alloc_entry {
struct trace_entry ent;
enum kmemtrace_type_id type_id;
unsigned long call_site;
const void *ptr;
size_t bytes_req;
size_t bytes_alloc;
gfp_t gfp_flags;
int node;
};
#undef FTRACE_ENTRY_DUP
#define FTRACE_ENTRY_DUP(name, name_struct, id, tstruct, printk)

struct kmemtrace_free_entry {
struct trace_entry ent;
enum kmemtrace_type_id type_id;
unsigned long call_site;
const void *ptr;
};
#include "trace_entries.h"

/*
* syscalls are special, and need special handling, this is why
* they are not included in trace_entries.h
*/
struct syscall_trace_enter {
struct trace_entry ent;
int nr;
Expand All @@ -198,7 +93,6 @@ struct syscall_trace_exit {
unsigned long ret;
};


/*
* trace_flag_type is an enumeration that holds different
* states when a trace occurs. These are:
Expand Down
Loading

0 comments on commit acb8d0d

Please sign in to comment.