fche [Sat, 26 May 2007 01:55:20 +0000 (01:55 +0000)]
2007-05-25 Frank Ch. Eigler <fche@redhat.com>
PR 4255 teaser.
* elaborate.cxx (has_null_param): New function.
* elaborate.h: Declare it.
* session.h: Include uprobe_derived_probes group.
* tapsets.cxx (uprobe_*): New classes.
(all_session_groups): List uprobes in list.
(register_standard_tapset): Interpret
process(#).statement(#).absolute and
process(#).statement(#).absolute.return probe points.
hunt [Fri, 25 May 2007 14:40:31 +0000 (14:40 +0000)]
2007-05-25 Martin Hunt <hunt@redhat.com>
* systemtap.samples/lket.exp (cleanfiles): Set timeout inside expect.
* systemtap.maps/absentstats.exp: Set timeout inside expect.
* lib/stap_run2.exp (stap_run2): Set timeout to 180 inside expect.
* lib/stap_run.exp (stap_run): Set timeout to 180 for slower machines.
Remove $ anchor on output. Fix a few minor nits in patterns.
dsmith [Mon, 21 May 2007 21:21:13 +0000 (21:21 +0000)]
2007-05-21 David Smith <dsmith@redhat.com>
PR 4446.
* elaborate.h (derived_probe::initialize_probe_context_vars): New
virtual function that will allow added context vars to be
initialized.
* translate.cxx (c_unparser::emit_common_header): Added
'mark_va_list'.
(c_unparser::emit_probe): Calls new function
initialize_probe_context_vars.
(translate_pass): Includes linux/marker.h if CONFIG_MARKERS is
defined.
* tapsets.cxx (struct dwarf_query): Split into base_query (which
contains most of the original code) and a much smaller
dwarf_query class.
(struct base_query): New class.
(dwarf_query::handle_query_module): New function.
(query_module): Moved code into dwarf_query::handle_query_module().
(mark_derived_probe): Adjusted for new kernel markers.
(mark_derived_probe_group): Ditto.
(mark_var_expanding_copy_visitor): Ditto.
(mark_var_expanding_copy_visitor::visit_target_symbol): Generates
code for new kernel markers.
(struct mark_query): New class.
(mark_query::handle_query_module): New function.
(mark_derived_probe::mark_derived_probe): Adjusted for new kernel
markers.
(mark_derived_probe::join_group): Ditto.
(mark_derived_probe::emit_probe_context_vars): Ditto.
(mark_derived_probe::parse_probe_sig): New function.
(mark_derived_probe::initialize_probe_context_vars): New function.
(mark_derived_probe::emit_module_decls): Adjust for new kernel markers.
(mark_derived_probe::emit_module_init): Ditto.
(mark_derived_probe::emit_module_exit): Ditto.
(struct mark_builder): Ditto.
(mark_builder::build): Ditto.
hunt [Thu, 17 May 2007 16:13:17 +0000 (16:13 +0000)]
2007-05-17 Martin Hunt <hunt@redhat.com>
* syscalls.stp: Make optional sys_alarm, sys_fadvise64,
sys_gethostname, sys_getpgrp, and sys_llseek.
(syscall.getrlimit): Add optional calls sys_old_getrlimit,
compat_sys_getrlimit, and compat_sys_old_getrlimit.
* syscalls2.stp: Make optional sys_nice, sys_rt_sigreturn,
sys_signal, sys_sigprocmask, sys_utime
(syscall.old_getrlimit): Moved into syscall.getrlimit.
hunt [Tue, 8 May 2007 20:38:10 +0000 (20:38 +0000)]
2007-05-08 Martin Hunt <hunt@redhat.com>
Signal handler cleanup.
* mainloop.c (fatal_handler): New. Cleanly handle
unexpected fatal signals.
(setup_main_signals): New. Set signals once mainloop
is entered.
(setup_signals): New. Block certain signals during initialization.
Set handler for fatal signals.
* relay.c (reader_thread): Use ppoll(). Terminate on
SIGUSR2 after reading any remaining data.
(close_relayfs): Remove sleep hack. Send SIGUSR2 to all threads.
Runtime debug messages.
* staprun.h: Change dbug() to accept a debuglevel and
enable it.
* *.c: Modify dbug() calls.
hunt [Mon, 7 May 2007 20:08:32 +0000 (20:08 +0000)]
2007-05-07 Martin Hunt <hunt@redhat.com>
Patch from David Smith
* mainloop.c (stp_main_loop): Properly handle write()
return value. Fixes build problem with some compilers.
hunt [Mon, 7 May 2007 17:11:49 +0000 (17:11 +0000)]
2007-05-07 Martin Hunt <hunt@redhat.com>
PR4466
* systemtap.samples/system_func.stp: Rewrite test to account
for probes not being placed until after begin.
* systemtap.samples/system_func.exp: Only expect 1 sys_open.
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().