1 #ifndef _LTTNG_WRAPPER_VMALLOC_H
2 #define _LTTNG_WRAPPER_VMALLOC_H
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 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; only
16 * version 2.1 of the License.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 #ifdef CONFIG_KALLSYMS
30 #include <linux/kallsyms.h>
34 void wrapper_vmalloc_sync_all(void)
36 void (*vmalloc_sync_all_sym
)(void);
38 vmalloc_sync_all_sym
= (void *) kallsyms_lookup_funcptr("vmalloc_sync_all");
39 if (vmalloc_sync_all_sym
) {
40 vmalloc_sync_all_sym();
44 * Only x86 needs vmalloc_sync_all to make sure LTTng does not
45 * trigger recursive page faults.
47 printk(KERN_WARNING
"LTTng: vmalloc_sync_all symbol lookup failed.\n");
48 printk(KERN_WARNING
"Page fault handler and NMI tracing might trigger faults.\n");
54 #include <linux/vmalloc.h>
57 void wrapper_vmalloc_sync_all(void)
59 return vmalloc_sync_all();
63 #endif /* _LTTNG_WRAPPER_VMALLOC_H */
This page took 0.030752 seconds and 4 git commands to generate.