fche [Sun, 6 May 2007 20:58:48 +0000 (20:58 +0000)]
2007-05-06 Frank Ch. Eigler <fche@elastic.org>
PR 1305.
* tapsets.cxx (iterate_over_srcfile_lines): Exclude approximate
file:lineno matches optimistically returned by dwarf_getsrc_file.
(query_srcfile_line): Use Dwarf_Line line number for constructing
derived_probe location string.
dsmith [Wed, 2 May 2007 21:27:10 +0000 (21:27 +0000)]
2007-05-02 David Smith <dsmith@redhat.com>
* translate.cxx (c_tmpcounter::visit_functioncall): Updated
temporary handling.
(c_unparser::visit_functioncall): No longer copies numeric and
string constants to temporary variables.
dsmith [Tue, 1 May 2007 18:06:37 +0000 (18:06 +0000)]
2007-05-01 David Smith <dsmith@redhat.com>
* translate.cxx (c_tmpcounter::visit_binary_expression): Updated
temporary handling.
(c_unparser::visit_binary_expression): Improved handing of numeric
constants when handling '%' and '/' operators.
(c_tmpcounter::visit_print_format): Updated temporary handling.
(c_unparser::visit_print_format): Removed the need for a result
temporary when printing to a stream.
PR 2339
* translate.cxx (c_unparser_assignment::c_assignop): Improved
handling of numeric constants in the rest of the assignment
operators.
(c_tmpcounter_assignment::c_assignop): Updated temporary
handling.
* utt.c (utt_trace_cleanup): Remove free of utt->sequence.
(utt_dropped_open): PR 4415. Use STAPCONF_INODE_PRIVATE to detect
correct inode struct.
(utt_trace_setup): Do not allocate utt->sequence.
PR 4432.
* buildrun.cxx (compile_pass): Tweak autoconf CFLAGS handling to
avoid macro recursion but still get the needed -I directives.
Add the inode-private autoconf test.
PR 2339
* translate.cxx: Renamed "qname" to "value" throughout, since
there are times now when qname would refer to a constant value.
(tmpvar::override): Added function to allow for overriding a
temporary variable name with a string.
(tmpvar::value): New function that returns either the overridden
string or the temporary variable name.
(c_unparser::c_expression): New function.
(c_unparser_assignment::c_assignop): Speed up assignment when
numeric or string constants are used.
(c_tmpcounter::visit_block): Avoid empty structs inside the union
of temporary variables.
(c_tmpcounter_assignment::prepare_rvalue): New function.
(c_tmpcounter_assignment::c_assignop): New function.
(c_tmpcounter_assignment::visit_symbol): Update temporary
declarations.
(c_unparser_assignment::prepare_rvalue): Speed up use of rvalues
by using numeric and string constants directly instead of copying
them to temporaries first.
(c_tmpcounter::load_map_indices): New function.
(c_unparser::load_map_indices): Speed up use of numeric and string
constants as map indices.
(c_tmpcounter::visit_arrayindex): Updated temporary declarations.
(c_tmpcounter_assignment::visit_arrayindex): Updated temporary
declarations.
* translate.h (class translator_output): Added tellp() and seekp()
functions.
* 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.