aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 098bdb7bfacf..1c755b2f937d 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -15,12 +15,13 @@
15#include <linux/stringify.h> 15#include <linux/stringify.h>
16#include <linux/kobject.h> 16#include <linux/kobject.h>
17#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
18#include <linux/marker.h>
19#include <linux/tracepoint.h> 18#include <linux/tracepoint.h>
20#include <asm/local.h>
21 19
20#include <asm/local.h>
22#include <asm/module.h> 21#include <asm/module.h>
23 22
23#include <trace/events/module.h>
24
24/* Not Yet Implemented */ 25/* Not Yet Implemented */
25#define MODULE_SUPPORTED_DEVICE(name) 26#define MODULE_SUPPORTED_DEVICE(name)
26 27
@@ -325,10 +326,6 @@ struct module
325 /* The command line arguments (may be mangled). People like 326 /* The command line arguments (may be mangled). People like
326 keeping pointers to this stuff */ 327 keeping pointers to this stuff */
327 char *args; 328 char *args;
328#ifdef CONFIG_MARKERS
329 struct marker *markers;
330 unsigned int num_markers;
331#endif
332#ifdef CONFIG_TRACEPOINTS 329#ifdef CONFIG_TRACEPOINTS
333 struct tracepoint *tracepoints; 330 struct tracepoint *tracepoints;
334 unsigned int num_tracepoints; 331 unsigned int num_tracepoints;
@@ -462,7 +459,10 @@ static inline local_t *__module_ref_addr(struct module *mod, int cpu)
462static inline void __module_get(struct module *module) 459static inline void __module_get(struct module *module)
463{ 460{
464 if (module) { 461 if (module) {
465 local_inc(__module_ref_addr(module, get_cpu())); 462 unsigned int cpu = get_cpu();
463 local_inc(__module_ref_addr(module, cpu));
464 trace_module_get(module, _THIS_IP_,
465 local_read(__module_ref_addr(module, cpu)));
466 put_cpu(); 466 put_cpu();
467 } 467 }
468} 468}
@@ -473,8 +473,11 @@ static inline int try_module_get(struct module *module)
473 473
474 if (module) { 474 if (module) {
475 unsigned int cpu = get_cpu(); 475 unsigned int cpu = get_cpu();
476 if (likely(module_is_live(module))) 476 if (likely(module_is_live(module))) {
477 local_inc(__module_ref_addr(module, cpu)); 477 local_inc(__module_ref_addr(module, cpu));
478 trace_module_get(module, _THIS_IP_,
479 local_read(__module_ref_addr(module, cpu)));
480 }
478 else 481 else
479 ret = 0; 482 ret = 0;
480 put_cpu(); 483 put_cpu();
@@ -527,8 +530,6 @@ int unregister_module_notifier(struct notifier_block * nb);
527 530
528extern void print_modules(void); 531extern void print_modules(void);
529 532
530extern void module_update_markers(void);
531
532extern void module_update_tracepoints(void); 533extern void module_update_tracepoints(void);
533extern int module_get_iter_tracepoints(struct tracepoint_iter *iter); 534extern int module_get_iter_tracepoints(struct tracepoint_iter *iter);
534 535
@@ -643,10 +644,6 @@ static inline void print_modules(void)
643{ 644{
644} 645}
645 646
646static inline void module_update_markers(void)
647{
648}
649
650static inline void module_update_tracepoints(void) 647static inline void module_update_tracepoints(void)
651{ 648{
652} 649}