summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-06-12 13:20:57 -0500
committerDavid Smith <dsmith@redhat.com>2009-06-12 13:20:57 -0500
commitd05b7a1c363c30c7fcd9d163f457c1ed80d28f19 (patch)
tree29fc08c4349a3951b790c334465a94d027000a12
parent5dce84d4fe74644ef76004ff0402510b289a2778 (diff)
downloadsystemtap-steved-d05b7a1c363c30c7fcd9d163f457c1ed80d28f19.tar.gz
systemtap-steved-d05b7a1c363c30c7fcd9d163f457c1ed80d28f19.tar.xz
systemtap-steved-d05b7a1c363c30c7fcd9d163f457c1ed80d28f19.zip
Fixed non-bulkmode output on smp systems using transport version 2.
* runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Set the 'is_global' return parameter so that smp systems work correctly.
-rw-r--r--runtime/transport/relay_v2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c
index 16b5afa1..246c4965 100644
--- a/runtime/transport/relay_v2.c
+++ b/runtime/transport/relay_v2.c
@@ -204,6 +204,21 @@ __stp_relay_create_buf_file_callback(const char *filename,
{
struct dentry *file = debugfs_create_file(filename, mode, parent, buf,
&relay_file_operations);
+ /*
+ * Here's what 'is_global' does (from linux/relay.h):
+ *
+ * Setting the is_global outparam to a non-zero value will
+ * cause relay_open() to create a single global buffer rather
+ * than the default set of per-cpu buffers.
+ */
+ if (is_global) {
+#ifdef STP_BULKMODE
+ *is_global = 0;
+#else
+ *is_global = 1;
+#endif
+ }
+
if (IS_ERR(file)) {
file = NULL;
}