Add explicit vmalloc_sync_all
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 May 2011 04:46:12 +0000 (00:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 May 2011 04:46:12 +0000 (00:46 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
ltt-debugfs-abi.c
ltt-ring-buffer-client.h
probes/lttng-events.h
probes/lttng-types.c

index 2549f1d15bdb5a1b0828c51ec500ef41fe97169e..ac8618deb17efa83cb2a56ee6f4d87d6454b0d42 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,13 +5,12 @@
 ifneq ($(KERNELRELEASE),)
 ifneq ($(CONFIG_TRACEPOINTS),)
 
-obj-m += ltt-core.o
 obj-m += ltt-ring-buffer-client-discard.o
 obj-m += ltt-ring-buffer-client-overwrite.o
 
 obj-m += ltt-relay.o
 ltt-relay-objs :=  ltt-events.o ltt-event-header.o ltt-debugfs-abi.o \
-                       ltt-probes.o
+                       ltt-probes.o ltt-core.o
 
 obj-m += probes/
 
index f9f5bedf7913c37ccaf24e92fe6af8c5e674803f..2f200ed143e73ae2bad5e364d5c98023f8f72a25 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/file.h>
 #include <linux/uaccess.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>     /* For vmalloc_sync_all */
 #include "wrapper/ringbuffer/vfs.h"
 #include "ltt-debugfs-abi.h"
 #include "ltt-events.h"
@@ -537,6 +538,7 @@ int __init ltt_debugfs_abi_init(void)
 {
        int ret = 0;
 
+       vmalloc_sync_all();
        lttng_dentry = debugfs_create_file("lttng", S_IWUSR, NULL, NULL,
                                           &lttng_fops);
        if (IS_ERR(lttng_dentry) || !lttng_dentry) {
index 5ce710cef7285c3da0000d11012ad5fd72f416d1..e889c571a5e81f4faba1490c92950fd05074b55b 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/module.h>
 #include <linux/types.h>
+#include <linux/vmalloc.h>     /* for vmalloc_sync_all */
 #include "wrapper/trace-clock.h"
 #include "ltt-events.h"
 #include "ltt-tracer.h"
@@ -198,6 +199,11 @@ static struct ltt_transport ltt_relay_transport = {
 
 static int __init ltt_ring_buffer_client_init(void)
 {
+       /*
+        * This vmalloc sync all also takes care of the lib ring buffer
+        * vmalloc'd module pages when it is built as a module into LTTng.
+        */
+       vmalloc_sync_all();
        printk(KERN_INFO "LTT : ltt ring buffer client init\n");
        ltt_transport_register(&ltt_relay_transport);
        return 0;
index b6109f2f55de4eacb3ee86a7892f03612752d404..38c61cd85dfb8ffd2057c756f8d9597be7658ac2 100644 (file)
@@ -1,6 +1,7 @@
 #include <lttng.h>
 #include <lttng-types.h>
 #include <linux/debugfs.h>
+#include <linux/vmalloc.h>     /* for vmalloc_sync_all() */
 #include "../wrapper/ringbuffer/frontend_types.h"
 #include "../ltt-events.h"
 #include "../ltt-tracer-core.h"
@@ -572,6 +573,7 @@ static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void)
        int ret;
        int i;
 
+       vmalloc_sync_all();
        ret = TP_ID(__lttng_types_init__, TRACE_SYSTEM)();
        if (ret)
                return ret;
index c88d4735d968d482faa63e420feba1f4229662b1..a4b40cf720b604466b03794dbc5c93f0ddc90dbe 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/seq_file.h>
 #include <linux/jbd.h> /* tid_t */
 #include <linux/debugfs.h>
+#include <linux/vmalloc.h>     /* for vmalloc_sync_all */
 #include "lttng-types.h"
 
 struct dentry *lttng_types_dentry;
@@ -185,6 +186,7 @@ static int lttng_types_init(void)
 {
        int ret = 0;
 
+       vmalloc_sync_all();
        lttng_types_dentry = debugfs_create_file("lttng-types", S_IWUSR,
                                        NULL, NULL, &lttng_types_fops);
        if (IS_ERR(lttng_types_dentry) || !lttng_types_dentry) {
This page took 0.027794 seconds and 4 git commands to generate.