dsmith [Thu, 24 Jan 2008 20:24:03 +0000 (20:24 +0000)]
2008-01-24 David Smith <dsmith@redhat.com>
PR 5661 (reverted).
* configure.ac: Removed elfutils version number check.
* configure: Regenerated.
* acsite.m4: Removed.
* systemtap.spec.in: Minimum elfutils version number is no longer
filled in by configure.
dsmith [Thu, 24 Jan 2008 18:11:34 +0000 (18:11 +0000)]
2008-01-24 David Smith <dsmith@redhat.com>
PR 5650 (partial).
* configure.ac: Handles sqlite optional functionality correctly.
If enabled/disabled by the user, do the right thing. If not
specified by the user, use it if present.
* configure: Regenerated.
* systemtap.spec.in: Always specify to configure whether to use
sqlite or not.
hiramatu [Thu, 24 Jan 2008 16:55:36 +0000 (16:55 +0000)]
2008-01-23 Masami Hiramatsu <mhiramat@redhat.com>
PR5554
* syscalls.stp (__is_user_regs): Add new function to check whether
pt_regs is user mode registers.
(syscall.fork): Use __is_user_regs() to decide syscall name.
brolley [Thu, 24 Jan 2008 16:43:13 +0000 (16:43 +0000)]
2008-01-24 Dave Brolley <brolley@redhat.com>
PR 5017.
* staptree.cxx (<cstring>): #include it.
(required <indexable *>): Remove 'static' from instantiation and
move instantiation to here from...
* staptree.h: ...here.
dsmith [Wed, 23 Jan 2008 19:58:41 +0000 (19:58 +0000)]
2008-01-23 David Smith <dsmith@redhat.com>
PR 5661.
* configure.ac: Checks elfutils version number.
* acsite.m4: New file containing macro to return elfutils version
number.
* configure: Regenerated.
* systemtap.spec.in: Minimum elfutils version number is now filled
in by configure.
brolley [Wed, 23 Jan 2008 19:15:19 +0000 (19:15 +0000)]
2008-01-23 Dave Brolley <brolley@redhat.com>
* translate.cxx (var::fini): New method.
(c_unparser::emit_module_init): Call var::fini when deregistering
variables without indices.
(c_unparser::emit_module_exit): Likewise.
fche [Fri, 18 Jan 2008 13:07:13 +0000 (13:07 +0000)]
PR 4936: probe pont conditions part 2; reorg in prep for full rewriting
2008-01-17 Frank Ch. Eigler <fche@elastic.org>
PR 4935.
Reorganize probe condition implementation.
* elaborate.cxx (add_condition): New function.
(derived_probe): Remove condition member.
(derived_probe ctors): Assert non-null incoming probe/location ptrs.
(insert_condition_statement): Remove; turn into ...
(semantic_pass_conditions): New pass-2 subpass.
(semantic_pass_symbols, visit_symbol, visit_functioncall, find_var):
Detect some condition-related error cases.
(match_key): Change type to exp_type from tok_type. Update callers.
(alias_expansion_builder): Propagate probe conditions.
* staptree.cxx (probe): Remove condition field and related functions.
* tapsets.cxx (dwarf_derived_probe ctor): Compute replacement
wildcard-expanded probe_point preserving more of the original
location.
(mark_derived_probe ctor): Make similar to others - take location
rather than condition parameters.
* translate.cxx (emit_common_header): Tweak ordering of tmpcounter
traversal and hashkey expression generation.
* elaborate.h: Corresponding changes.
2008-01-17 Frank Ch. Eigler <fche@elastic.org>
PR 4935.
* semko/forty.stp, fortyone.stp, fortytwo.stp: New tests.
* semok/twentynine.stp: Weaken test since condition expressions have
become more tightly constrained.
dsmith [Thu, 17 Jan 2008 20:44:34 +0000 (20:44 +0000)]
2008-01-17 David Smith <dsmith@redhat.com>
* tapsets.cxx
(perfmon_var_expanding_copy_visitor::visit_target_symbol): Print an
error when trying to use the perfmon target variable '$counter as
an array or structure.
dsmith [Thu, 17 Jan 2008 20:27:41 +0000 (20:27 +0000)]
2008-01-17 David Smith <dsmith@redhat.com>
* tapsets.cxx
(procfs_var_expanding_copy_visitor::visit_target_symbol): Print an
error when trying to use the procfs target variable '$value' as an
array or structure.
* signal.stp (get_sa_flags, get_sa_handler): New functions to
return addresses of sa_flags and sa_handler of struct k_sigaction.
(sigset_mask_str): New function. Returns a string containing the
set of signals to be blocked when executing the signal handler.
(is_sig_blocked): New function. Checks task_struct->blocked signal
mask for signals that are currently blocked.
(signal_str): New function. Translates a signal number.
(sa_flags_str): New function. Translates the sa_flags.
(sa_handler_str): New function. Returns the signal action or handler
associated to the signal.
2008-01-16 Eugene Teo <eteo@redhat.com>
* buildok/signal-embedded.stp: Add all new embedded C functions
in signal.
hunt [Tue, 15 Jan 2008 17:11:17 +0000 (17:11 +0000)]
2008-01-14 Martin Hunt <hunt@redhat.com>
* translate.cxx (emit_module_init): Call _stp_print_kernel_info()
to print out version information and internal memory usage stats.
wcohen [Mon, 7 Jan 2008 21:12:53 +0000 (21:12 +0000)]
2008-01-07 William Cohen <wcohen@redhat.com>
* testsuite/lib/systemtap.exp (as_root): new proc.
* testsuite/systemtap.context/context.exp:
* testsuite/systemtap.printf/end1b.exp:
* testsuite/systemtap.printf/mixed_outb.exp:
* testsuite/systemtap.printf/out1b.exp:
* testsuite/systemtap.printf/out2b.exp:
* testsuite/systemtap.printf/out3b.exp: Use as_root proc.
fche [Wed, 2 Jan 2008 18:22:28 +0000 (18:22 +0000)]
Fix mkdtemp() umask issue
Even though the mkdtemp() man page indicates that the
directory will be created with always 0700 permissions,
it is actually affected by the process's umask.
So, if you run stap with an unusual umask it can end
up creating the temp dir with permissions that
staprun can't handle e.g.:
hunt [Wed, 12 Dec 2007 16:16:50 +0000 (16:16 +0000)]
2007-12-12 Martin Hunt <hunt@redhat.com>
Detect crashing stap and report as a test failure.
* lib/systemtap.exp (stap_run_batch): Return -1 if stap
crashed.
* systemtap.pass1-4/buildko.exp: If stap_run_batch returned
-1 then mark test as failed.
* systemtap.pass1-4/parseko.exp: Ditto.
* systemtap.pass1-4/semko.exp: Ditto.
* systemtap.pass1-4/transko.exp: Ditto.
hiramatu [Mon, 3 Dec 2007 21:30:31 +0000 (21:30 +0000)]
2007-12-03 Masami Hiramatsu <mhiramat@redhat.com>
PR 5376
* parse.cxx (lexer::scan): Treat '*' as an alphabet if the wildcard
flag is true.
(parser::parse_probe_point): Call parser::next() with wildcard = true.
(parser::scan_pp): Add wildcard flag and pass it to lexer::scan.
(parser::next): Ditto.
(parser::peek): Ditto.
* parse.h : Ditto.
* testsuites/perseko/twentytwo.stp: Change testcase to the wildcarded
probe points with spaces.
hiramatu [Tue, 20 Nov 2007 21:03:16 +0000 (21:03 +0000)]
2007-11-20 Masami Hiramatsu <mhiramat@redhat.com>
PR 4935.
* parse.cxx (parser::parse_probe_point): Parse "if" condition
following probe point.
* staptree.h (probe_point): Add "condition" field.
(probe): Add "condition" field and "add_condition" method.
(deep_copy_visitor): Add "deep_copy" method for the expression.
* staptree.cxx (probe_point::probe_point): Initalize it.
(probe::add_condition): Implement it.
(probe::print): Output "condition" field.
(probe::str): Ditto.
(deep_copy_visitor::deep_copy): Implement it.
* elaborate.h (derived_probe): Add "insert_condition_statement"
method.
* elaborate.cxx (derived_probe::derived_probe): Initialize "condition"
field, and insert a condition check routine on the top of body.
(derived_probe::insert_condition_statement): Implement it.
(alias_expansion_builder::build): Pass the condition from the alias
referer to new alias.
* tapsets.cxx (be_derived_probe): Remove unused constructor.
(dwarf_derived_probe::dwarf_derived_probe): Insert a condition check
routine on the top of body.
(mark_derived_probe::mark_derived_probe): Ditto.
(mark_builder::build): Pass the base location to mark_derived_probe.
dsmith [Thu, 15 Nov 2007 16:51:11 +0000 (16:51 +0000)]
2007-11-15 David Smith <dsmith@redhat.com>
* tapsets.cxx: Removed mark_query structure.
(mark_derived_probe::mark_derived_probe): Just looks for "kernel"
marker probes.
(mark_builder::build_no_more): No longer kern_dw, instead clears
the marker cache.
(mark_builder::build): Now parses Module.markers file to find
marker list and stores them in a cache.
(register_standard_tapsets): Removed 'module("foo").mark("bar")'.
All markers now go through 'kernel.mark("bar")'.
zhaolei [Wed, 14 Nov 2007 06:19:28 +0000 (06:19 +0000)]
2007-11-14 Zhaolei <zhaolei@cn.fujitsu.com>
From Lai Jiangshan <laijs@cn.fujitsu.com>
* signal.stp (signal.do_action): Call __get_action_mask to get mask
to fix semantic error of accessing a struct.
* signal.stp (__get_action_mask): Add.
kenistoj [Tue, 13 Nov 2007 21:57:21 +0000 (21:57 +0000)]
PR 5270
* main.cxx: Restored pre-10-08 version: moved uprobes build to
buildrun.cxx.
* buildrun.cxx: Reworked uprobes build so that the resulting
Module.symvers can be used in building the stap-generated
module. If user isn't root, call verify_uprobes_uptodate()
rather than trying (and failing) to rebuild uprobes.ko.
* buildrun.h: uprobes_enabled() and make_uprobes() are no
longer extern.
* runtime/uprobes/Makefile: Added uprobes.ko target for use
by verify_uprobes_uptodate().
hunt [Mon, 12 Nov 2007 22:14:20 +0000 (22:14 +0000)]
2007-11-12 Martin Hunt <hunt@redhat.com>
* stap.1.in: Replaced references to the log() function.
* stapex.5.in: Ditto.
* stapfuncs.5.in: Ditto. ALso remove print and printf. They are
documented in stap.1.in.
hunt [Mon, 12 Nov 2007 21:55:53 +0000 (21:55 +0000)]
2007-11-12 Martin Hunt <hunt@redhat.com>
* translate.cxx (visit_print_format): Strings without a format or
formatted with "%s" or "%s\n" should be printed with calls to _stp_print().
Call _stp_print_char() if printing a char.
* staptree.cxx (parse_print): Check for "print_char".