* systemtap.printf/out*: New output tests to stress output
buffering and transport.
* systemtap.printf/mixed*: More output tests mixing print,
printf, and print_char.
* systemtap.printf/end*: Test that output from end probes
is all sent.
* bench2/bench.rb (Stapbench::run): Check result code
of "killall staprun". If it is nonzero, something happened to
staprun. Print an error.
(Stapbench::load): Define STP_NO_OVERLOAD.
* bench2/README: Update.
* bench2/print_bench: New set of tests.
2007-04-03 Pierre Peiffer <pierre.peiffer@bull.net>
* parse.cxx, parse.h (lexer::scan): Add $# and @# identifiers.
(eval_pp_conditional, scan_pp): Allow the use of $x and @x identifiers.
Produce more accurate error messages.
* stap.1.in: Document $# and @# identifiers.
2007-04-04 Pierre Peiffer <pierre.peiffer@bull.net>
* parseok/fourteen.stp: Add test about $# and @# usage during
the preprocessing.
* parseko/preprocess10.stp: New test.
* parseko/preprocess11.stp: New test.
* parseko/preprocess12.stp: New test.
* relay_old.c (close_oldrelayfs): If just detaching, call
pthread_cancel.
(open_relayfs_files): Just return 0 if relay_fd[cpu] not opened.
(init_oldrelayfs): Scan percpu files to calculate ncpus.
* mainloop.c (init_staprun): Call old transport init when necessary.
(cleanup_and_exit): Ignore signals when cleaning up.
* ctl.c (read_buffer_info): For old transport, need to read transport
parameters.
dsmith [Fri, 30 Mar 2007 16:01:57 +0000 (16:01 +0000)]
2007-03-30 David Smith <dsmith@redhat.com>
PR 2341
* translate.cxx (c_unparser::emit_locks): No longer emits a read
lock for global variables that are only written to in begin/end
probes.
(c_unparser::emit_unlocks): Ditto.
(translate_pass): Runs a varuse_collecting_visitor over probes
that need global variable locks for use in
emit_locks()/emit_unlocks().
dsmith [Thu, 29 Mar 2007 16:17:12 +0000 (16:17 +0000)]
2007-03-29 David Smith <dsmith@redhat.com>
PR 4281
* main.cxx (main): Validates '-m NAME' option. Chops off '.ko' if
present. Makes sure name isn't empty. Makes sure name is only
composed of characters [_a-zA-Z0-9].
dsmith [Wed, 28 Mar 2007 20:11:37 +0000 (20:11 +0000)]
2007-03-28 David Smith <dsmith@redhat.com>
PR 2341 (partial fix)
* elaborate.h (struct derived_probe): Added needs_global_locks()
member function. Unless overridden, will return true indicating
that this probe needs locks around global variable references.
* tapsets.cxx (struct be_derived_probe): Added override of default
needs_global_locks() returning false. begin/end probes don't
need locks around global variables, since they aren't run
concurrently with any other probes.
* translate.cxx (c_unparser::emit_common_header): Updated
probe_contents logic to match the logic in emit_probe.
(c_unparser::emit_probe): Added whether the probe needs global
variable locks to the probe string (that helps eliminate duplicate
probes). The generated C changes based on whether or not global
variable locks are needed, but the pass 2 output doesn't differ
between a probe that needs global variable locks and one that
doesn't. If the probe doesn't need global variable locks, doesn't
output them.
hunt [Mon, 26 Mar 2007 16:15:11 +0000 (16:15 +0000)]
2007-03-26 Martin Hunt <hunt@redhat.com>
* mainloop.c (run_stp_check): Just use system() call.
(init_staprun): Remove _stp_pid module parameter.
(cleanup_and_exit): If closed==2, just exit without removing module.
(driver_poll): Remove. We no longer require stap running.
(_stp_main_loop): Remove call to driver_poll.
* ctl.c (init_ctl_channel): Don't put files in systemtap_pid,
revert back to systemtap/modulename.
* relay.c: Revert back to systemtap/modulename paths.
* relay_old.c: Ditto.
fche [Thu, 22 Mar 2007 20:54:27 +0000 (20:54 +0000)]
2007-03-22 Frank Ch. Eigler <fche@elastic.org>
PR 4224.
* staptree.h (probe): Add privileged field.
* elaborate.cxx, parse.cxx: Pass privileged flag to probes.
* tapsets.cxx (dwarf_query): Add has_absolute field.
(dwarf_derived_probe ctor): Tolerate it.
(register_patterns): Expose it.
(dwarf_builder::build): Implement it with no dwfl whatsoever.
* NEWS: Document kernel.statement().absolute.
* stapprobes.5.in: Ditto.
2007-03-22 Frank Ch. Eigler <fche@elastic.org>
PR 4224.
* systemtap.base/probefunc.exp: Use kernel.statement().absolute
instead with grep-found schedule_tick address.
* semko/thirtyseven.stp, thirtyeight.stp: New tests.
* buildok/twentyeight.stp: New test.
dsmith [Wed, 21 Mar 2007 19:54:14 +0000 (19:54 +0000)]
2007-03-21 David Smith <dsmith@redhat.com>
PR 4146
* tapsets.cxx (common_probe_entryfn_prologue): Added
'interruptible' parameter. If a probe is interruptible,
interrupts are not disabled while the probe executes. Preemption
is disabled however. Interruptible parameter defaults to false.
(common_probe_entryfn_epilogue): Ditto.
(be_derived_probe_group::emit_module_decl): Uses new
'interruptible' parameter to mark begin/end probes as
interruptible.
(probe_derived_probe_group::emit_module): Initialize
'actionremaining' with MAXACTION instead of initializing
'actioncount' with 0.
* translate.cxx (emit_common_header): Renamed 'actioncount' to
'actionremaining'. Turned logic around to initialize
actionremaining to MAXACTION or MAXACTION_INTERRUPTIBLE then
decrement it as actions occur.
(translate_pass): Added MAXACTION_INTERRUPTIBLE initialization.
* translate.h: Removed outdated comment portion.
* stap.1.in: Documented MAXACTION_INTERRUPTIBLE.
* NEWS: Added note about begin/end probes being run with
interrupts enabled.
hunt [Wed, 21 Mar 2007 15:09:57 +0000 (15:09 +0000)]
2007-03-21 Martin Hunt <hunt@redhat.com>
* sym.h: Declare _stp_module_relocate.
* sym.c (_stp_module_relocate): Add comments, reformat, add
a way for "last" cached values to be cleared when modules
are removed.
(_stp_symbol_print): Simplify and remove static buffer.
(_stp_symbol_snprint): Ditto.
* symbols.c (_stp_del_module): Add a call to _stp_module_relocate
to clear its cache.
fche [Tue, 20 Mar 2007 16:22:34 +0000 (16:22 +0000)]
* applying kernel drift patches
2007-03-09 Pierre Peiffer <pierre.peiffer@bull.net>
* nfsd.stp (nfsd.dispatch): Change initialization of variable
client_ip with a call to addr_from_rqst.
* rpc.stp (addr_from_rqst): - update with changes in struct svc_rqst
- __rpc_execute returns void now. struct rpc_xprt modified since
kernel 2.6.19.
* nfs.stp, vfs.stp: Local variables f_dentry renamed, because
conflicting with a new #define in kernel header linux/fs.h in 2.6.20.
2007-03-09 Pierre Peiffer <pierre.peiffer@bull.net>
* nfs.stp: Local variables f_dentry renamed, because conflicting
with a new #define in kernel header linux/fs.h in 2.6.20.
* rpc.stp (_addevent.sunrpc.sched.execute.return):
update with __rpc_execute which returns void since kernel 2.6.21.
dsmith [Mon, 19 Mar 2007 21:14:21 +0000 (21:14 +0000)]
2007-03-19 David Smith <dsmith@redhat.com>
PR 4146 (partial fix)
* tapsets.cxx (all_session_groups): Added note about stating that
begin probes should be registered (actually run) first and end
probes should be unregistered (run) last.
* translate.cxx (c_unparser::emit_module_exit): Process probe
group vector in reverse order so that probe groups will get
unregistered in the reverse order that they were registered.
fche [Mon, 19 Mar 2007 19:19:38 +0000 (19:19 +0000)]
2007-03-19 Frank Ch. Eigler <fche@elastic.org>
* buildrun.cxx (compile_pass): Emit kbuild-time autoconf widgets
to customize runtime or translator C code to actual kernel rather
than kernel version string. Thanks to FC 2.6."20" for the nudge.
* tapsets.cxx (hrtimer*emit_module): First client: HRTIMER_{MODE_}REL.
hunt [Sun, 18 Mar 2007 18:19:26 +0000 (18:19 +0000)]
2007-03-18 Martin Hunt <hunt@redhat.com>
* staprun.h (VERSION_CMD): Command to use for version check.
Changes to support runtime decision on new or old transport.
* mainloop.c (init_staprun): Check the kernel version at runtime
instead of at compile time.
(cleanup_and_exit): Call the correct relayfs close function.
(stp_main_loop): Call the correct relayfs init function.
* relay.c: Remove ifdef wrapper. File is always compiled and used
if the kernel version is appropriate.
* relay_old.c: Ditto.
dsmith [Fri, 16 Mar 2007 15:29:34 +0000 (15:29 +0000)]
2007-03-16 David Smith <dsmith@redhat.com>
PR 3545.
* tapsets.cxx (common_probe_entryfn_prologue): Added
'overload_processing' parameter, which defaults to true. If
overload_processing is set to false, doesn't output the
STP_OVERLOAD code.
(common_probe_entryfn_epilogue): Ditto.
(be_derived_probe_group::emit_module_decl): Set
overload_processing to false in calls to
common_probe_entryfn_prologue and common_probe_entryfn_epilogue
since begin/end probes shouldn't overload the system.
* translate.cxx (c_unparser::emit_common_header): Emit
STP_OVERLOAD global variables.
(translate_pass): Emit STP_OVERLOAD defines.
hunt [Wed, 14 Mar 2007 22:32:58 +0000 (22:32 +0000)]
2007-03-14 Martin Hunt <hunt@redhat.com>
* main.cxx (usage): Remove "-M" and edit description
of "-b".
* stap.1.in: Remove "-M" option and edit description of "-b".
Edit description of "-o".
hunt [Wed, 14 Mar 2007 16:19:37 +0000 (16:19 +0000)]
2007-03-14 Martin Hunt <hunt@redhat.com>
* Makefile.am (staprun_SOURCES): Sources now live in
runtime/staprun.
* makefile.in: Rebuilt.
* staprun.8.in: Updated.
* buildrun.cxx (run_pass): Use "-v" instead of not "-q" to
be compatible with latest staprun.
* translate.cxx (emit_module_exit): Print warning using
_stp_printf so it shows up at the end of all output.
(translate_pass): Replace STP_RELAYFS with STP_BULKMODE.
Eliminate STP_RELAYFS_MERGE.
hunt [Wed, 14 Mar 2007 16:13:33 +0000 (16:13 +0000)]
2007-03-14 Martin Hunt <hunt@redhat.com>
* bench2/bench.rb: Updated to work with new transport
and new itest.c.
* bench2/Makefile: Updated for new itest.c
* bench2/itest.c: Rewritten to use multiple threads
and automatically divide the workload among the threads.
* print.c (_stp_print_flush): Move to print_new.c and
print_old.c.
* print_new.c: New file containing _stp_print_flush()
for the new transport.
* print_old.c: Ditto for old transport.
* runtime.h (STP_OLD_TRANSPORT): Define
(errk): Define.
(MAXSTRINGLEN): Define if not already defined.
hunt [Wed, 14 Mar 2007 16:12:40 +0000 (16:12 +0000)]
2007-03-14 Martin Hunt <hunt@redhat.com>
* transport_msgs.h: ifdef old messages as such.
Add support for new transport.
* relayfs.c: Simplify and add new interface to look
like utt.
* utt.[ch]: New files. Similar to the proposed utt interface.
These setup and teardown relayfs on debugfs.
* control.c: New file. Implements a simple control channel.
A small subset of procfs.c.
* procfs.c: This is now only used for old kernels lacking newer
relayfs. Change STP_RELAYFS to STP_BULKMODE. Use new
messages from transport_msgs.h. Don't support
RELAYFS_CHANNEL_VERSION >= 4. CHanges all control channel functions
to new names. Use pids instead of module names in /proc names.
hunt [Wed, 14 Mar 2007 16:11:30 +0000 (16:11 +0000)]
2007-03-14 Martin Hunt <hunt@redhat.com>
* staprun.c: Renamed from stpd.c. Removed quiet and print_only
options. Added "-x" option as an alias for "-t". Removed "-m"
option. Updated arg processing to leave 4 slots for modoptions[].
Bump the priority of staprun.
* ctl.c: New. Transport control channel functions.
* relay.c: New. Relayfs control functions for new transport.
* relay_old.c: New. Relayfs control functions for older
versions of relayfs.
* mainloop.c: New. Staprun main loop.
* staprun.h: Renamed from librelay.h. Cleaned up.
* stap_merge.c: Renamed. Updated for modified save format.
fche [Mon, 12 Mar 2007 17:15:30 +0000 (17:15 +0000)]
2007-03-12 Frank Ch. Eigler <fche@redhat.com>
PR 4179.
Based on patch from Vasily Averin <vvs@sw.ru>:
* time.c (_stp_init_time): Recover from partial failures.
2007-03-12 Frank Ch. Eigler <fche@redhat.com>
PR 4179.
Based on patch from Vasily Averin <vvs@sw.ru>:
* procfs.c (_stp_register_procfs): Recover from partial failures.
* transport.c (_stp_transport_open): Ditto.
dsmith [Tue, 27 Feb 2007 18:25:04 +0000 (18:25 +0000)]
2007-02-27 David Smith <dsmith@redhat.com>
* systemtap.spec.in: Fedora Packaging Guidelines updates. Updated
BuildRoot macro value to Fedora Extras standard value. No longer
uses %makeinstall macro. The rpm now owns the
/usr/libexec/systemtap directory.