* README: Changed 'stpd' references to 'staprun'.
* README.doc: Ditto.
* TODO: Ditto.
* io.c: Ditto.
* print.c: Ditto.
* runtime.h: Ditto.
* bench2/bench.rb: Ditto.
+2006-09-26 David Smith <dsmith@redhat.com>
+
+ * README: Changed 'stpd' references to 'staprun'.
+ * README.doc: Ditto.
+ * TODO: Ditto.
+ * io.c: Ditto.
+ * print.c: Ditto.
+ * runtime.h: Ditto.
+ * bench2/bench.rb: Ditto.
+
2006-09-26 Martin Hunt <hunt@redhat.com>
* time.c (_stp_init_time): Use dynamic percpu allocations
instead of evil static allocations.
-To build everything (relayfs, transport, stpd, and example probes):
+To build everything (relayfs, transport, staprun, and example probes):
> make
To clean up:
include in building a kernel module using kprobes. It
also includes I/O code to transmit its output from the kernel to userspace.
-In addition to the library, the runtime includes a SystemTap user-space daemon
-(stpd). Stpd grabs data sent from the I/O code in the runtime and displays it
-and/or saves it to files. Stpd will handle other issues like
-inserting and removing modules.
+In addition to the library, the runtime includes a SystemTap
+user-space daemon (staprun). Staprun grabs data sent from the I/O
+code in the runtime and displays it and/or saves it to files. Staprun
+will handle other issues like inserting and removing modules.
-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.
+Staprun 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
When relayfs fills an internal buffer, the user-space daemon is notified
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 that it wants
-to terminate, stpd does "system(rmmod)" then collects the last output
-before exiting.
-As an option, if we want high-speed bulk per-cpu data, we can put
+The user-daemon (staprun) saves this data to a file named something
+like "stpd_cpu2". When the user hits ^c, a timer expires, or the
+probe module notifies staprun that it wants to terminate, staprun does
+"system(rmmod)" then collects the last output before exiting. As an
+option, if we want high-speed bulk per-cpu data, we can put
\code
#define STP_RELAYFS
\endcode
-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 parameters to relayfs and stpd.
+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 parameters to relayfs and
+staprun.
*/
@file TODO
@brief To-Do List
-***** STPD *****
+***** STAPRUN *****
-@todo stpd - Implement command that runtime can send to stpd to tell it to fork a specified program and pass
+@todo staprun - Implement command that runtime can send to staprun to tell it to fork a specified program and pass
the output from the probe module to it. Create example probe to use it.
***** runtime *****
if @@printed_header == 0
print_header
end
- if @@stpd.nil?
- for path in ['/usr/libexec/systemtap/stpd', '/usr/local/libexec/systemtap/stpd']
+ if @@staprun.nil?
+ for path in ['/usr/bin/staprun', '/usr/local/bin/staprun']
if File.exist?(path)
- @@stpd = path
+ @@staprun = path
break
end
end
sum=0
threads.times {|cpu| fork {exec "./itest #{threads} > #{@dir}/bench#{cpu}"}}
threads.times {Process.waitpid(-1)} # wait for itest(s) to exit
- `sudo killall -HUP stpd`
- Process.wait # wait for stpd to exit
+ `sudo killall -HUP staprun`
+ Process.wait # wait for staprun to exit
threads.times {|x| sum = sum + `cat #{@dir}/bench#{x}`.split[0].to_i - @@ftime}
@results[threads] = sum / (threads * threads)
File.open("#{@dir}/xxx.out") do |file|
@@ftime = 0
@@printed_header = 0
- @@stpd = nil
+ @@staprun = nil
@@runtime = nil
@@num_threads = []
@@minfreq = 0
def cleanup
- system('sudo killall -HUP stpd &> /dev/null')
+ system('sudo killall -HUP staprun &> /dev/null')
system('sudo /sbin/rmmod bench &> /dev/null')
`/bin/rm -f stap.out` if File.exists?("stap.out")
`/bin/rm -f bench.stp` if File.exists?("bench.stp")
def load
args = "-q -b 8"
if @trans == RELAYFS then args = "-q" end
- fork do exec "sudo #{@@stpd} #{args} #{@dir}/bench.ko > #{@dir}/xxx 2> #{@dir}/xxx.out" end
+ fork do exec "sudo #{@@staprun} #{args} #{@dir}/bench.ko > #{@dir}/xxx 2> #{@dir}/xxx.out" end
sleep 5
end
end
args = "-q -b 8"
if @trans == RELAYFS then args = "-q" end
- fork do exec "sudo #{@@stpd} #{args} #{@dir}/bench.ko > #{@dir}/xxx 2> #{@dir}/xxx.out" end
+ fork do exec "sudo #{@@staprun} #{args} #{@dir}/bench.ko > #{@dir}/xxx 2> #{@dir}/xxx.out" end
sleep 5
end
}
/** Logs Data.
- * This function sends the message immediately to stpd. It
+ * This function sends the message immediately to staprun. It
* will also be sent over the bulk transport (relayfs) if it is
* being used. If the last character is not a newline, then one
* is added. This function is not as efficient as _stp_printf()
}
/** Prints warning.
- * This function sends a warning message immediately to stpd. It
+ * This function sends a warning message immediately to staprun. It
* will also be sent over the bulk transport (relayfs) if it is
* being used. If the last character is not a newline, then one
* is added.
}
/** Exits and unloads the module.
- * This function sends a signal to stpd to tell it to
+ * This function sends a signal to staprun to tell it to
* unload the module and exit. The module will not be
* unloaded until after the current probe returns.
* @note Be careful to not treat this like the Linux exit()
}
/** Prints error message and exits.
- * This function sends an error message immediately to stpd. It
+ * This function sends an error message immediately to staprun. It
* will also be sent over the bulk transport (relayfs) if it is
* being used. If the last character is not a newline, then one
* is added.
/** Prints error message.
- * This function sends an error message immediately to stpd. It
+ * This function sends an error message immediately to staprun. It
* will also be sent over the bulk transport (relayfs) if it is
* being used. If the last character is not a newline, then one
* is added.
* _stp_print_flush() is called.
*
* The reason to do this is to allow multiple small prints to be combined then
- * timestamped and sent together to stpd. This is more efficient than sending
+ * timestamped and sent together to staprun. This is more efficient than sending
* numerous small packets.
*
* This function is called automatically when the print buffer is full.
return;
#ifdef STP_RELAYFS_MERGE
- /* In merge-mode, stpd expects relayfs data to start with a 4-byte length */
+ /* In merge-mode, staprun expects relayfs data to start with a 4-byte length */
/* followed by a 4-byte sequence number. In non-merge mode, anything goes. */
*((uint32_t *)pb->timestamp) = _stp_seq_inc();
#ifdef DEBUG
/** Prints debug line.
- * This function prints a debug message immediately to stpd.
+ * This function prints a debug message immediately to staprun.
* If the last character is not a newline, then one is added.
* @param args A variable number of args in a format like printf.
* @ingroup io