diff options
Diffstat (limited to 'kernel/trace/trace_entries.h')
| -rw-r--r-- | kernel/trace/trace_entries.h | 102 | 
1 files changed, 75 insertions, 27 deletions
diff --git a/kernel/trace/trace_entries.h b/kernel/trace/trace_entries.h index e3dfecaf13e..e2d027ac66a 100644 --- a/kernel/trace/trace_entries.h +++ b/kernel/trace/trace_entries.h @@ -27,7 +27,7 @@   *	  in the structure.   *   *   * for structures within structures, the format of the internal - *	structure is layed out. This allows the internal structure + *	structure is laid out. This allows the internal structure   *	to be deciphered for the format file. Although these macros   *	may become out of sync with the internal structure, they   *	will create a compile error if it happens. Since the @@ -53,9 +53,9 @@   */  /* - * Function trace entry - function address and parent function addres: + * Function trace entry - function address and parent function address:   */ -FTRACE_ENTRY(function, ftrace_entry, +FTRACE_ENTRY_REG(function, ftrace_entry,  	TRACE_FN, @@ -64,7 +64,11 @@ FTRACE_ENTRY(function, ftrace_entry,  		__field(	unsigned long,	parent_ip	)  	), -	F_printk(" %lx <-- %lx", __entry->ip, __entry->parent_ip) +	F_printk(" %lx <-- %lx", __entry->ip, __entry->parent_ip), + +	FILTER_TRACE_FN, + +	perf_ftrace_event_register  );  /* Function call entry */ @@ -78,7 +82,9 @@ FTRACE_ENTRY(funcgraph_entry, ftrace_graph_ent_entry,  		__field_desc(	int,		graph_ent,	depth		)  	), -	F_printk("--> %lx (%d)", __entry->func, __entry->depth) +	F_printk("--> %lx (%d)", __entry->func, __entry->depth), + +	FILTER_OTHER  );  /* Function return entry */ @@ -98,7 +104,9 @@ FTRACE_ENTRY(funcgraph_exit, ftrace_graph_ret_entry,  	F_printk("<-- %lx (%d) (start: %llx  end: %llx) over: %d",  		 __entry->func, __entry->depth,  		 __entry->calltime, __entry->rettime, -		 __entry->depth) +		 __entry->depth), + +	FILTER_OTHER  );  /* @@ -109,12 +117,12 @@ FTRACE_ENTRY(funcgraph_exit, ftrace_graph_ret_entry,   */  #define FTRACE_CTX_FIELDS					\  	__field(	unsigned int,	prev_pid	)	\ +	__field(	unsigned int,	next_pid	)	\ +	__field(	unsigned int,	next_cpu	)       \  	__field(	unsigned char,	prev_prio	)	\  	__field(	unsigned char,	prev_state	)	\ -	__field(	unsigned int,	next_pid	)	\  	__field(	unsigned char,	next_prio	)	\ -	__field(	unsigned char,	next_state	)	\ -	__field(	unsigned int,	next_cpu	) +	__field(	unsigned char,	next_state	)  FTRACE_ENTRY(context_switch, ctx_switch_entry, @@ -127,8 +135,9 @@ FTRACE_ENTRY(context_switch, ctx_switch_entry,  	F_printk("%u:%u:%u  ==> %u:%u:%u [%03u]",  		 __entry->prev_pid, __entry->prev_prio, __entry->prev_state,  		 __entry->next_pid, __entry->next_prio, __entry->next_state, -		 __entry->next_cpu -		) +		 __entry->next_cpu), + +	FILTER_OTHER  );  /* @@ -146,8 +155,9 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry,  	F_printk("%u:%u:%u  ==+ %u:%u:%u [%03u]",  		 __entry->prev_pid, __entry->prev_prio, __entry->prev_state,  		 __entry->next_pid, __entry->next_prio, __entry->next_state, -		 __entry->next_cpu -		) +		 __entry->next_cpu), + +	FILTER_OTHER  );  /* @@ -156,19 +166,29 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry,  #define FTRACE_STACK_ENTRIES	8 +#ifndef CONFIG_64BIT +# define IP_FMT "%08lx" +#else +# define IP_FMT "%016lx" +#endif +  FTRACE_ENTRY(kernel_stack, stack_entry,  	TRACE_STACK,  	F_STRUCT( -		__array(	unsigned long,	caller, FTRACE_STACK_ENTRIES	) +		__field(	int,		size	) +		__dynamic_array(unsigned long,	caller	)  	), -	F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" -		 "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", +	F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" +		 "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" +		 "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n",  		 __entry->caller[0], __entry->caller[1], __entry->caller[2],  		 __entry->caller[3], __entry->caller[4], __entry->caller[5], -		 __entry->caller[6], __entry->caller[7]) +		 __entry->caller[6], __entry->caller[7]), + +	FILTER_OTHER  );  FTRACE_ENTRY(user_stack, userstack_entry, @@ -180,11 +200,14 @@ FTRACE_ENTRY(user_stack, userstack_entry,  		__array(	unsigned long,	caller, FTRACE_STACK_ENTRIES	)  	), -	F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" -		 "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", +	F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" +		 "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" +		 "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n",  		 __entry->caller[0], __entry->caller[1], __entry->caller[2],  		 __entry->caller[3], __entry->caller[4], __entry->caller[5], -		 __entry->caller[6], __entry->caller[7]) +		 __entry->caller[6], __entry->caller[7]), + +	FILTER_OTHER  );  /* @@ -200,8 +223,10 @@ FTRACE_ENTRY(bprint, bprint_entry,  		__dynamic_array(	u32,	buf	)  	), -	F_printk("%08lx fmt:%p", -		 __entry->ip, __entry->fmt) +	F_printk("%pf: %s", +		 (void *)__entry->ip, __entry->fmt), + +	FILTER_OTHER  );  FTRACE_ENTRY(print, print_entry, @@ -213,8 +238,25 @@ FTRACE_ENTRY(print, print_entry,  		__dynamic_array(	char,	buf	)  	), -	F_printk("%08lx %s", -		 __entry->ip, __entry->buf) +	F_printk("%pf: %s", +		 (void *)__entry->ip, __entry->buf), + +	FILTER_OTHER +); + +FTRACE_ENTRY(bputs, bputs_entry, + +	TRACE_BPUTS, + +	F_STRUCT( +		__field(	unsigned long,	ip	) +		__field(	const char *,	str	) +	), + +	F_printk("%pf: %s", +		 (void *)__entry->ip, __entry->str), + +	FILTER_OTHER  );  FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw, @@ -233,7 +275,9 @@ FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw,  	F_printk("%lx %lx %lx %d %x %x",  		 (unsigned long)__entry->phys, __entry->value, __entry->pc, -		 __entry->map_id, __entry->opcode, __entry->width) +		 __entry->map_id, __entry->opcode, __entry->width), + +	FILTER_OTHER  );  FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map, @@ -251,7 +295,9 @@ FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map,  	F_printk("%lx %lx %lx %d %x",  		 (unsigned long)__entry->phys, __entry->virt, __entry->len, -		 __entry->map_id, __entry->opcode) +		 __entry->map_id, __entry->opcode), + +	FILTER_OTHER  ); @@ -271,6 +317,8 @@ FTRACE_ENTRY(branch, trace_branch,  	F_printk("%u:%s:%s (%u)",  		 __entry->line, -		 __entry->func, __entry->file, __entry->correct) +		 __entry->func, __entry->file, __entry->correct), + +	FILTER_OTHER  );  | 
