summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog10
-rw-r--r--runtime/Makefile6
-rw-r--r--runtime/README.doc12
-rw-r--r--runtime/TODO22
-rw-r--r--runtime/io.c14
-rw-r--r--runtime/print.c6
-rw-r--r--runtime/runtime.h4
7 files changed, 31 insertions, 43 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 69864f19..05367f27 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,13 @@
+2005-08-19 Martin Hunt <hunt@redhat.com>
+
+ * print.c: Change ifdefs to STP_RELAYFS.
+ * runtime.h: Ditto.
+ * io.c (_stp_vlog): Call _stp_write instead of
+ _stp_ctrl_send.
+ * Makefile: Don't build stp-control.
+ * README.doc: Update.
+ * TODO: Update.
+
2005-08-12 Graydon Hoare <graydon@redhat.com>
* map-values.c (_stp_map_entry_exists): New function.
diff --git a/runtime/Makefile b/runtime/Makefile
index 1b654f67..22d25ff9 100644
--- a/runtime/Makefile
+++ b/runtime/Makefile
@@ -3,13 +3,13 @@
#
all:
- make -w -C relayfs
- make -w -C transport
make -w -C stpd
cd probes; ./build
+relayfs:
+ make -w -C relayfs
+
clean:
make -w -C relayfs clean
- make -w -C transport clean
make -w -C stpd clean
cd probes; ./build clean
diff --git a/runtime/README.doc b/runtime/README.doc
index 12d0aad0..2fa3f5ff 100644
--- a/runtime/README.doc
+++ b/runtime/README.doc
@@ -16,7 +16,7 @@ In addition to the library, the runtime includes a SystemTap user-space daemon
and/or saves it to files. Stpd will handle other issues like
inserting and removing modules.
-Stpd and the I/O code make use of both relayfs and netlink for communication. For
+Stpd and the I/O code makes use of /proc (and optionally relayfs) for communications. For
kernels without relayfs builtin, it is provided as a standalone module under the runtime directory.
@ref start_page
@@ -106,16 +106,16 @@ data is ready and reads a big per-cpu chunk.
The user-daemon (stpd) saves this data to a file named something like
"stpd_cpu2". When the user hits ^c, a timer expires, or the probe
-module notifies stpd (through a netlink command channel) that it wants
+module notifies stpd that it wants
to terminate, stpd does "system(rmmod)" then collects the last output
before exiting.
-As an option, if we don't need bulk per-cpu data, we can put
+As an option, if we want high-speed bulk per-cpu data, we can put
\code
-#define STP_NETLINK_ONLY
+#define STP_RELAYFS
\endcode
-at the top of the module and all output will go over a netlink channel.
+at the top of the module and all output will go over relayfs.
In the SystemTap language, we will provide some simple functions to control the buffering policy, which
-will control the use of netlink and parameters to relayfs and stpd.
+will control the parameters to relayfs and stpd.
*/
diff --git a/runtime/TODO b/runtime/TODO
index 41938a9d..794110d9 100644
--- a/runtime/TODO
+++ b/runtime/TODO
@@ -4,31 +4,9 @@
***** STPD *****
-@todo stpd needs an option to disable ANSI colors.
-
-@todo stpd needs to be able to write netlink REALTIME_DATA to a file.
-
-@todo stpd/stp/io.c stpd needs better startup/shutdown integration with io.c in runtime.
-Shutdown works, but isn't very clean. Currently the stp script loads the module, then
-starts stpd. Data is lost until stpd is active. Maybe stpd needs to load the module.
-Maybe it needs to signal the module that stpd is ready and the module can proceed to load the probes.
-
-@todo stpd/stp - What if there are multiple probes running?
-
-@todo stpd/stp - Need something to post-process relayfs files and integrate into a single file.
-
@todo stpd - Implement command that runtime can send to stpd to tell it to fork a specified program and pass
the output from the probe module to it. Create example probe to use it.
-***** relayfs *****
-@todo relayfs/build - figure out how to get rid of the linker warnings when building probes.
-
***** runtime *****
-@todo runtime - Clean up #defines. Need to have a clearer way to have the probe writer (translator)
-see which defines affect what and all defines should have reasonable defaults.
-
@todo runtime - current.c - implement a memory dump function. Does a hex dump into String or print buffer.
-@todo runtime - put wrappers around current task struct entries, like pid, ppid, comm, etc.
-@todo runtime - Implement stack functions for kprobes (not just jprobes)
-
*/
diff --git a/runtime/io.c b/runtime/io.c
index 30e4687f..f4f042a8 100644
--- a/runtime/io.c
+++ b/runtime/io.c
@@ -55,18 +55,18 @@ static void _stp_vlog (enum code type, char *func, int line, const char *fmt, va
}
buf[num + start] = '\0';
-#ifdef STP_NETLINK_ONLY
+#ifdef STP_RELAYFS
if (type != DBUG)
- _stp_ctrl_send(STP_REALTIME_DATA, buf, start + num + 1, _stp_pid);
+ _stp_write(STP_REALTIME_DATA, buf, start + num + 1);
+ _stp_string_cat_cstr(_stp_stdout,buf);
+ _stp_print_flush();
+#else
+ if (type != DBUG)
+ _stp_write(STP_REALTIME_DATA, buf, start + num + 1);
else {
_stp_string_cat_cstr(_stp_stdout,buf);
_stp_print_flush();
}
-#else
- if (type != DBUG)
- _stp_ctrl_send(STP_REALTIME_DATA, buf, start + num + 1, _stp_pid);
- _stp_string_cat_cstr(_stp_stdout,buf);
- _stp_print_flush();
#endif
}
put_cpu();
diff --git a/runtime/print.c b/runtime/print.c
index 2e3d539c..794cd273 100644
--- a/runtime/print.c
+++ b/runtime/print.c
@@ -25,7 +25,7 @@
static int _stp_pbuf_len[NR_CPUS];
-#ifdef STP_NETLINK_ONLY
+#ifndef STP_RELAYFS
#define STP_PRINT_BUF_START 0
/** Size of buffer, not including terminating NULL */
@@ -58,7 +58,7 @@ void _stp_print_flush (void)
*buf = 0;
}
-#else /* ! STP_NETLINK_ONLY */
+#else /* STP_RELAYFS */
/* size of timestamp, in bytes, including space */
#define TIMESTAMP_SIZE 11
@@ -102,7 +102,7 @@ void _stp_print_flush (void)
_stp_pbuf_len[cpu] = 0;
*ptr = 0;
}
-#endif /* STP_NETLINK_ONLY */
+#endif /* STP_RELAYFS */
/** Print into the print buffer.
* Like printf, except output goes to the print buffer.
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 549738e1..88ccc196 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -44,14 +44,14 @@
/* atomic globals */
static atomic_t _stp_transport_failures = ATOMIC_INIT (0);
-#ifndef STP_NETLINK_ONLY
+#ifdef STP_RELAYFS
static struct
{
atomic_t ____cacheline_aligned_in_smp seq;
} _stp_seq = { ATOMIC_INIT (0) };
#define _stp_seq_inc() (atomic_inc_return(&_stp_seq.seq))
-#endif
+#endif /* RELAYFS */
#include "print.c"
#include "string.c"