diff options
Diffstat (limited to 'include/trace/events/module.h')
| -rw-r--r-- | include/trace/events/module.h | 21 | 
1 files changed, 16 insertions, 5 deletions
diff --git a/include/trace/events/module.h b/include/trace/events/module.h index c7bb2f0482f..7c5cbfe3fc4 100644 --- a/include/trace/events/module.h +++ b/include/trace/events/module.h @@ -1,5 +1,15 @@ +/* + * Because linux/module.h has tracepoints in the header, and ftrace.h + * used to include this file, define_trace.h includes linux/module.h + * But we do not want the module.h to override the TRACE_SYSTEM macro + * variable that define_trace.h is processing, so we only set it + * when module events are being processed, which would happen when + * CREATE_TRACE_POINTS is defined. + */ +#ifdef CREATE_TRACE_POINTS  #undef TRACE_SYSTEM  #define TRACE_SYSTEM module +#endif  #if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ)  #define _TRACE_MODULE_H @@ -12,8 +22,10 @@ struct module;  #define show_module_flags(flags) __print_flags(flags, "",	\  	{ (1UL << TAINT_PROPRIETARY_MODULE),	"P" },		\ +	{ (1UL << TAINT_OOT_MODULE),		"O" },		\  	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\ -	{ (1UL << TAINT_CRAP),			"C" }) +	{ (1UL << TAINT_CRAP),			"C" },		\ +	{ (1UL << TAINT_UNSIGNED_MODULE),	"E" })  TRACE_EVENT(module_load, @@ -68,7 +80,7 @@ DECLARE_EVENT_CLASS(module_refcnt,  	TP_fast_assign(  		__entry->ip	= ip; -		__entry->refcnt	= __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); +		__entry->refcnt	= __this_cpu_read(mod->refptr->incs) - __this_cpu_read(mod->refptr->decs);  		__assign_str(name, mod->name);  	), @@ -98,14 +110,14 @@ TRACE_EVENT(module_request,  	TP_ARGS(name, wait, ip),  	TP_STRUCT__entry( -		__field(	bool,		wait		)  		__field(	unsigned long,	ip		) +		__field(	bool,		wait		)  		__string(	name,		name		)  	),  	TP_fast_assign( -		__entry->wait	= wait;  		__entry->ip	= ip; +		__entry->wait	= wait;  		__assign_str(name, name);  	), @@ -119,4 +131,3 @@ TRACE_EVENT(module_request,  /* This part must be outside protection */  #include <trace/define_trace.h> -  | 
