1 #ifndef _LTT_WRAPPER_VMALLOC_H
2 #define _LTT_WRAPPER_VMALLOC_H
5 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
7 * wrapper around vmalloc_sync_all. Using KALLSYMS to get its address when
8 * available, else we need to have a kernel that exports this function to GPL
11 * Dual LGPL v2.1/GPL v2 license.
14 #ifdef CONFIG_KALLSYMS
16 #include <linux/kallsyms.h>
19 void wrapper_vmalloc_sync_all(void)
21 void (*vmalloc_sync_all_sym
)(void);
23 vmalloc_sync_all_sym
= (void *) kallsyms_lookup_name("vmalloc_sync_all");
24 if (vmalloc_sync_all_sym
) {
25 vmalloc_sync_all_sym();
29 * Only x86 needs vmalloc_sync_all to make sure LTTng does not
30 * trigger recursive page faults.
32 printk(KERN_WARNING
"LTTng: vmalloc_sync_all symbol lookup failed.\n");
33 printk(KERN_WARNING
"Page fault handler and NMI tracing might trigger faults.\n");
39 #include <linux/vmalloc.h>
42 void wrapper_vmalloc_sync_all(void)
44 return vmalloc_sync_all();
48 #endif /* _LTT_WRAPPER_VMALLOC_H */
This page took 0.03005 seconds and 4 git commands to generate.