X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fmodule.h;fp=instrumentation%2Fevents%2Flttng-module%2Fmodule.h;h=0000000000000000000000000000000000000000;hb=7c6d929d62a6e24fb1dbeaee5cd2c8afe77720b7;hp=5831650b6f987b2a10b58db0bcef52b36b22f5bd;hpb=cf77d12083b5092eca8c6f9899ec0892756845aa;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/module.h b/instrumentation/events/lttng-module/module.h deleted file mode 100644 index 5831650b..00000000 --- a/instrumentation/events/lttng-module/module.h +++ /dev/null @@ -1,105 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Because linux/module.h has tracepoints in the header, and ftrace.h - * eventually includes 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(LTTNG_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ) -#define LTTNG_TRACE_MODULE_H - -#include -#include - -#ifdef CONFIG_MODULES - -#ifndef _TRACE_MODULE_DEF -#define _TRACE_MODULE_DEF -struct module; - -#endif - -LTTNG_TRACEPOINT_EVENT(module_load, - - TP_PROTO(struct module *mod), - - TP_ARGS(mod), - - TP_FIELDS( - ctf_integer(unsigned int, taints, mod->taints) - ctf_string(name, mod->name) - ) -) - -LTTNG_TRACEPOINT_EVENT(module_free, - - TP_PROTO(struct module *mod), - - TP_ARGS(mod), - - TP_FIELDS( - ctf_string(name, mod->name) - ) -) - -#ifdef CONFIG_MODULE_UNLOAD -/* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ - -LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt, - - TP_PROTO(struct module *mod, unsigned long ip), - - TP_ARGS(mod, ip), - - TP_FIELDS( - ctf_integer_hex(unsigned long, ip, ip) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) - ctf_integer(int, refcnt, atomic_read(&mod->refcnt)) -#else - ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs)) -#endif - ctf_string(name, mod->name) - ) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_get, - - TP_PROTO(struct module *mod, unsigned long ip), - - TP_ARGS(mod, ip) -) - -LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_put, - - TP_PROTO(struct module *mod, unsigned long ip), - - TP_ARGS(mod, ip) -) -#endif /* CONFIG_MODULE_UNLOAD */ - -LTTNG_TRACEPOINT_EVENT(module_request, - - TP_PROTO(char *name, bool wait, unsigned long ip), - - TP_ARGS(name, wait, ip), - - TP_FIELDS( - ctf_integer_hex(unsigned long, ip, ip) - ctf_integer(bool, wait, wait) - ctf_string(name, name) - ) -) - -#endif /* CONFIG_MODULES */ - -#endif /* LTTNG_TRACE_MODULE_H */ - -/* This part must be outside protection */ -#include