#include <linux/cpu.h>
#include <linux/mm.h>
-#include "../../wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "../../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "../../wrapper/ringbuffer/config.h"
#include "../../wrapper/ringbuffer/backend.h"
#include "../../wrapper/ringbuffer/frontend.h"
#include <linux/file.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
-#include "wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "wrapper/ringbuffer/vfs.h"
#include "ltt-debugfs-abi.h"
#include "ltt-events.h"
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/slab.h>
-#include "wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "ltt-events.h"
static LIST_HEAD(sessions);
#include <linux/module.h>
#include <linux/types.h>
-#include "wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "wrapper/trace-clock.h"
#include "ltt-events.h"
#include "ltt-tracer.h"
#include <lttng.h>
#include <lttng-types.h>
#include <linux/debugfs.h>
-#include "../wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "../wrapper/ringbuffer/frontend_types.h"
#include "../ltt-events.h"
#include "../ltt-tracer-core.h"
#include <linux/seq_file.h>
#include <linux/jbd.h> /* tid_t */
#include <linux/debugfs.h>
-#include "../wrapper/symbols.h" /* for wrapper_vmalloc_sync_all() */
+#include "../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
#include "lttng-types.h"
struct dentry *lttng_types_dentry;
+++ /dev/null
-/*
- * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
- *
- * wrapper around vmalloc_sync_all. Using KALLSYMS to get its address when
- * available, else we need to have a kernel that exports this function to GPL
- * modules.
- *
- * Dual LGPL v2.1/GPL v2 license.
- */
-
-#ifdef CONFIG_KALLSYMS
-
-#include <linux/kallsyms.h>
-
-static inline
-void wrapper_vmalloc_sync_all(void)
-{
- void (*vmalloc_sync_all_sym)(void);
-
- vmalloc_sync_all_sym = (void *) kallsyms_lookup_name("vmalloc_sync_all");
- if (vmalloc_sync_all_sym) {
- vmalloc_sync_all_sym();
- } else {
-#ifdef CONFIG_X86
- /*
- * Only x86 needs vmalloc_sync_all to make sure LTTng does not
- * trigger recursive page faults.
- */
- printk(KERN_WARNING "LTTng: vmalloc_sync_all symbol lookup failed.\n");
- printk(KERN_WARNING "Page fault handler and NMI tracing might trigger faults.\n");
-#endif
- }
-}
-#else
-
-#include <linux/vmalloc.h>
-
-static inline
-void wrapper_vmalloc_sync_all(void)
-{
- return vmalloc_sync_all();
-}
-#endif
--- /dev/null
+#ifndef _LTT_WRAPPER_VMALLOC_H
+#define _LTT_WRAPPER_VMALLOC_H
+
+/*
+ * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
+ *
+ * wrapper around vmalloc_sync_all. Using KALLSYMS to get its address when
+ * available, else we need to have a kernel that exports this function to GPL
+ * modules.
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
+#ifdef CONFIG_KALLSYMS
+
+#include <linux/kallsyms.h>
+
+static inline
+void wrapper_vmalloc_sync_all(void)
+{
+ void (*vmalloc_sync_all_sym)(void);
+
+ vmalloc_sync_all_sym = (void *) kallsyms_lookup_name("vmalloc_sync_all");
+ if (vmalloc_sync_all_sym) {
+ vmalloc_sync_all_sym();
+ } else {
+#ifdef CONFIG_X86
+ /*
+ * Only x86 needs vmalloc_sync_all to make sure LTTng does not
+ * trigger recursive page faults.
+ */
+ printk(KERN_WARNING "LTTng: vmalloc_sync_all symbol lookup failed.\n");
+ printk(KERN_WARNING "Page fault handler and NMI tracing might trigger faults.\n");
+#endif
+ }
+}
+#else
+
+#include <linux/vmalloc.h>
+
+static inline
+void wrapper_vmalloc_sync_all(void)
+{
+ return vmalloc_sync_all();
+}
+#endif
+
+#endif /* _LTT_WRAPPER_VMALLOC_H */