hunt [Mon, 6 Mar 2006 20:42:22 +0000 (20:42 +0000)]
2006-03-06 Martin Hunt <hunt@redhat.com>
* librelay.c (start_cmd): Set proper uid/gid before execing
command.
(system_cmd): New function.
(cleanup_and_exit): Wait for any child processes to complete.
(stp_main_loop): Recognize STP_SYSTEM message.
jistone [Fri, 3 Mar 2006 18:37:33 +0000 (18:37 +0000)]
2006-03-03 Josh Stone <joshua.i.stone@intel.com>
* main.cxx (main): search forward for dashes in the kernel release,
to work properly with release names with more than one dash.
* parse.cxx (eval_pp_conditional): ditto
* tapsets.cxx (profile_derived_probe::profile_derived_probe): ditto
* safety/safety.py (StaticSafety::__build_search_suffixes): ditto,
and add copyright & GPL tag
fche [Sat, 25 Feb 2006 21:05:46 +0000 (21:05 +0000)]
2006-02-25 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (var::init): Don't crush string module_params.
(emit_global_param): New function, forked out of emit_global,
to put module_param calls at the bottom of C file.
* translate.h: Corresponding changes.
hunt [Sat, 25 Feb 2006 10:18:39 +0000 (10:18 +0000)]
2006-02-25 Martin Hunt <hunt@redhat.com>
* procfs.c (_stp_proc_write_cmd): Check return code for
_stp_transport_open().
* transport.c (_stp_transport_write): This function
can now sleep because it is
(_stp_handle_start): Don't use a mutex when a simple atomic
will do.
(_stp_work_queue): Check atomic to see if probe_start()
has finished before attempting exit.
(_stp_transport_close): PR2391. Cancel work queue.
(_stp_transport_init): If _stp_register_procfs() fails,
return an error code.
* transport.txt: New file. Documents transport initialization and
shutdown sequence.
fche [Thu, 23 Feb 2006 22:35:40 +0000 (22:35 +0000)]
2006-02-23 Frank Ch. Eigler <fche@elastic.org>
PR 1304
* parse.cxx (lexer): Take systemtap_session argument.
(lexer::scan): Support $1..$NNNN and @1...@NNNN expansion.
* stap.1.in: Document this.
* testsuite/semok/args.stp: New test.
* translate.cxx (var::init, emit_global): Emit code to allow
named module parameters to initialize global string/number scalars.
* stap.1.in: Don't document this yet.
hunt [Thu, 23 Feb 2006 21:01:51 +0000 (21:01 +0000)]
2006-02-23 Martin Hunt <hunt@redhat.com>
PR 1989. Adds support for %p in printf
* staptree.h (struct print_format): Add conv_unsigned_ptr.
* staptree.cxx (components_to_string): Output 'p'
for conv_unsigned_ptr.
* elaborate.cxx (visit_print_format): Add case for
conv_unsigned_ptr.
hunt [Thu, 23 Feb 2006 20:17:00 +0000 (20:17 +0000)]
2006-02-23 Martin Hunt <hunt@redhat.com>
* Makefile.am (install-data-local): Create tapset/i686 and tapset/x86_64
directories. This fixes a problem where they were included, but had
bad permissions.
* Makefile.in: Rebuilt.
hien [Mon, 20 Feb 2006 22:46:07 +0000 (22:46 +0000)]
These aliases moved here from the common one, since ppc64 does not have these
sys_fstat
sys_getegid16
sys_geteuid16
sys_getgid16
sys_getgroups16
sys_getuid16
sys_lstat
sys_mmap2
sys_setgroups16
sys_stat
hien [Mon, 20 Feb 2006 22:41:38 +0000 (22:41 +0000)]
Moved these aliases to arch specific areas
sys_fstat
sys_getegid16
sys_geteuid16
sys_getgid16
sys_getgroups16
sys_getuid16
sys_lstat
sys_mmap2
sys_setgroups16
sys_stat
hien [Mon, 20 Feb 2006 22:41:00 +0000 (22:41 +0000)]
Move these aliases to arch specific areas
sys_fstat
sys_getegid16
sys_geteuid16
sys_getgid16
sys_getgroups16
sys_getuid16
sys_lstat
sys_mmap2
sys_setgroups16
sys_stat
hunt [Tue, 14 Feb 2006 09:03:16 +0000 (09:03 +0000)]
2006-02-14 Martin Hunt <hunt@redhat.com>
* aux_syscalls.stp (_struct_timeval_u): New function.
(_struct_timeval): New function.
(_struct_timespec_u): New function.
(_struct_timespec): New function.
(_struct_itimerval_u): New function:
(_struct_itimerval): New function:
(_signal_name): New function.
(_module_flags_str): Fixed.
* syscalls2.stp (syscall.setitimer): Use new function
_struct_itimerval_u().
fche [Wed, 8 Feb 2006 00:47:51 +0000 (00:47 +0000)]
2006-02-07 Frank Ch. Eigler <fche@elastic.org>
* src/testsuite/buildok/syscalls.stp: Build with "-u" to build-test
all auxiliary functions.
* tapsets.cxx (dwarf_query::add_probe_point): Add some "-vv" output.
fche [Sat, 28 Jan 2006 02:42:08 +0000 (02:42 +0000)]
2006-01-27 Frank Ch. Eigler <fche@elastic.org>
* main.cxx: Make "-v" (verbose) flag a counter.
* stap.1.in: Document this.
* session.h: Corresponding changes.
* {elaborate,buildrun,tapsets,translate}.cxx: Update all uses of
verbose flag to compare it to sensible level for value of message.
fche [Thu, 26 Jan 2006 22:55:20 +0000 (22:55 +0000)]
2006-01-26 Frank Ch. Eigler <fche@elastic.org>
PR 2060: lock elevation, mop-up
* staptree.cxx (functioncall_traversing_visitor): Store a
current_function pointer during traversal.
(visit_embeddedcode): Use it to handle $target-synthesized functions.
(varuse_collecting_visitor::visit_assignment): Correct l-lr typo.
(visit_foreach_loop): Note added write on sorted foreach.
(visit_delete_statement): Note as read+write.
* staptree.h: Corresponding changes.
* elaborate.cxx (dead_assignment_remover::visit_expr_statement):
Correct stmt token after possible expression rewriting.
* tapsets.cxx (visit_target_symbol): Create naming convention
to recognize $target-synthesized functions.
* translate.cxx (emit_locks, emit_unlocks): New functions to
emit lock/unlock sequences at the outermost level of a probe.
(emit_probe): Call them.
(varlock_*): #if-0 out the lock code generation. Later, these
classes should be removed.
(translate_pass): Emit read_trylock() kludge macro for old kernels.
fche [Tue, 24 Jan 2006 17:58:02 +0000 (17:58 +0000)]
2006-01-24 Frank Ch. Eigler <fche@elastic.org>
PR 2060 etc.
* tapsets.cxx (visit_target_symbol): Tolerate failed resolution by
letting target_symbol instance pass through to optimizer and
type checker.
* elaborate.cxx (semantic_pass_optimize): New family of functions and
associated visitor classes.
(visit_for_loop): Tolerate absent init/incr clauses.
(semantic_pass): Invoke unless unoptimized (-u) option given.
* main.cxx, session.h: Add support for flag.
* staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses.
(traversing_visitor::visit_arrayindex): Visit the index expressions.
(functioncall_traversing_visitor): New class.
(varuse_tracking_visitor): New class.
* staptree.h: Corresponding changes.
* parse.cxx (parse_for_loop): Represent absent init/incr expressions
with null statement pointer instead of optimized-out dummy numbers.
* stap.1.in: Document optimization.
* testsuite/{semko,transko}/*.stp: Added "-u" or other code to many
tests to check bad code without optimizer elision.
* testsuite/semok/optimize.stp: New test.
* elaborate.cxx (unresolved, invalid, mismatch): Standardize error
message wording.
* stapfuncs.5.in: Tweak print/printf docs.
* tapset/logging.stp: Remove redundant "print" auxiliary function,
since it's a translator built-in.
* testsuite/transok/five.stp: Extend test.
* translate.cxx (emit_symbol_data): Put symbol table into a separate
temporary header file, to make "-p3" output easier on the eyes.
* buildrun.cxx (compile_pass): Eliminate test-mode support throughout.
* main.cxx, session.h, translate.cxx: Ditto.
* main.cxx (main): For last-pass=2 runs, print post-optimization ASTs.
jistone [Mon, 16 Jan 2006 23:40:50 +0000 (23:40 +0000)]
2006-01-16 Josh Stone <joshua.i.stone@intel.com>
PR 2140
* translate.cxx (mapvar::del): Add ability to delete an indexed stat
from (p)maps.
(delete_statement_operand_visitor::visit_symbol): Add ability to
delete entire pmaps and scalars.
(delete_statement_operand_tmp_visitor): Add a special tmpvar visitor
to parallel delete_statement_operand_visitor.
(c_tmpcounter::visit_delete_statement): Invoke the new visitor.
* testsuite/buildok/delete.stp: Also test scalar deletes.
* vim/syntax/stap.vim: Recognize 'delete' operator.
2006-01-16 Josh Stone <joshua.i.stone@intel.com>
* stat.c (_stp_stat_clear): add a function that just
clears a Stat, so we can use delete in the translator.
jistone [Fri, 13 Jan 2006 03:55:16 +0000 (03:55 +0000)]
2006-01-12 Josh Stone <joshua.i.stone@intel.com>
PR 2056
* translate.cxx (c_unparser::aggregation_locks): Keeps track of
foreach's locks on pmaps to avoid extra aggregation.
(c_unparser::visit_foreach_loop): Set aggregation_locks appropriately.
(c_unparser::load_aggregate, mapvar::call_prefix, mapvar::get):
Use a new parameter to indicate that we should read from the
already-aggregated map rather than the full pmap..
(c_unparser::visit_arrayindex c_unparser::visit_print_format,
c_unparser::visit_stat_op): Use aggregation_locks to avoid taking a
lock and aggregating the pmap.
(c_unparser::emit_map_type_instantiations): To read from a pmap's
aggregated map, we need to include map-gen.c for the _stp_map_*
functions.
(c_unparser::obtained_locks, varlock::varlock, varlock::~varlock):
Add simple static checking to detect incompatible nested locks during
translation, and flag it as an error.
fche [Tue, 10 Jan 2006 22:32:15 +0000 (22:32 +0000)]
2006-01-10 Frank Ch. Eigler <fche@redhat.com>
PR 1972.
* tapsets.cxx (var_expanding_copy_visitor::visit_target_symbol):
Produce error message for $var access within .return probes.
* testsuite/semko/thirtyfour.stp: New test.