]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoPR11004: try / catch error-handling script syntax
Frank Ch. Eigler [Wed, 3 Mar 2010 05:28:22 +0000 (00:28 -0500)]
PR11004: try / catch error-handling script syntax

* parse.h (try_block): New class.  Update basic visitors.
* staptree.cxx: Implement basic visitors.
* parse.cxx (expect_kw): Fix to actually look for keywords.
  (parse_try_block): New function.
  (lexer ctor): Designate 'try' and 'catch' as keywords.
* elaborate.cxx (dead_assignment_remover, dead_statmtexpr_remover): Optimize.
  (other visitors): Implement.
* translate.cxx (c_unparser): Implement via super-handy __local__ labels.
  (emit_probe, emit_function): Make outer out: label also __local__.
* testsuite/buildok/fortyone.stp, semko/fortynine.stp,
  systemtap.base/trycatch.exp: Test it.
* NEWS, doc/langref.txt, stap.1.in: Document it.

14 years agoPR11246 cont'd: Add options for cache control
Josh Stone [Tue, 2 Mar 2010 23:57:58 +0000 (15:57 -0800)]
PR11246 cont'd: Add options for cache control

--disable-cache : turn off all caching
--clean-cache   : clean up stale entries and then quit
--poison-cache  : force regeneration of items that would have hit the cache

These are undocumented for now, until we decide whether they are
generally useful.

* main.cxx (main): Parse the new options.
* session.h (systemtap_session): Add poison_cache; document the others.
* clean.cxx (clean_cache): No longer static.
  (get_stapconf_from_cache, get_script_from_cache): Respect poison.
* tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto.
  (dwarf_cast_expanding_visitor::filter_special_modules): Ditto.

14 years agoPR11246 cont'd: Separate script/stapconf caching
Josh Stone [Tue, 2 Mar 2010 02:42:18 +0000 (18:42 -0800)]
PR11246 cont'd: Separate script/stapconf caching

I'm separating the caching and creation logic for stapconf, so it can be
conditionalized on s.use_cache instead of s.use_script_cache.

* session.h (systemtap_session): Store base_hash for better reuse.
* hash.cxx (get_base_hash): Get the base from the session, or build it.
  (find_hash): Split into separate script/stapconf versions.
* cache.cxx (add_to_cache, get_from_cache): Ditto.
* main.cxx (main): Adapt caller, and delay stapconf until pass-4.

14 years agoMove pass-3/4 cache checks after the reported pass-2 end
Josh Stone [Tue, 2 Mar 2010 01:48:54 +0000 (17:48 -0800)]
Move pass-3/4 cache checks after the reported pass-2 end

* main.cxx (main): Reorganize the end of pass-2 a bit.

14 years agoPR11246: Add more granular cache control
Josh Stone [Tue, 2 Mar 2010 01:27:53 +0000 (17:27 -0800)]
PR11246: Add more granular cache control

There are some module options that require us to disable caching for the
script, but before now this had a global effect.  There are some cache
objects, like tracepoint and @cast query modules, which we would like to
cache even when the script itself needs to be uncached.

* session.h (systemtap_session): New use_script_cache flag.
* main.cxx (main): -m & -k can just disable the script cache.  Failure to
  create the cache directories still disables all caching.
* hash.cxx (create_hashdir): Failure disables all caching.
* cache.cxx (add_to_cache): Failure only toggles the script caching. If
  the stapconf fails though, we don't need to block the .ko reuse.

14 years agoRevise the embedded-C.stp example to something more portable.
William Cohen [Tue, 2 Mar 2010 17:45:27 +0000 (12:45 -0500)]
Revise the embedded-C.stp example to something more portable.

14 years agoMinor clean-up in tutorial.
William Cohen [Mon, 1 Mar 2010 22:56:45 +0000 (17:56 -0500)]
Minor clean-up in tutorial.

14 years agoMake the inode-watch.stp example work on newer kernels.
William Cohen [Mon, 1 Mar 2010 20:39:23 +0000 (15:39 -0500)]
Make the inode-watch.stp example work on newer kernels.

14 years agoFixed PR 11336 by using a wait queue to wait on procfs file availability.
David Smith [Mon, 1 Mar 2010 21:17:09 +0000 (15:17 -0600)]
Fixed PR 11336 by using a wait queue to wait on procfs file availability.

* runtime/procfs-probes.c: Removed old kernel 2.6.16 code.  Simplified
  _spp_lock macros.
  (_stp_proc_open_file): If file is busy, use a wait queue to wait on it
  being available.
  (_stp_proc_release_file): Decrease open count.
* tapset-procfs.cxx (emit_module_init): Updated procfs probe
  initialization/shutdown routine names.
  (emit_module_exit): Ditto.

14 years agoPR11229: Make parse_kernel_config return int and suggest that the user check their...
Charley Wang [Mon, 1 Mar 2010 15:22:08 +0000 (10:22 -0500)]
PR11229: Make parse_kernel_config return int and suggest that the user check their installation of kernel devel

14 years agoSquash elision warnings on synthetic functions
Josh Stone [Sat, 27 Feb 2010 00:25:45 +0000 (16:25 -0800)]
Squash elision warnings on synthetic functions

* staptree.h (functiondecl): Add a synthetic flag.
* elaborate.cxx (semantic_pass_opt1): Don't warn about synthetic funcs.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Mark
  the new function as synthetic.
  (dwarf_cast_expanding_visitor::visit_cast_op): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
* tapset-perfmon.cxx
  (perfmon_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  Ditto.
* testsuite/semok/thirtyeight.stp: New check with -W and @defined.

14 years agoAdd package check for librpm
Stan Cox [Fri, 26 Feb 2010 21:07:27 +0000 (16:07 -0500)]
Add package check for librpm

* configure (have_librpm): Move to AC_CHECK_LIB
* configure.ac: Regenerate.

14 years agoAdd package check for librpm
Stan Cox [Fri, 26 Feb 2010 19:58:57 +0000 (14:58 -0500)]
Add package check for librpm

* configure (have_librpm): Define.
* configure.ac: Regenerate.

14 years agoPR11075: -W option to turn warnings into errors
Frank Ch. Eigler [Fri, 26 Feb 2010 02:14:52 +0000 (21:14 -0500)]
PR11075: -W option to turn warnings into errors

* session.h
* NEWS: Discuss it.
* main.cxx: Parse it.
* session.h (num_errors): Provide it.
* semok/fortyeight.stp, semok/thirtyseven.stp: Test it.

14 years agoExpand the comment around @defined pass-through
Josh Stone [Fri, 26 Feb 2010 01:06:30 +0000 (17:06 -0800)]
Expand the comment around @defined pass-through

14 years agoEnsure that @defined()==1 goes the right way
Josh Stone [Fri, 26 Feb 2010 00:30:48 +0000 (16:30 -0800)]
Ensure that @defined()==1 goes the right way

We need to poison the false case of valid "@defined(x)?x:y", so we know
that the @defined is correctly leading to the true case only.

* testsuite/semok/thirtysix.stp: poison false in valid cases.

14 years agoExpand @defined to support more cases
Josh Stone [Fri, 26 Feb 2010 00:20:50 +0000 (16:20 -0800)]
Expand @defined to support more cases

* tapsets.cxx (var_expanding_visitor::visit_defined_op): If no error was
  raised or replacement made on a target_symbol, then its @defined state
  is still indeterminate.  Some later pass (like @cast) might handle it.
* elaborate.cxx (const_folder::visit_defined_op): Squash any escapees.
* testsuite/semok/thirtysix.stp: Add more variants.

14 years agoPR11326: Make an early check for saved-return-$var validity
Josh Stone [Thu, 25 Feb 2010 23:15:19 +0000 (15:15 -0800)]
PR11326: Make an early check for saved-return-$var validity

We now check validity *before* the entry-probe is generated, so invalid
$vars have a chance to be properly optimized without error.

* tapsets.cxx
  (dwarf_var_expanding_visitor::visit_target_symbol_saved_return):
  Attempt variable expansion immediately, and skip out on failure.
* testsuite/semok/thirtysix.stp: unblock the previously broken part.

14 years agoFixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.
David Smith [Thu, 25 Feb 2010 22:29:50 +0000 (16:29 -0600)]
Fixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.

* tapset-procfs.cxx (procfs_derived_probe::procfs_derived_probe): Added
  'maxsize_val' initialization.
  (procfs_derived_probe::join_group): Updated '_stp_procfs_data'
  definition and added STP_PROCFS_BUFSIZE.
  (procfs_derived_probe_group::emit_module_decls): Emits structure to
  contain procfs file buffers.  Initializes '.bufsize' structure member.
  (procfs_var_expanding_visitor::visit_target_symbol): Uses 'bufsize' for
  maximum buffer size instead of using MAXSTRINGLEN.
  (procfs_builder::build): Looks for '.maxsize(NNN)' parameter.
  (register_tapset_procfs): Added '.maxsize(NNN)' parameter binding.
* runtime/procfs-probes.c (stap_procfs_probe): Converted 'buffer' to a
  pointer and added 'bufsize' member.
* testsuite/semko/procfs13.stp: New testcase.
* testsuite/semko/procfs14.stp: Ditto.
* testsuite/semko/procfs15.stp: Ditto.
* testsuite/systemtap.base/procfs_maxsize.exp: Ditto.
* testsuite/systemtap.base/procfs.exp: Minor fix.
* stapprobes.3stap.in: Added '.maxsize(NNN)' documentation.
* stap.1.in: Added STP_PROCFS_BUFSIZE documentation.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Charley Wang [Thu, 25 Feb 2010 21:25:34 +0000 (16:25 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoPR11224: Documentation for module arguments
Charley Wang [Thu, 25 Feb 2010 21:25:22 +0000 (16:25 -0500)]
PR11224: Documentation for module arguments

14 years agoPR11114: simplify librpm autoconf
Frank Ch. Eigler [Thu, 25 Feb 2010 20:22:14 +0000 (15:22 -0500)]
PR11114: simplify librpm autoconf

* configure.ac: Check for -lrpm with simple AC_CHECK_LIB.
* Makefile.am: Forget about @rpm_LIBS@

14 years agoPR11224: added test case for module arguments in testsuite/systemtap.base
Charley Wang [Thu, 25 Feb 2010 19:21:27 +0000 (14:21 -0500)]
PR11224: added test case for module arguments in testsuite/systemtap.base

14 years agoPR11005: @defined part 2: clarify/standardize internal handling of unresolvable ...
Frank Ch. Eigler [Thu, 25 Feb 2010 18:33:28 +0000 (13:33 -0500)]
PR11005: @defined part 2: clarify/standardize internal handling of unresolvable $variables

* staptree.cxx (target_symbol::chain): New function.
* staptree.h: Declare it.
* (*): Use it instead of hand-chaining to target_symbol->saved_conversion_error.
* tapset-mark.cxx (*::visit_target_symbol): Chain resolution error object,
  do not throw.
* tapset-procfs.cxx (*::visit_target_symbol): Ditto.
* tapset-utrace.cxx (*::visit_target_symbol): Ditto.
* tapsets.cxx (*::visit_target_symbol): Ditto.
  (*::visit_defined_op): Explain & enforce the above.
* testsuite/semok/thirtysix.stp: Expand.

* testsuite/systemtap.base/sdt_misc.exp: Bonus fix: make work with blddir != srcdir.

14 years agoPR10719 cont'd: const-fold binary expressions
Josh Stone [Thu, 25 Feb 2010 02:51:51 +0000 (18:51 -0800)]
PR10719 cont'd: const-fold binary expressions

We can compute results between two literals, we can reduce identity
elements, and reduce constants if the non-literal side has no side
effects.

* elaborate.cxx (const_folder::visit_binary_expression): Implement.

14 years agoPermit chained unary operators
Josh Stone [Thu, 25 Feb 2010 01:12:09 +0000 (17:12 -0800)]
Permit chained unary operators

The operand of a unary may be yet another unary.  This is useful for
things like boolean normalization, !!x.

* parse.cxx (parser::parse_unary): Recurse the operand.
* testsuite/parseok/eleven.stp: Add chained unary operators.

14 years agoPR10719 cont'd: const-fold logical ops
Josh Stone [Thu, 25 Feb 2010 00:43:06 +0000 (16:43 -0800)]
PR10719 cont'd: const-fold logical ops

We can compute results between two literals, we can short-circuit some
literals on the left ("0&&x", "1||x"), and we can simplify literals on
the right if the left has no side effect ("x&&0", "x||1").

* elaborate.cxx (const_folder::visit_logical_or_expr): Implement.
  (const_folder::visit_logical_and_expr): Implement.

14 years agoPR10719 cont'd: const-fold comparisons
Josh Stone [Wed, 24 Feb 2010 02:50:05 +0000 (18:50 -0800)]
PR10719 cont'd: const-fold comparisons

We can compute results between two literals, and we can also compute
comparisons to boundary numbers.

(We could also check boundary strings, "" and "\377\377...", but even
I am not THAT pedantic... yet...)

* elaborate.cxx (const_folder::visit_comparison): Implement.

14 years agoPR10719 cont'd: const-fold string concatenation
Josh Stone [Wed, 24 Feb 2010 02:45:22 +0000 (18:45 -0800)]
PR10719 cont'd: const-fold string concatenation

We can concat literal strings directly and discard empty strings.

* elaborate.cxx (const_folder::visit_concatenation): Implement.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Wed, 24 Feb 2010 01:38:56 +0000 (20:38 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

* 'master' of ssh://sources.redhat.com/git/systemtap:
  PR10719 part 1: Partial constant folding
  Simplify null_statement construction
  Fixed PR 11269 by properly handling mmap syscall 'fd' argument.
  Removed rvalue operator check.
  PR 10690 (partial fix).  Handle '.=' operator in procfs probes.

Conflicts:
tapsets.h

14 years agoPR11005: @defined($tvar) predicate, part 1
Frank Ch. Eigler [Wed, 24 Feb 2010 01:31:00 +0000 (20:31 -0500)]
PR11005: @defined($tvar) predicate, part 1

* staptree.h (defined_op): New class.
* all files: Extend all visitors as appropriate, mostly
  dummy/pass-through implementation.
* parse.cxx (parse_target_symbol): New function, factored out
  of parse_symbol().
  (parse_define_op): New function.
* NEWS: Mention it.
* parse.h: Corresponding changes.
* tapsets.cxx (var_expanding_visitor::visit_defined_op):
  Implement @defined() semantics.
  (dwarf_var_expanding_visitor::visit_target_symbol): Adjust.
* tapset-utrace.c (visit_target_symbol_arg): Avoid crashes
  on $argZZZ.
* tapsets.cxx (sdt_var_expanding_visitor): Ditto.
* semok/thirtysix.stp: New test.

14 years agoPR10719 part 1: Partial constant folding
Josh Stone [Sat, 20 Feb 2010 02:32:52 +0000 (18:32 -0800)]
PR10719 part 1: Partial constant folding

This implements constant folding for if/for/foreach, unary expressions,
and ternary expressions.  Binary expressions are TODO...

* elaborate.cxx (const_folder): New visitor to collapse constants.
  (semantic_pass_const_fold): Drive everything through const_folder.
  (semantic_pass_optimize1): Call it.

14 years agoSimplify null_statement construction
Josh Stone [Sat, 20 Feb 2010 01:44:44 +0000 (17:44 -0800)]
Simplify null_statement construction

It only needs a token*, so build that into the constructor.

14 years agoFixed PR 11269 by properly handling mmap syscall 'fd' argument.
David Smith [Tue, 23 Feb 2010 21:57:25 +0000 (15:57 -0600)]
Fixed PR 11269 by properly handling mmap syscall 'fd' argument.

* testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap
  testing (along with testing of anonymous maps).
* tapset/i386/syscalls.stp: In mmap probes, handle the fact that the
  kernel gets an unsigned long 'fd', but the user-side passes a signed
  int.
* tapset/i386/nd_syscalls.stp: Ditto.
* tapset/ia64/syscalls.stp: Ditto.
* tapset/powerpc/nd_syscalls.stp: Ditto.
* tapset/powerpc/syscalls.stp: Ditto.
* tapset/x86_64/nd_syscalls.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto.

14 years agoRemoved rvalue operator check.
David Smith [Tue, 23 Feb 2010 20:40:18 +0000 (14:40 -0600)]
Removed rvalue operator check.

* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  Removed unneeded rvalue operator check.

14 years agoPR 10690 (partial fix). Handle '.=' operator in procfs probes.
David Smith [Tue, 23 Feb 2010 18:48:49 +0000 (12:48 -0600)]
PR 10690 (partial fix).  Handle '.=' operator in procfs probes.

* tapsets.h (var_expanding_visitor): Add 'valid_ops' and 'op' member
  variables.
* tapsets.cxx (var_expanding_visitor::var_expanding_visitor): Set
  'valid_ops' to '='.  By default, var_expanding_visitor classes only
  handle the '=' operator.
  (var_expanding_visitor::visit_assignment): Remember what operator we're
  handling.  When an operator is found that isn't in the 'valid_ops' set,
  error.
* tapset-procfs.cxx
  (procfs_var_expanding_visitor::procfs_var_expanding_visitor): Add '.='
  to the 'valid_ops' set.
  (procfs_var_expanding_visitor::visit_target_symbol): Handle the '.='
  operator when the target variable is an lvalue.

14 years agohashing: add in the -Werror-defeating flag
Frank Ch. Eigler [Mon, 22 Feb 2010 17:14:48 +0000 (12:14 -0500)]
hashing: add in the -Werror-defeating flag

14 years agoCheck for/build elfutils iff translator is enabled.
Przemyslaw Pawelczyk [Mon, 22 Feb 2010 01:05:59 +0000 (02:05 +0100)]
Check for/build elfutils iff translator is enabled.

* configure.ac: Don't bother with elfutils if $enable_translator = no.

14 years agoPrevent accidental global cleanup triggering for syscall test.tcl.
Mark Wielaard [Mon, 22 Feb 2010 12:43:41 +0000 (13:43 +0100)]
Prevent accidental global cleanup triggering for syscall test.tcl.

Later tests might trigger a cleanup and might set the global dir variable
leading to the syscall test.tcl trying to do an exec rm -rf on whatever
dir was set. So rename proc cleanup and global dir in syscall test.tcl to
something a bit less likely to clash.

* testsuite/systemtap.syscall/test.tcl: Rename proc cleanup to syscall_cleanup
 and global dir to syscall_dir.
* testsuite/systemtap.syscall/test-debug.tcl: Likewise.

14 years agoTweak shared attach sdt test.
Stan Cox [Mon, 22 Feb 2010 03:36:28 +0000 (22:36 -0500)]
Tweak shared attach sdt test.

* sdt_misc.exp:  Make all semaphore references from the .so

14 years agohwbkpt: simplify diagnostics and code
Frank Ch. Eigler [Sun, 21 Feb 2010 16:29:04 +0000 (11:29 -0500)]
hwbkpt: simplify diagnostics and code

* tapsets.cxx (hwbkpt_derivedc_probe_group): Lose max_... field.
  Rename hwbkpt_probes_vector -> hwbkpt_probes.
  (enroll): Instead set it here, emit normal suppressible warning if
  exceeded.
  (emit_*): Use newline(NN) etc. for proper indentation of generated code.
  (emit_module_init): Defer most potential problems to
  register_wide_hw_breakpoint() instead of preemptive errors.
* translate.cxx (emit_module_init): Assert 0 indentation more frequently.

14 years agoMake unprivilegedok/one.stp compatible with vanilla kernel
Wenji Huang [Sun, 21 Feb 2010 02:40:47 +0000 (10:40 +0800)]
Make unprivilegedok/one.stp compatible with vanilla kernel

14 years agoAdd explicit timeout to overflow_error test
Wenji Huang [Sun, 21 Feb 2010 02:38:32 +0000 (10:38 +0800)]
Add explicit timeout to overflow_error test

14 years agoTranslator enablement of Hardware breakpoints for s390
Prerna Saxena [Sat, 20 Feb 2010 20:14:25 +0000 (01:44 +0530)]
Translator enablement of Hardware breakpoints for s390

14 years agohardware breakpoints: improve error messages for unsupported configurations
Frank Ch. Eigler [Fri, 19 Feb 2010 22:55:36 +0000 (17:55 -0500)]
hardware breakpoints: improve error messages for unsupported configurations

* tapsets.cxx (hwbkpt_builder::build): Assert needed
  kernel_configs here, instead of..
  (register_standard_tapsets): ... here.

14 years agoPR11208: glue adjacent string literals together.
Frank Ch. Eigler [Fri, 19 Feb 2010 22:45:50 +0000 (17:45 -0500)]
PR11208: glue adjacent string literals together.

* parse.cxx (lexer::scan): Glue adjacent strings together.
* testsuite/parseko/twentyseven.stp, semok/thirtyfive.stp: New tests.

14 years agoPR11275: be less verbose in case of command line option parsing
Frank Ch. Eigler [Fri, 19 Feb 2010 22:12:22 +0000 (17:12 -0500)]
PR11275: be less verbose in case of command line option parsing

* main.cxx (main): exit() instead of printing usage for most errors.
  Also support --help.

14 years agoAllow CONFIG_foo COMPARISON-OP CONFIG_bar in preprocessor conditionals.
Mark Wielaard [Thu, 18 Feb 2010 23:11:18 +0000 (00:11 +0100)]
Allow CONFIG_foo COMPARISON-OP CONFIG_bar in preprocessor conditionals.

* parse.cxx (eval_pp_conditional): If rhs and lhs are both CONFIG_...
  identifiers try to convert them both to numbers or otherwise threat
  them both as strings for eval_comparison.
* testsuite/semok/config_config.stp: New test.

14 years agoAllow CONFIG_foo COMPARISON-OP number in preprocessor conditionals.
Mark Wielaard [Thu, 18 Feb 2010 22:22:18 +0000 (23:22 +0100)]
Allow CONFIG_foo COMPARISON-OP number in preprocessor conditionals.

* parse.cxx (eval_pp_conditional): Handle r->type == tok_number when
  l->type == tok_identifier.
* testsuite/semok/config_number.stp: New test.

14 years agoPR11296: switch to "sys/sdt.h" in test cases
Frank Ch. Eigler [Thu, 18 Feb 2010 19:45:39 +0000 (14:45 -0500)]
PR11296: switch to "sys/sdt.h" in test cases

14 years agoRestore redirection of the stdout of stap-serverd to /dev/null
Dave Brolley [Wed, 17 Feb 2010 22:11:52 +0000 (17:11 -0500)]
Restore redirection of the stdout of stap-serverd to /dev/null

14 years agoImproved server certificate management. ulimit for stap-server only.
Dave Brolley [Wed, 17 Feb 2010 21:18:10 +0000 (16:18 -0500)]
Improved server certificate management. ulimit for stap-server only.

- Server now generates a new certificate when old one expires.
- Certificates now valid for 1 year.
- ulimit for stap-server-connect now only set for stap-server
  user and only when override variable is not set.

14 years agoUse clamping to more easily normalize input values
Josh Stone [Tue, 16 Feb 2010 05:27:37 +0000 (21:27 -0800)]
Use clamping to more easily normalize input values

The kernel has min/max/clamp macros to make range comparisons easier.
Clamp is a newer invention, but we can define it for older kernels in
terms of min and max.

14 years agoPR11282: Keep the md4 state in the hash copy constructor
Josh Stone [Tue, 16 Feb 2010 05:21:02 +0000 (21:21 -0800)]
PR11282: Keep the md4 state in the hash copy constructor

We were getting new hash collisions, because the new hash copy
constructor was restarting the md4 computation.  Everything from
get_base_hash was thus lost.

* hash.h (hash::hash): Keep the md4 state when copying.

14 years agoPR11277: Use consistent octal in quoted strings
Josh Stone [Tue, 16 Feb 2010 03:28:43 +0000 (19:28 -0800)]
PR11277: Use consistent octal in quoted strings

Previously, our octal escapes used variable lengths, which can lead to
ambiguities.  Also, 8-bit characters would only output the least digit.

* runtime/string.c (_stp_text_str): Always output 3-digit octal escapes,
  and handle 8-bit chars more gracefully.
* testsuite/systemtap.string/text_str.stp: Include an 8-bit character.
* testsuite/systemtap.string/text_str.exp: Above + expect 3-digit octal.

14 years agoDon't try to parallel install partial build-elfutils build in lib-elfutils.
Mark Wielaard [Tue, 16 Feb 2010 12:20:15 +0000 (13:20 +0100)]
Don't try to parallel install partial build-elfutils build in lib-elfutils.

The parallel install into lib-elfutils during the build seems to be fragile,
so explicitly install the libs with -j1.

* Makefile.am (stamp-elfutils): Add -j1 in for dir loop sub make.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* compile: Likewise.
* config.in: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.
* doc/SystemTap_Tapset_Reference/Makefile.in: Likewise.
* doc/beginners/Makefile.in: Likewise.
* grapher/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/aclocal.m4: Likewise.
* testsuite/configure: Likewise.

14 years agoAdd documentation for task.stp tapset.
Mark Wielaard [Mon, 15 Feb 2010 22:25:14 +0000 (23:25 +0100)]
Add documentation for task.stp tapset.

14 years agoelaborate.cxx: Point to the location of the error when rejecting
Dave Brolley [Mon, 15 Feb 2010 21:35:07 +0000 (16:35 -0500)]
elaborate.cxx: Point to the location of the error when rejecting

probe points.

14 years agoDon't pass client-only options to the server.
Dave Brolley [Mon, 15 Feb 2010 20:01:28 +0000 (15:01 -0500)]
Don't pass client-only options to the server.

Also correct parsing of the --server option.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Mon, 15 Feb 2010 18:59:24 +0000 (13:59 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoRework identification of probes allowed for unprivileged users.
Dave Brolley [Mon, 15 Feb 2010 18:56:20 +0000 (13:56 -0500)]
Rework identification of probes allowed for unprivileged users.

- Bind unprivileged permission at probe registration time.
- Remove check_unprivileged filter from derived_probe_builder
  and its children.
- Add test suites for unprivilegedok and unprivilegedko.

14 years agoPR11281 Allow negative values for -D argument.
Mark Wielaard [Sun, 14 Feb 2010 20:42:06 +0000 (21:42 +0100)]
PR11281 Allow negative values for -D argument.

Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$".

* main.cxx (main): case 'D' allow optional single minus sign after equal
  in assert_regexp_match().

14 years agoTest for sendfile syscall can handle non-socket fds now.
Mark Wielaard [Sat, 13 Feb 2010 19:54:58 +0000 (20:54 +0100)]
Test for sendfile syscall can handle non-socket fds now.

Since 2.6.33 sendfile can handle non-socket fds, so make the test
handle both success and failure.

* testsuite/systemtap.syscall/sendfile.c (main): Make buffer 22 bytes,
  since 22 == EINVAL, test for 22 bytes send or -22 failure.

14 years agoPR11105 part 2a, fix buggy \\. in -r option regexp
Frank Ch. Eigler [Fri, 12 Feb 2010 15:39:58 +0000 (10:39 -0500)]
PR11105 part 2a, fix buggy \\. in -r option regexp

14 years agoPR11105 part 2: tighten constraints on stap-server parameters passed to make
Frank Ch. Eigler [Fri, 12 Feb 2010 15:25:43 +0000 (10:25 -0500)]
PR11105 part 2: tighten constraints on stap-server parameters passed to make

* util.h, util.cxx (assert_match_regexp): New function.
* main.cxx (main): Constrain -R, -r, -a, -D, -S, -q, -B flags.
* stap-serverd (listen): Harden stap-server-connect with ulimit/loop.
* testsuite/systemtap.server/{client,server}_args.exp: Revised.

14 years agoAdd simple test for PR10257 (sprint(@hist_linear)).
Przemysław Pawełczyk [Thu, 11 Feb 2010 20:10:39 +0000 (15:10 -0500)]
Add simple test for PR10257 (sprint(@hist_linear)).

Test is simple, because print and sprint uses the same code for handling
@hist_* and it is not intended for playing with MAXSTRINGLEN, which is
required anyway for bigger histograms (the one generated here consists
of only 127 characters).

When PR10690 (need way to produce bigger procfs output) will be fixed,
then we should add another test for both PRs with normal histogram.

14 years agoFixed PR 11270 by adding nd_syscall testcase.
David Smith [Wed, 10 Feb 2010 22:35:46 +0000 (16:35 -0600)]
Fixed PR 11270 by adding nd_syscall testcase.

* testsuite/systemtap.syscall/test.tcl: Now uses global variable
  'test_script' to find test script to run.
* testsuite/systemtap.syscall/syscall.exp: Sets test_script.
* testsuite/systemtap.syscall/nd_sys.stp: New test script.  Copy of
  sys.stp, but uses nd_syscall probes.
* testsuite/systemtap.syscall/nd_syscall.exp: New testcase.  Copy of
  syscall.exp, but uses nd_sys.stp test script.

14 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Stan Cox [Tue, 9 Feb 2010 21:28:32 +0000 (16:28 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

14 years agoFix tcl.exp initialization bug
Stan Cox [Tue, 9 Feb 2010 21:23:18 +0000 (16:23 -0500)]
Fix tcl.exp initialization bug

tcl.exp: Initialize xok

14 years agorhbz#563114 Make syscall.pipe sys32_pipe probe alias optional on x86_64.
Mark Wielaard [Tue, 9 Feb 2010 11:22:37 +0000 (12:22 +0100)]
rhbz#563114 Make syscall.pipe sys32_pipe probe alias optional on x86_64.

Some distributions might have backported the pipe fd leak patch and removed
the sys32_pipe kernel function even before 2.6.32. So make the probe alias
optional instead of relying on a version check.

* tapset/x86_64/syscalls.stp (syscall.pipe): Make alias optional.
  (syscall.pipe.return): Likewise.

14 years agoFixed BZ559643 by doing 'spawn;expect;wait' instead of 'spawn;wait;expect'.
David Smith [Mon, 8 Feb 2010 21:59:29 +0000 (15:59 -0600)]
Fixed BZ559643 by doing 'spawn;expect;wait' instead of 'spawn;wait;expect'.

* testsuite/systemtap.base/labels.exp: Corrected order of
  'spawn;expect;wait' calls.  Added 'wait' calls when needed.  Also,
  doesn't run the "labels exe .label" test if uprobes isn't supported.

14 years agoDefine empty function for tcpmib test
Wenji Huang [Mon, 8 Feb 2010 02:53:21 +0000 (10:53 +0800)]
Define empty function for tcpmib test

14 years agoFix test case tcpmib-all-probes.stp
Wenji Huang [Mon, 8 Feb 2010 01:53:34 +0000 (09:53 +0800)]
Fix test case tcpmib-all-probes.stp

14 years agoundocumented, obfuscated, *evil* option to suppress -Werror during module building
Przemysław Pawełczyk [Sun, 7 Feb 2010 01:24:06 +0000 (20:24 -0500)]
undocumented, obfuscated, *evil* option to suppress -Werror during module building

* session.h (omit_werror): New flag.
* buildrun.cxx (compile_pass): Use it.
* main.cxx (main): Set it.

14 years agoAdded backports required for 2.6.18 kernel for RHEL 5.
David J. Wilder [Fri, 5 Feb 2010 23:59:06 +0000 (15:59 -0800)]
Added backports required for 2.6.18 kernel for RHEL 5.
Files changed:
tapset/ipmib.stp, tapset.tcpmib.stp, testsuite/systemtap.examples/network/tcpipstat.stp,  testsuite/systemtap.examples/network/tcp_trace.stp

Signed-of-by: David Wilder <dwilder@us.ibm.com>
14 years agoUse SYSTEMTAP_INCLUDES for systemtap.apps tests.
Stan Cox [Fri, 5 Feb 2010 22:25:39 +0000 (17:25 -0500)]
Use SYSTEMTAP_INCLUDES for systemtap.apps tests.

* mysql.exp: Use SYSTEM_INCLUDES.
* postgres.exp: Likewise.

14 years agoPR11256: harden --unprivileged mode
Frank Ch. Eigler [Fri, 5 Feb 2010 21:55:22 +0000 (16:55 -0500)]
PR11256: harden --unprivileged mode

* tapsets-mark.cxx, tapsets.cxx: Don't even publish probe point families that are
  inappropriate for use in --unprivileged mode.
  (dwarf_derived_probe_*unprivileged*): Remove, to default to blanket no-permission
  rather than emit_process_owner_permission mode.
* testsuite/semko/fortyeight.stp: New test.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Fri, 5 Feb 2010 19:53:06 +0000 (14:53 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoRefer to the home directory of the 'stap-server' user as ~stap-server.
Dave Brolley [Fri, 5 Feb 2010 19:14:53 +0000 (14:14 -0500)]
Refer to the home directory of the 'stap-server' user as ~stap-server.

14 years agoexcise obsolete description of process-capabilities usage in staprun
Frank Ch. Eigler [Fri, 5 Feb 2010 18:29:53 +0000 (13:29 -0500)]
excise obsolete description of process-capabilities usage in staprun

14 years agopfiles.stp sample: begin tcp option dumping
Frank Ch. Eigler [Fri, 5 Feb 2010 16:30:55 +0000 (11:30 -0500)]
pfiles.stp sample: begin tcp option dumping

14 years agoPR11234: Rewrite __get_argv without embedded-C
Josh Stone [Fri, 5 Feb 2010 01:47:31 +0000 (17:47 -0800)]
PR11234: Rewrite __get_argv without embedded-C

We now implement __get_argv's string building in pure stap script.
Also, every argument is now quoted, which is different than before, but
it's much more robust about handling special characters.

14 years agoRevert "PR11234: Ensure __get_argv doesn't overflow"
Josh Stone [Fri, 5 Feb 2010 01:44:59 +0000 (17:44 -0800)]
Revert "PR11234: Ensure __get_argv doesn't overflow"

This reverts commit f75409719f120a3dbee66d761cf23a64092d1414.

14 years agoRegenerate autotools files
Josh Stone [Thu, 4 Feb 2010 20:35:56 +0000 (12:35 -0800)]
Regenerate autotools files

14 years agoDo not check stuff required by server if disabled.
Przemyslaw Pawelczyk [Thu, 4 Feb 2010 13:03:22 +0000 (14:03 +0100)]
Do not check stuff required by server if disabled.

Building systemtap package using dpkg-buildpackage under scratchbox
yields following error during configure:

checking for /usr/include/nss3... configure: error: cannot check for
file existence when cross compiling

even if --disable-server is provided. Fix it.

* configure.ac: Check for server-related stuff iff enable_server != no.

14 years agonew sample: pfiles
Eugene Teo [Thu, 4 Feb 2010 18:42:24 +0000 (13:42 -0500)]
new sample: pfiles

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 4 Feb 2010 16:31:47 +0000 (11:31 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoFixed PR 11078. Changed code to avoided procfs race condition.
David Smith [Wed, 3 Feb 2010 17:56:58 +0000 (11:56 -0600)]
Fixed PR 11078.  Changed code to avoided procfs race condition.

* runtime/procfs.c: Allow STP_MAX_PROCFS_FILES define to be overridden.
  (_stp_create_procfs): Calls proc_create() instead of create_proc_entry()
  to avoid a race condition.
* runtime/procfs-probes.c: New file containing procfs probe support
  routines.
* tapset-procfs.cxx (procfs_derived_probe::join_group): Update struct
  _stp_procfs_data definition.
  (procfs_derived_probe::emit_module_decls): Include procfs-probes.c,
  which is where the definition of struct stap_procfs_probe exists.
  Update generated routines to read/write procfs data.
  (procfs_derived_probe_group::emit_module_init): Pass file_operations
  argument to _stp_create_procfs().  Initialize mutex.
  (procfs_var_expanding_visitor::visit_target_symbol): Update generated
  code.

14 years agoPR9931: generate log to help diagnosing occasional cache hash collisions
Wenji Huang [Wed, 3 Feb 2010 02:21:24 +0000 (10:21 +0800)]
PR9931: generate log to help diagnosing occasional cache hash collisions

Ideas from Frank Ch. Eigler:
- extending the hash.add() function to pass names along with the
  hash-mix values, so that class hash can internally track the
  hash-report string
- storing the reports themselves in the cache, beside the .ko / .c
  files, and changing the cache-size-limit logic to delete
  these .txt files upon garbage collection

* hash.h : New member parm_stream.
* hash.cxx (get_parms): New function to convert parms stream to string.
  (hash::add): Aggregrate parms stream.
  (create_hash_log): New function to log hash operation.
  (find_*_hash): Log hash at the end of function.
* cache.cxx (clean_cache): Remove log when cache reaches limitation.

14 years agoFix procfs_write.exp so that it will pass under RHELl5.
David Smith [Tue, 2 Feb 2010 22:14:39 +0000 (16:14 -0600)]
Fix procfs_write.exp so that it will pass under RHELl5.

* testsuite/systemtap.base/procfs_write.exp: Small changes for RHEL5
  support.
* testsuite/lib/stap_run.exp (stap_run): Increase maximum number of
  characters to match against.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Tue, 2 Feb 2010 19:54:24 +0000 (14:54 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoAdd nfs_func_log example.
William Cohen [Tue, 2 Feb 2010 19:53:20 +0000 (14:53 -0500)]
Add nfs_func_log example.

14 years agoAdd nfs_func_users example.
William Cohen [Tue, 2 Feb 2010 19:32:38 +0000 (14:32 -0500)]
Add nfs_func_users example.

14 years agoAdd iodevstats.stp example
William Cohen [Tue, 2 Feb 2010 19:19:02 +0000 (14:19 -0500)]
Add iodevstats.stp example

14 years agoCompile server logging and robustness.
Dave Brolley [Tue, 2 Feb 2010 19:08:31 +0000 (14:08 -0500)]
Compile server logging and robustness.

Log certificate location and status when starting server.
Additional care in handling arguments in stap-serverd.
New test case discovered by fuzzing added and fixed.

14 years agorhbz 560890: preserve -L/-l variable ordering
Nobuhiro Tachino [Tue, 2 Feb 2010 17:19:18 +0000 (12:19 -0500)]
rhbz 560890: preserve -L/-l variable ordering

Switch to list<string> from set<string> for collecting
available $var lists.  Use O(N**2) list-uniqueifier
that preserves initial ordering.

14 years agoSupport building against elfutils < 0.142 again.
Mark Wielaard [Tue, 2 Feb 2010 15:27:47 +0000 (16:27 +0100)]
Support building against elfutils < 0.142 again.

* dwflpp.cxx (get_cfa_ops): Guard new cfi related code and variables.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 2 Feb 2010 13:28:16 +0000 (08:28 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoPR 11105: Remaining client-side problems:
Dave Brolley [Tue, 2 Feb 2010 13:26:01 +0000 (08:26 -0500)]
PR 11105: Remaining client-side problems:

stap-client: Correct handling of embedded newlines in arguments.
server_args.exp: Add additional cases discovered by fche and by fuzzing.

14 years agobuildok test doesn't need /usr/bin/env
Mark Wielaard [Tue, 2 Feb 2010 13:17:44 +0000 (14:17 +0100)]
buildok test doesn't need /usr/bin/env

* testsuite/buildok/hwbkpt.stp: Just use stap directly after #!.

This page took 0.068129 seconds and 5 git commands to generate.