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>
20 void wrapper_vmalloc_sync_all(void)
22 void (*vmalloc_sync_all_sym
)(void);
24 vmalloc_sync_all_sym
= (void *) kallsyms_lookup_funcptr("vmalloc_sync_all");
25 if (vmalloc_sync_all_sym
) {
26 vmalloc_sync_all_sym();
30 * Only x86 needs vmalloc_sync_all to make sure LTTng does not
31 * trigger recursive page faults.
33 printk(KERN_WARNING
"LTTng: vmalloc_sync_all symbol lookup failed.\n");
34 printk(KERN_WARNING
"Page fault handler and NMI tracing might trigger faults.\n");
40 #include <linux/vmalloc.h>
43 void wrapper_vmalloc_sync_all(void)
45 return vmalloc_sync_all();
49 #endif /* _LTT_WRAPPER_VMALLOC_H */
This page took 0.038991 seconds and 4 git commands to generate.