diff options
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/bkl.h | 61 | ||||
| -rw-r--r-- | include/trace/events/syscalls.h | 3 | ||||
| -rw-r--r-- | include/trace/ftrace.h | 2 | ||||
| -rw-r--r-- | include/trace/power.h | 32 | ||||
| -rw-r--r-- | include/trace/syscall.h | 2 | 
5 files changed, 65 insertions, 35 deletions
diff --git a/include/trace/events/bkl.h b/include/trace/events/bkl.h new file mode 100644 index 00000000000..8abd620a490 --- /dev/null +++ b/include/trace/events/bkl.h @@ -0,0 +1,61 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM bkl + +#if !defined(_TRACE_BKL_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_BKL_H + +#include <linux/tracepoint.h> + +TRACE_EVENT(lock_kernel, + +	TP_PROTO(const char *func, const char *file, int line), + +	TP_ARGS(func, file, line), + +	TP_STRUCT__entry( +		__field(	int,		lock_depth		) +		__field_ext(	const char *,	func, FILTER_PTR_STRING	) +		__field_ext(	const char *,	file, FILTER_PTR_STRING	) +		__field(	int,		line			) +	), + +	TP_fast_assign( +		/* We want to record the lock_depth after lock is acquired */ +		__entry->lock_depth = current->lock_depth + 1; +		__entry->func = func; +		__entry->file = file; +		__entry->line = line; +	), + +	TP_printk("depth: %d, %s:%d %s()", __entry->lock_depth, +		  __entry->file, __entry->line, __entry->func) +); + +TRACE_EVENT(unlock_kernel, + +	TP_PROTO(const char *func, const char *file, int line), + +	TP_ARGS(func, file, line), + +	TP_STRUCT__entry( +		__field(int,		lock_depth) +		__field(const char *,	func) +		__field(const char *,	file) +		__field(int,		line) +	), + +	TP_fast_assign( +		__entry->lock_depth = current->lock_depth; +		__entry->func = func; +		__entry->file = file; +		__entry->line = line; +	), + +	TP_printk("depth: %d, %s:%d %s()", __entry->lock_depth, +		  __entry->file, __entry->line, __entry->func) +); + +#endif /* _TRACE_BKL_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> diff --git a/include/trace/events/syscalls.h b/include/trace/events/syscalls.h index 397dff2dbd5..fb726ac7cae 100644 --- a/include/trace/events/syscalls.h +++ b/include/trace/events/syscalls.h @@ -1,5 +1,6 @@  #undef TRACE_SYSTEM -#define TRACE_SYSTEM syscalls +#define TRACE_SYSTEM raw_syscalls +#define TRACE_INCLUDE_FILE syscalls  #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)  #define _TRACE_EVENTS_SYSCALLS_H diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index cc0d9667e18..dacb8ef6700 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -159,7 +159,7 @@  #undef __get_str  #undef TP_printk -#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args) +#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args)  #undef TP_fast_assign  #define TP_fast_assign(args...) args diff --git a/include/trace/power.h b/include/trace/power.h deleted file mode 100644 index ef204666e98..00000000000 --- a/include/trace/power.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _TRACE_POWER_H -#define _TRACE_POWER_H - -#include <linux/ktime.h> -#include <linux/tracepoint.h> - -enum { -	POWER_NONE = 0, -	POWER_CSTATE = 1, -	POWER_PSTATE = 2, -}; - -struct power_trace { -	ktime_t			stamp; -	ktime_t			end; -	int			type; -	int			state; -}; - -DECLARE_TRACE(power_start, -	TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state), -	      TP_ARGS(it, type, state)); - -DECLARE_TRACE(power_mark, -	TP_PROTO(struct power_trace *it, unsigned int type, unsigned int state), -	      TP_ARGS(it, type, state)); - -DECLARE_TRACE(power_end, -	TP_PROTO(struct power_trace *it), -	      TP_ARGS(it)); - -#endif /* _TRACE_POWER_H */ diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 5dc283ba5ae..e972f0a40f8 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h @@ -33,7 +33,7 @@ struct syscall_metadata {  };  #ifdef CONFIG_FTRACE_SYSCALLS -extern struct syscall_metadata *syscall_nr_to_meta(int nr); +extern unsigned long arch_syscall_addr(int nr);  extern int syscall_name_to_nr(char *name);  void set_syscall_enter_id(int num, int id);  void set_syscall_exit_id(int num, int id);  |