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.
dsmith [Mon, 26 Feb 2007 20:41:58 +0000 (20:41 +0000)]
2007-02-26 David Smith <dsmith@redhat.com>
* Makefile.am: Removed 'update-examples' target. Moved
functionality to systemtap.spec.in.
* Makefile.in: Regenerated from Makefile.am.
* systemtap.spec.in: Fixes paths in the example scripts directly.
dsmith [Mon, 26 Feb 2007 19:29:47 +0000 (19:29 +0000)]
2007-02-26 David Smith <dsmith@redhat.com>
* Makefile.am: Added 'update-examples' target that fixes paths in
the example code we ship in the rpm.
* Makefile.in: Regenerated from Makefile.am.
* systemtap.spec.in: Calls "make update-examples" target to fix
the path to systemtap in the example scripts.
dwilder [Mon, 26 Feb 2007 01:41:46 +0000 (01:41 +0000)]
Changed the s390 versions of __stp_put_asm __stp_get_asm to use EX_TABLE macro eliminating the need for both a s390 and s390x version of these functions. This alos fixed an aligment problem building the the exception table.
fche [Sun, 25 Feb 2007 23:03:49 +0000 (23:03 +0000)]
2007-02-25 Frank Ch. Eigler <fche@redhat.com>
* elaborate.h (match_node, derived_probe_builder): Add
build_no_more member function.
* elaborate.cxx (semantic_pass_symbols): Call it.
* tapsets.cxx (dwarf_builder): Implement it by releasing dwflpp
instance after pass 2, freeing mucho memory.
jistone [Fri, 23 Feb 2007 23:16:57 +0000 (23:16 +0000)]
2007-02-23 Josh Stone <joshua.i.stone@intel.com>
PR 4096
* tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls):
Adapt the function signature for changes in 2.6.21.
(hrtimer_derived_probe_group::emit_module_init): Fix the enum name
for 2.6.21 as well.
dsmith [Tue, 20 Feb 2007 15:37:50 +0000 (15:37 +0000)]
2007-02-19 David Smith <dsmith@redhat.com>
PR 4081
* Makefile.am: The symbolic link that the Makefile creates to stap
now points to the installed version of stap when "make
installcheck" is run.
* Makefile.in: Regenerated.
fche [Sat, 17 Feb 2007 12:26:14 +0000 (12:26 +0000)]
2007-02-17 Frank Ch. Eigler <fche@elastic.org>
PR 4066.
* translate.cxx (var::init): Check stat scalar initialization,
just like is done for arrays.
(emit_module_exit): Check unlikely but possible null timing stat.
dsmith [Thu, 15 Feb 2007 21:55:05 +0000 (21:55 +0000)]
2007-02-15 David Smith <dsmith@redhat.com>
PR 3625.
* tapsets.cxx (dwflpp::print_locals): New function to print all
the variables/parameters of a function.
(dwflpp::find_variable_and_frame_base): Calls print_locals() when
target variable can't be found.
(dwflpp::print_members): New function to print all the members of
a union/structure.
(dwflpp::translate_components) Calls print_members() when
union/structure member target variable reference can't be found.
hunt [Wed, 7 Feb 2007 15:54:10 +0000 (15:54 +0000)]
2007-02-07 Martin Hunt <hunt@redhat.com>
* stack-ppc64.c (__stp_stack_print): Remove an old
reference to the string length and instead limit backtraces
to MAXBACKTRACE.
* stack.c: Define MAXBACKTRACE
jistone [Wed, 7 Feb 2007 02:54:30 +0000 (02:54 +0000)]
2007-02-06 Josh Stone <joshua.i.stone@intel.com>
* aux_syscalls.stp, inet_sock.stp, ioblock.stp, ioscheduler.stp,
nfs.stp, nfs_proc.stp, nfsd.stp, rpc.stp, scsi.stp, signal.stp,
socket.stp, task.stp, tcp.stp, vfs.stp: Protect pointer dereferences
with kread wherever possible. Some places still have hazards, as
marked with FIXMEs.
* errno.stp (returnstr): Don't use return in tapset C functions.
* aux_syscalls.stp (__uget_timex_m): Ditto.
* nfsd.stp (__get_fh): Ditto.
* nfs.stp, vfs.stp (<many functions>): Ditto.
* string.stp (substr): Ditto. Also make sure start index is valid.
* syscalls.stp (syscall.execve): Change __string to kernel_string.
LKET/
* nfs.stp, nfs_proc.stp, nfsd.stp, process.stp, tskdispatch.stp:
Protect pointer dereferences with kread wherever possible. Some
places still have hazards, as marked with FIXMEs.
* aio.stp (log_io_getevents): Don't use return in tapset C functions.
* timestamp.stp (set_timing_method): Ditto.
* utils.stp (filter_by_pid): Ditto.
hunt [Wed, 31 Jan 2007 20:17:02 +0000 (20:17 +0000)]
2007-01-31 Martin Hunt <hunt@redhat.com>
* context.stp (print_backtrace): Modify for new
_stp_stack_print.
(backtrace): Just use _stp_stack_snprint().
(print_stack): Use new _stp_print* functions.
(probefunc): Use _stp_symbol_snprint.
hunt [Wed, 31 Jan 2007 20:13:02 +0000 (20:13 +0000)]
2007-01-31 Martin Hunt <hunt@redhat.com>
* string.c (_stp_string_init): Deleted.
(_stp_sprintf): Deleted.
(_stp_vsprintf): Deleted.
(_stp_string_cat_cstr): Deleted.
(_stp_string_cat_string): Deleted.
(_stp_string_cat_char): Deleted.
(_stp_string_ptr): Deleted.
(_stp_string_cat): Deleted.
(_stp_snprintf): Moved from vsprintf.c.
(_stp_vscnprintf): Moved from vsprintf.c.
* string.h (STP_STRING_SIZE): Deleted.
(STP_NUM_STRINGS): Deleted.
Remove all references to type "String".
* vsprintf.c (_stp_vscnprintf): Moved to string.c.
(_stp_snprintf): Moved to string.c
* sym.c (_stp_symbol_sprint): Replaced with
_stp_symbol_print, which writes to the print buffer.
(_stp_symbol_sprint_basic): Replaced with
_stp_symbol_snprint.
* runtime.h: Include io.c.
* stat-common.c: Use new _stp_print* functions.
* stat.c: Ditto.
* regs.c: Renamed to regs-ia64.c.
* current.c: Renamed regs.c.
* regs-ia64.c: New file (renamed from regs.c).
* stack.c (_stp_stack_sprint): Renamed _stp_stack_print
and now just prints to the print buffer. Calls
__stp_stack_print instead of __stp_stack_sprint.
(_stp_stack_snprint): New function. Calls _stp_stack_print and
then copies the print buffer into a string.
(_stp_stack_printj): Deleted.
(_stp_ustack_sprint): Deleted.
* stack-*.c: Rewritten to print instead of writing to strings.
Uses new _stp_print* functions.
* print.c (_stp_printf): Create new function instead of macro.
(_stp_print): Ditto.
(_stp_print_char): New function.
* map.c: Use _stp_print() and _stp_print_char()
instead of _stp_print_cstr().
* io.c (_stp_vlog): Use _stp_print() instead
of _stp_string_cat_cstr().
hunt [Tue, 30 Jan 2007 19:18:06 +0000 (19:18 +0000)]
2007-01-30 Martin Hunt <hunt@redhat.com>
* io.c (_stp_vlog): Use dynamic percpu allocations
instead of very wasteful static allocations.
* print.c (_stp_print_init): Do percpu allocations
for io.c.
(_stp_print_cleanup): Free percpu allocations.
* string.c (_stp_sprintf): Overflow check needed
to be >= instead of >.
hunt [Tue, 30 Jan 2007 17:13:46 +0000 (17:13 +0000)]
2007-01-30 Martin Hunt <hunt@redhat.com>
* alloc.c (_stp_alloc_percpu): Don't implement
our own; just call __alloc_percpu with appropriate args
for the OS version.
(_stp_free_percpu): Delete.
* map.c (_stp_map_init): When calling kmalloc_node, first
call cpu_to_node() to get the proper node number.
* stat.c (_stp_stat_del): Call free_percpu()
instead of _stp_free_percpu().