]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoHere is a patch implements a way for uprobes to skip single step
Srikar Dronamraju [Fri, 28 May 2010 10:45:02 +0000 (16:15 +0530)]
Here is a patch implements a way for uprobes to skip single step
when a probe in on a nop instruction.

Currently its implemented for nop on x86/x86_64 and s390.
For powerpc, its implemented on all instructions that can be emulated.
(For this emulation code is borrowed from arch/powerpc/lib/sstep.c)

I havent tested it on s390. Updated with comments from Jim.

Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Reported-by: Josh Stone <jistone@redhat.com>
14 years agoOnly build docproc when refdoc requested.
Mark Wielaard [Fri, 28 May 2010 10:11:11 +0000 (12:11 +0200)]
Only build docproc when refdoc requested.

* doc/SystemTap_Tapset_Reference/Makefile.am: Move docproc under BUILDREFDOC
  conditional.
* doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated.

14 years agoPR3672: Add pretty-printing for compound types
Josh Stone [Thu, 27 May 2010 22:54:01 +0000 (15:54 -0700)]
PR3672: Add pretty-printing for compound types

This adds a new syntax for pretty-printing variables as strings:

  $var$         $var$$         $var->$            $var->$$
  $@cast(...)$  $@cast(...)$$  $@cast(...)->$     $@cast(...)->$$
  $var->foo->$  $var[1]->$     $@cast(...)->foo$  $@cast(...)[2]$

This is still a work in progress, but I deemed it now useful enough to
share.  See PR3672 for discussion of work remaining.

* parse.cxx (parser::parse_target_symbol_components): Parse the trailing
  $s as a new comp_pretty_print entry in the target_symbol.
* staptree.cxx (target_symbol::assert_no_components): Add a flag to
  assert whether pretty-printing is supported.
  (target_symbol::component::print): Support comp_pretty_print.
* dwflpp.cxx (dwflpp::translate_components): Skip the actual translation
  if the obstack "pool" is NULL.
  (dwflpp::type_die_for_local): Dig through a local and its components
  to get the type DIE that the pretty printing can start from.
  (dwflpp::type_die_for_return): Ditto for return values.
  (dwflpp::type_die_for_pointer): Ditto for pointers.
* tapsets.cxx (dwarf_pretty_print): New struct for recursing over a type
  DIE and producing a string representation.  (The real meat lies here!)
  (dwarf_var_expanding_visitor::visit_target_symbol): Determine when to
  use dwarf_pretty_print instead of the normal path.
  (dwarf_var_expanding_visitor::visit_target_symbol_context): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_context): Ditto.
  (dwarf_cast_query, dwarf_cast_expanding_visitor): Move the function
  generation from the visitor to the query, and also support using
  dwarf_pretty_print as needed.

14 years agotracequery build fix
Josh Stone [Wed, 26 May 2010 19:39:31 +0000 (12:39 -0700)]
tracequery build fix

Similar to commit 392e08b7 -- we need to #undef TRACE_INCLUDE_FILE
before each header in the tracepoint query module, so they can be
queried all at once.

The side effect was that the all-inclusive tracequery build would fail,
so we'd fall back to building a separate tracequery for each header.
It's much faster when we can build them together.

* buildrun.cxx (make_tracequery): #undef TRACE_INCLUDE_FILE before each
  tracepoint header to prevent macro redefinition.

14 years agorhbz #596083 Make stap-prep resolve kernel-debuginfo-common package name.
Mark Wielaard [Wed, 26 May 2010 10:24:21 +0000 (12:24 +0200)]
rhbz #596083 Make stap-prep resolve kernel-debuginfo-common package name.

The kernel-debuginfo-common package name is slightly different on different
distros. But the correct name is always required by the kernel-debuginfo
package. So don't add it to the CANDIDATES list, but let the yumdowloader
--resolve it. Tested on f13, rhel5 and rhel6 beta.

* stap-prep: Remove kernel-debuginfo-common from CANDIDATES, add --resolve
  to yumdownloader.

14 years agoPR10245: allow "-" in sdt.h marker names
Frank Ch. Eigler [Wed, 26 May 2010 01:17:25 +0000 (21:17 -0400)]
PR10245: allow "-" in sdt.h marker names

* tapsets.cxx (sdt_query ctor): Map - to __ in incoming marker names.
* NEWS: Note it.
* testsuite/systemtap.base/sdt_types.c, sdt_misc.exp: Test it.

14 years agomake semok/thirtysix.stp test use stap -p2 instead of -p4
Frank Ch. Eigler [Wed, 26 May 2010 01:03:43 +0000 (21:03 -0400)]
make semok/thirtysix.stp test use stap -p2 instead of -p4

14 years agoPR11124: make register-name-to-number mapping a function of process elf-machine
Frank Ch. Eigler [Wed, 26 May 2010 00:47:55 +0000 (20:47 -0400)]
PR11124: make register-name-to-number mapping a function of process elf-machine

* tapsets.cxx (sdt_uprobe_var_expanding_... ctor): Use elf_machine input
  to configure register-name lookup table.
  (sdt_query::handle_query_module): Compute & pass elf_machine code.
* NEWS: Mention -DSTAP_SDT_V2

14 years agoPerformance test debuginfoless and no semaphore cases of static user probes.
Stan Cox [Tue, 25 May 2010 19:08:56 +0000 (15:08 -0400)]
Performance test debuginfoless and no semaphore cases of static user probes.

* bench.sh: Add test permutations for STAP_SDT_V2 and ! STAP_HAS_SEMAPHORES

14 years agoPR11609: tweak --all-modules
Frank Ch. Eigler [Tue, 25 May 2010 15:17:32 +0000 (11:17 -0400)]
PR11609: tweak --all-modules

* session.cxx: Reject --all-modules after --client-options.
* NEWS: Mention it beside its pal --ldd.

14 years agoPR11609: --all-options stap option to -d ALL_LOADED_MODULES
Adrien Kunysz [Tue, 25 May 2010 15:03:41 +0000 (11:03 -0400)]
PR11609: --all-options stap option to -d ALL_LOADED_MODULES

* session.cxx (insert_loaded_modules): Parse /proc/modules
  to populate unwindsym_modules ...
  (parse_cmdline): ... if --all-options was given.
* stap.1.in: Document it.

14 years agoAdd debuginfoless static uprobe handling.
Stan Cox [Tue, 25 May 2010 02:13:30 +0000 (22:13 -0400)]
Add debuginfoless static uprobe handling.

The .probes section now contains the assembler asm equivalent of each
probe argument.   stap parses this and generates the equivalent stap code
to access each argument.

* sdt.h (stap_sdt_probe_entry_v1): New.
(stap_sdt_probe_entry_v2): New.
(STAP_SDT_V1,STAP_SDT_V2): New.
(__stap_argN,STAP_PROBE_POINT): New.

* tapsets.cxx (sys/sdt.h,regex.h): Include.
(sdt_uprobe_var_expanding_visitor,sdt_kprobe_var_expanding_visitor):
Split from sdt_var_expanding_visitor.
(sdt_uprobe_var_expanding_visitor::visit_target_symbol):  Convert
$argN into the equivalent asm argument then expand into equivalent
stap parse tree.
(sdt_query):  Add arg_count, pc, arg_string, have_uprobe, have_kprobe
(sdt_query::handle_query_module):  Handle uprobe2_type.
(sdt_query::get_next_probe): Likewise.

* sdt_misc.exp (pbtype_flags): Add -DSTAP_SDT_V2
(Test 7):  Add to test types defined in *.d.

14 years agoTest that badname.stp actually does its job
Josh Stone [Mon, 24 May 2010 22:12:32 +0000 (15:12 -0700)]
Test that badname.stp actually does its job

14 years agoPR11617: Move string literal gluing from lexer to parser
Josh Stone [Sat, 22 May 2010 01:32:46 +0000 (18:32 -0700)]
PR11617: Move string literal gluing from lexer to parser

* parse.cxx (lexer::ate_comment): New flag if we just passed a comment.
  (lexer::scan): Set ate_comment, remove string gluing.
  (parser::parse_literal): Glue strings if not comment-separated.
* testsuite/semok/thirtyfive.stp: Extend test.

14 years agoQuiet the "checking uprobes" pass-4 messages
Josh Stone [Fri, 21 May 2010 22:32:10 +0000 (15:32 -0700)]
Quiet the "checking uprobes" pass-4 messages

For session.verbose=1, we mostly only print the result of the pass.  We
had a uprobes "preamble" though in pass 4, which IMO was a misleading
break in convention.  It gave the impression that all the building time
for the actual script was part of the uprobes work.

* buildrun.cxx (verify_uprobes_uptodate, make_uprobes): Only print the
  preamble message for verbose > 1.

14 years agoHide parser internals
Josh Stone [Fri, 21 May 2010 22:17:00 +0000 (15:17 -0700)]
Hide parser internals

No one needs to see the dirty laundry...

* parse.h (class parser, class lexer): Move to parse.cxx.
  (parser::parse -> parse): Split the static interface from the class.

14 years agoPR10025: Test '*' operator vs. identifier while preprocessing
Josh Stone [Fri, 21 May 2010 20:32:45 +0000 (13:32 -0700)]
PR10025: Test '*' operator vs. identifier while preprocessing

* testsuite/parseok/preprocess-wildcard.stp: New

14 years agoPR10025: Don't read ahead tokens within preprocessor blocks
Josh Stone [Thu, 20 May 2010 01:02:04 +0000 (18:02 -0700)]
PR10025: Don't read ahead tokens within preprocessor blocks

Since some aspects of the lexer are contextual, like wildcards in
probepoint identifiers, we need to wait for the right context in the
preprocessor rather than reading a bunch of tokens at once.

* parse.h (parser): Replace enqueued_pp with a pp_state stack.
* parse.cxx (parser::scan_pp): Use pp_state to decide if the current
  token should be kept or skipped, and transition states as the various
  %( %? %: %) are encountered.
  (parser::skip_pp): Helper to leap over skipped tokens.

14 years agoregen sample indices
Frank Ch. Eigler [Fri, 21 May 2010 18:04:10 +0000 (14:04 -0400)]
regen sample indices

14 years agonit: fix permissions of varwatch.stp sample
Frank Ch. Eigler [Fri, 21 May 2010 18:03:18 +0000 (14:03 -0400)]
nit: fix permissions of varwatch.stp sample

14 years agonew sample: sizeof.stp to print c type sizes
Frank Ch. Eigler [Fri, 21 May 2010 18:02:58 +0000 (14:02 -0400)]
new sample: sizeof.stp to print c type sizes

14 years agorhbz 594079: tapset/scsi.stp forward-porting for newer scsi sd/sr
Frank Ch. Eigler [Fri, 21 May 2010 17:25:03 +0000 (13:25 -0400)]
rhbz 594079: tapset/scsi.stp forward-porting for newer scsi sd/sr

* scsi.stp (scsi.ioentry): Rephrase in terms of scsi_prep_fn, sd_prep_fn
  and sr_prep_fn.

14 years agoFixed BZ 592830 by fixing signal.check_ignored.return for newer kernels.
David Smith [Tue, 18 May 2010 18:19:23 +0000 (13:19 -0500)]
Fixed BZ 592830 by fixing signal.check_ignored.return for newer kernels.

* tapset/signal.stp (signal.check_ignored.return): Provide an alternative
  for newer kernels where the sig_ignored() function has been inlined.
* tapset/errno.stp (return_str): New function.
* testsuite/buildok/signal-detailed.stp: Made the
  signal.check_ignored.return test non-optional.

14 years agoAdded RHEL4 support to socket.stp and more testing.
David Smith [Mon, 17 May 2010 20:45:32 +0000 (15:45 -0500)]
Added RHEL4 support to socket.stp and more testing.

* tapset/socket.stp: Removed kernel version checks and now works on RHEL4.
  Tested on RHEL4, RHEL4, RHEL6(beta), f11, f12, and rawhide.
* testsuite/buildok/socket-detailed.stp: Renamed from socket.stp and updated.
* testsuite/buildok/socket-embedded.stp: Updated.

14 years agoPR 11338 (partial): Used @defined in tcpmib.stp and new test cases.
David Smith [Mon, 17 May 2010 20:24:26 +0000 (15:24 -0500)]
PR 11338 (partial): Used @defined in tcpmib.stp and new test cases.

* tapset/tcpmib.stp: Removed all kernel version checks.
* testsuite/buildok/tcpmib-detailed.stp: New testcase.

14 years agoAdded RHEL4 support to task_time.stp and more testing.
David Smith [Mon, 17 May 2010 16:29:01 +0000 (11:29 -0500)]
Added RHEL4 support to task_time.stp and more testing.

* tapset/task_time.stp: Added RHEL4 support.
* testsuite/buildok/task_time-embedded.stp: New testcase.

14 years agoAdded RHEL4 support to proc_mem.stp and more testing.
David Smith [Fri, 14 May 2010 20:46:30 +0000 (15:46 -0500)]
Added RHEL4 support to proc_mem.stp and more testing.

* tapset/proc_mem.stp: Added RHEL4 support.
* testsuite/buildok/proc_mem-embedded.stp: Renamed from proc_mem.stp and
  added more functions.

14 years agoUpdate the ioblock and scheduler tapsets and testcases.
David Smith [Fri, 14 May 2010 18:03:53 +0000 (13:03 -0500)]
Update the ioblock and scheduler tapsets and testcases.

* tapset/ioblock.stp: Fixed several problems where the ioblock_trace
  probes didn't all export the same convenience variables.  Works on
  RHEL4, RHEL5, RHEL6(beta), f11, f12, and rawhide.
* tapset/scheduler.stp: Fixed several problems where the kprobes backup
  probes for tracepoints didn't work.  Works on RHEL4, RHEL5, RHEL6(beta),
  f11, f12, and rawhide.
* testsuite/buildok/ioblock-all-probes.stp: New testcase.
* testsuite/buildok/ioblock-detailed.stp: New detailed test of all ioblock
  probes and convenience variables.
* testsuite/buildok/ioblock-embedded.stp: Added bio_rw_str() test.
* testsuite/buildok/ioblock_test.stp: Deleted old ioblock test.
* testsuite/buildok/scheduler-embedded.stp: New testcase.
* testsuite/buildok/scheduler-detailed.stp: New detailed test of all
  scheduler probes and convenience variables.
* testsuite/buildok/scheduler-cpu_off.stp: New detailed test which can
  fail on some platforms because we can't find inline function arguments.
* testsuite/buildok/scheduler-ctxswitch.stp: Ditto.
* testsuite/buildok/scheduler-migrate.stp: Ditto.
* testsuite/buildok/scheduler-test-tracepoints.stp: Deleted old test.
* testsuite/buildok/sched_test.stp: Ditto.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail the scheduler
  single-probe tests.

14 years agoRemove unused "nm" from parse_defined_op
Josh Stone [Thu, 13 May 2010 22:43:12 +0000 (15:43 -0700)]
Remove unused "nm" from parse_defined_op

14 years agoPR11598: Allow "&" address-of in @defined()
Josh Stone [Thu, 13 May 2010 22:01:13 +0000 (15:01 -0700)]
PR11598: Allow "&" address-of in @defined()

* parse.cxx (parser::parse_target_symbol): Do addressof parsing here.
  (parser::parse_value): Yield addressof parsing to parse_target_symbol.
  (parser::parse_defined_op): Don't insist on an identifier, could be &.
* testsuite/semok/thirtysix.stp: Add tests for @defined(&...).

14 years agoTo avoid performance penalties, put context.stp embedded-C back.
David Smith [Wed, 12 May 2010 19:29:14 +0000 (14:29 -0500)]
To avoid performance penalties, put context.stp embedded-C back.

* tapset/context.stp: Backed out changes.

14 years agoPR 9871 (partial) fix. Removed some embedded-C in context.stp and task.stp.
David Smith [Wed, 12 May 2010 17:49:03 +0000 (12:49 -0500)]
PR 9871 (partial) fix.  Removed some embedded-C in context.stp and task.stp.

* tapset/context.stp: Converted several functions from embedded-C to
  script language.
* tapset/task.stp (task_parent): Converted from embedded-C to script
  languange.
* testsuite/buildok/context-embedded.stp: Moved function tests not
  actually present in context.stp to their own files.
* testsuite/buildok/context-symbols-embedded.stp: New testcase (includes
  some tests from context-embedded.stp).
* testsuite/buildok/context-unwind-embedded.stp: Ditto.
* testsuite/buildok/ucontext-symbols-embedded.stp: Ditto.
* testsuite/buildok/ucontext-unwind-embedded.stp: Ditto.
* testsuite/systemtap.pass1-4/buildok.exp: Kfails the ucontext tests if
  the system doesn't support uprobes.

14 years agoPR11443: stap -l/-L mode should set EXIT_FAILURE if result list is empty
Frank Ch. Eigler [Wed, 12 May 2010 14:05:14 +0000 (10:05 -0400)]
PR11443: stap -l/-L mode should set EXIT_FAILURE if result list is empty

* elaborate.cxx (semantic_pass): With errors suppressed in listing_mode,
  still signal rc>0 for empty resolved-probe list.
* stap.1.in: Document this.

14 years agoAdd testcase for PR11590 optimized pre/postfix operators
Mark Wielaard [Wed, 12 May 2010 12:39:55 +0000 (14:39 +0200)]
Add testcase for PR11590 optimized pre/postfix operators

* testsuite/systemtap.base/prepost_optim.stp: New test.
* testsuite/systemtap.base/prepost_optim.exp: Harness.

14 years agoAdd testcase for PR6954 ++ operations not triggering automatic global printing
Mark Wielaard [Wed, 12 May 2010 12:31:59 +0000 (14:31 +0200)]
Add testcase for PR6954 ++ operations not triggering automatic global printing

* testsuite/systemtap.base/global_end_var.stp: New test.
* testsuite/systemtap.base/global_end.exp: Add xfail.

14 years agoPR11590 Revert "PR6954: make ++/-- operation trigger automatic global printing"
Mark Wielaard [Wed, 12 May 2010 12:16:26 +0000 (14:16 +0200)]
PR11590 Revert "PR6954: make ++/-- operation trigger automatic global printing"

This reverts commit 982b88bd950381434a8325e550eff9df59f59dcd.

Pretending that pre/postfix ++/-- operations only writes to its argument
messes up the optimization of a variable that is assigned and then
only used through post/prefix ++/--operators.

14 years agoClear linetimes' last_pp to avoid map overflow
Josh Stone [Wed, 12 May 2010 00:25:30 +0000 (17:25 -0700)]
Clear linetimes' last_pp to avoid map overflow

14 years agoAllow lintimes.stp to work for multithread sections of code.
William Cohen [Tue, 11 May 2010 21:21:54 +0000 (17:21 -0400)]
Allow lintimes.stp to work for multithread sections of code.

14 years agoKfail networking-change_rx_flag.stp in buildok.exp.
David Smith [Tue, 11 May 2010 21:18:17 +0000 (16:18 -0500)]
Kfail networking-change_rx_flag.stp in buildok.exp.

* testsuite/systemtap.pass1-4/buildok.exp: Kfail
  networking-change_rx_flag.stp.

14 years agoUpdated networking.stp and added full testing.
David Smith [Tue, 11 May 2010 20:05:14 +0000 (15:05 -0500)]
Updated networking.stp and added full testing.

* tapset/networking.stp: For RHEL4, marked netdev.hard_transmit and
  netdev.change_mac probes as optional.
* testsuite/buildok/netdev.stp: Deleted old networking test.
* testsuite/buildok/networking.stp: Ditto.
* testsuite/buildok/networking-all-probes.stp: New basic test of
  networking.stp.
* testsuite/buildok/networking-embedded.stp: New test of functions in
  networking.stp.
* testsuite/buildok/networking-detailed.stp: New detailed test of all
  netdev probes and convenience variables.
* testsuite/buildok/networking-change_rx_flag.stp: New detailed test which
  can fail on some platforms because we can't find inline function
  arguments.

14 years agoPR 9871 (partial) fix. Removed all remaining embedded-C in vfs.stp.
David Smith [Tue, 11 May 2010 17:58:17 +0000 (12:58 -0500)]
PR 9871 (partial) fix.  Removed all remaining embedded-C in vfs.stp.

* tapset/vfs.stp: Large update to get working on RHEL4, RHEL5,
  RHEL6(beta), f11, f12, and rawhide.  Removed all remaining embedded-C.
* testsuite/buildok/vfs-embedded.stp: Updated with more functions.
* testsuite/buildok/vfs-detailed.stp: New detailed test of all vfs probes
  and convenience variables.
* testsuite/buildok/testsuite/buildok/vfs_testcase.stp: Deleted (replaced
  by vfs-detailed.stp).

14 years agoAdd the linetimes.stp to the examples.
William Cohen [Tue, 11 May 2010 16:04:06 +0000 (12:04 -0400)]
Add the linetimes.stp to the examples.

14 years agoSemantic errors during listing mode are suppressed.
Mark Wielaard [Tue, 11 May 2010 13:26:10 +0000 (15:26 +0200)]
Semantic errors during listing mode are suppressed.

Since commit 68ac5d, so adjust testsuite output matching.

* testsuite/systemtap.base/labels.exp: Expect no output for non-matching -l.

14 years agostap-gen-cert is now installed under pkglibexecdir.
Mark Wielaard [Tue, 11 May 2010 12:51:25 +0000 (14:51 +0200)]
stap-gen-cert is now installed under pkglibexecdir.

* modsign.cxx (init_cert_db_path): Now find stap-gen-cert under PKGLIBDIR.

14 years agoUpdated bkl example for 2.6.33
Wenji Huang [Tue, 11 May 2010 07:12:35 +0000 (15:12 +0800)]
Updated bkl example for 2.6.33

* testsuite/systemtap.examples/locks/bkl.stp: change function name
  for 2.6.33+.
* testsuite/systemtap.examples/locks/bkl_stats.stp: Ditto.

14 years agoPR11573: cont'd, check CONFIG_UTRACE for ubacktrace test
Wenji Huang [Tue, 11 May 2010 03:13:33 +0000 (11:13 +0800)]
PR11573: cont'd, check CONFIG_UTRACE for ubacktrace test

* context-embedded.stp: check CONFIG_UTRACE.

14 years agoUpdated ioscheduler.stp and tests.
David Smith [Mon, 10 May 2010 20:32:28 +0000 (15:32 -0500)]
Updated ioscheduler.stp and tests.

* tapset/ioscheduler.stp: Large update to get working on RHEL4, RHEL5,
  RHEL6(beta), f11, f12, and rawhide.
* testsuite/buildok/ioscheduler-all-probes.stp: New test.
* testsuite/buildok/ioscheduler-detailed.stp: New detailed test of all
  ioscheduler probes and convenience variables.
* testsuite/buildok/ioscheduler.stp: Deleted, since no longer needed with
  the addition of ioscheduler-detailed.stp.

14 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Mon, 10 May 2010 19:07:22 +0000 (15:07 -0400)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

14 years agoSearch for stap-sign-module in the linexec directory when signing thge uprobes module.
Dave Brolley [Mon, 10 May 2010 19:06:31 +0000 (15:06 -0400)]
Search for stap-sign-module in the linexec directory when signing thge uprobes module.

14 years agoFix vm.kmalloc_node for i686 f11.
David Smith [Mon, 10 May 2010 19:01:19 +0000 (14:01 -0500)]
Fix vm.kmalloc_node for i686 f11.

* tapset/memory.stp (__vm.kmalloc_node.kp): Only use '$flags' if it is
  defined.

14 years agoPR11266: Catch target_symbols as non-assignment lvalues
Josh Stone [Fri, 7 May 2010 19:07:26 +0000 (12:07 -0700)]
PR11266: Catch target_symbols as non-assignment lvalues

There are more ways to modify values than just assignment;
"struct visitor" knows this, but var_expanding_visitor needs
a lesson.

* tapsets.cxx (var_expanding_visitor::rewrite_lvalue): New, factored out
  of visit_assignment to change various lvalues into function calls.
  (var_expanding_visitor::visit_assignment): Use rewrite_lvalue.
  (var_expanding_visitor::visit_pre_crement): New.
  (var_expanding_visitor::visit_post_crement): New.
  (var_expanding_visitor::visit_delete_statement): New.
* testsuite/semko/target_lvalue.stp: Test for exit-1 without crashing.

14 years agoRemove references to probe_context_var
Josh Stone [Fri, 7 May 2010 18:18:35 +0000 (11:18 -0700)]
Remove references to probe_context_var

These are leftovers from commit a45664f4.

14 years agotweak: fixed per-pass verbosity control for 'using cached ...' messages
Frank Ch. Eigler [Fri, 7 May 2010 19:26:09 +0000 (15:26 -0400)]
tweak: fixed per-pass verbosity control for 'using cached ...' messages

* cache.cxx (get_script_from_cache): Use s.perpass_verbose[2/3] for
  simulated pass3/4 messages.

14 years agoPR11573: cont'd, defeat on non-utrace platforms
Frank Ch. Eigler [Fri, 7 May 2010 18:25:24 +0000 (14:25 -0400)]
PR11573: cont'd, defeat on non-utrace platforms

On jistone's advice, tested the code on rhel4 where there is no
utrace.  print_ubacktrace() works only on incoming kernel state
(which shouldn't really work anyway).  Forcing uprobes for these
ubacktrace() type calls is therefore not a problem.

* buildrun.cxx (uprobes_pass): If uprobes still needed, probably
  due to /* pragma:uprobes */, rejectfor utrace-less kernels.

14 years agoPR11573: infer need for uprobes from special embedded-c markup tag
Frank Ch. Eigler [Fri, 7 May 2010 16:57:50 +0000 (12:57 -0400)]
PR11573: infer need for uprobes from special embedded-c markup tag

* tapset/ucontext-unwind.stp: Mark up these babies with /* pragma:uprobes */.
* elaborate.cxx (typeresolution_info::visit_embeddedcode): Look for that
  and activate session.need_uprobes if found.

14 years agotweak: accept -DSTAP_NO_OVERLOAD as an alias of -DSTP_NO_OVERLOAD
Frank Ch. Eigler [Thu, 6 May 2010 23:48:08 +0000 (19:48 -0400)]
tweak: accept -DSTAP_NO_OVERLOAD as an alias of -DSTP_NO_OVERLOAD

14 years agoPR11443: -L --unprivileged
Frank Ch. Eigler [Thu, 6 May 2010 22:11:11 +0000 (18:11 -0400)]
PR11443: -L --unprivileged

* elaborate.cxx (derive_probes): Suppress all semantic_errors during
  listing mode.

14 years agodocs: clean up stapfuncs/stapprobes man pages, deprecate probefunc()
Frank Ch. Eigler [Thu, 6 May 2010 18:53:32 +0000 (14:53 -0400)]
docs: clean up stapfuncs/stapprobes man pages, deprecate probefunc()

* probefuncs.3stap.in: Remove most sections that are redundant with
  automatically extracted documentation in individual function::*(stap)
  man pages.
* probeprobes.3stap.in: Ditto for probes::*(stap).
* tapset/context-symbols.stp (probefunc): Describe as deprecated.

14 years agoPR11575: lengthen TRYLOCKDELAY
Frank Ch. Eigler [Thu, 6 May 2010 17:04:11 +0000 (13:04 -0400)]
PR11575: lengthen TRYLOCKDELAY

Change default timeout for global variable locks to apprx. 1 ms,
in 10us chunks.  TRYLOCKDELAY now measures microseconds.

* translate.cxx (translate_pass): Change TRYLOCKDELAY and
  MAXTRYLOCK default values.
* runtime/probe_lock.h (stp_lock_probe): Use udelay() rather than
  ndelay().
* runtime/time.c (STP_TIMELOCK*): New macros just for time seqlock
  timeout purposes.  Expected contention is negligible here.

14 years agoDefault publican to common brand which should always be available.
Mark Wielaard [Thu, 6 May 2010 13:07:07 +0000 (15:07 +0200)]
Default publican to common brand which should always be available.

* configure.ac (publican-brand): Change default from "fedora" to "common".
* configure: Regenerated.

14 years agoCorrect the comparison of linux version for new nfs error types
Wenji Huang [Thu, 6 May 2010 08:29:21 +0000 (16:29 +0800)]
Correct the comparison of linux version for new nfs error types

The nfs41 error types were added from 2.6.30, not 2.6.19.

14 years agoMark __vm.kmem_cache_alloc_node.kp optional
Wenji Huang [Thu, 6 May 2010 06:08:59 +0000 (14:08 +0800)]
Mark __vm.kmem_cache_alloc_node.kp optional

In FC11, __vm.kmem_cache_alloc_node.kp is not resolved,
neither does __vm.kmem_cache_alloc_node.tp.

14 years agoPR11556: Support array indexing on @cast pointers
Josh Stone [Wed, 5 May 2010 23:47:19 +0000 (16:47 -0700)]
PR11556: Support array indexing on @cast pointers

It's a bit of a special case, because we don't have a pointer DIE for
the named type in @cast expressions.  However, we can read the element
size manually and still simulate an array access.

* loc2c.c (pointer_stride): New, factored out of array_stride.
  (c_translate_array_pointer): New, performs the pointer math based on
  the element size of the pointee type.
* dwflpp.cxx (dwflpp::translate_components): Take a starting component.
  (dwflpp::literal_stmt_for_pointer): If the initial type is not already
  a pointer or array, we can fake an array access on the input pointer.
* testsuite/semok/cast.stp: Add an array access test on a @cast.
* testsuite/systemtap.base/cast.stp: Ditto.
* testsuite/systemtap.base/cast.exp: Ditto.

14 years agoStraighten out die/attr use in dwflpp translation
Josh Stone [Wed, 5 May 2010 22:52:55 +0000 (15:52 -0700)]
Straighten out die/attr use in dwflpp translation

It was confusing (to me) what was the expected state of each die_mem and
attr_mem passed around in dwflpp translation.  I've changed it now so
that we pass just a vardie and typedie, which I think is clearer.  This
is also nicer for @cast where we don't have any attr for the initial
type.

* dwflpp.cxx (dwarf_die_type): Helper to get the type, throw on error.
  (dwflpp::translate_components): Just update a vardie and typedie.
  (dwflpp::translate_final_fetch_or_store): Use a vardie and typedie.
  (dwflpp::resolve_unqualified_inner_typedie): Update dies, not attrs.
  (dwflpp::literal_stmt_for_local): Update calls to above.
  (dwflpp::literal_stmt_for_return): Ditto.
  (dwflpp::literal_stmt_for_pointer): Ditto.

14 years agoPR 11338 (partial): Used @defined in tcp.stp and new test cases.
David Smith [Wed, 5 May 2010 17:32:21 +0000 (12:32 -0500)]
PR 11338 (partial): Used @defined in tcp.stp and new test cases.

* tapset/tcp.stp: Removed kernel version check.  Made other small
  improvements.
* testsuite/buildok/tcp-detailed.stp: New detailed test of all tcp probes
  and convenience variables.
* testsuite/buildok/udp-detailed.stp: New detailed test of all udp probes
  and convenience variables.
* testsuite/buildok/tcp-embedded.stp: Added rest of the tcp embedded-C
  functions.

14 years agoUpdated context tapset (for RHEL4) and updated the context testcase.
David Smith [Tue, 4 May 2010 21:39:52 +0000 (16:39 -0500)]
Updated context tapset (for RHEL4) and updated the context testcase.

* tapset/context.stp: Added RHEL4 fixes.
* tapset/context-embedded.stp: Added rest of the context embedded-C
  functions and renamed from context-test.stp.

14 years agoCast negative values to smaller type.
Stan Cox [Tue, 4 May 2010 20:14:25 +0000 (16:14 -0400)]
Cast negative values to smaller type.

sdt_types.stp (short,int): New.
(const_short_int_var,volatile_short_int_var,const_int_var,volatile_int_var): Use it.

14 years agoPR11566: "is too"
Frank Ch. Eigler [Tue, 4 May 2010 19:21:22 +0000 (15:21 -0400)]
PR11566: "is too"

14 years agoPR11566: embedded-c expressions
Frank Ch. Eigler [Tue, 4 May 2010 19:05:24 +0000 (15:05 -0400)]
PR11566: embedded-c expressions

* staptree.h: embedded_expr: New type.
* parse.cxx (parse_statement, parse_value): Parse it.
* staptree.cxx: Update visitors, provide basic code.
* elaborate.cxx (typeresolution_info::visit_embedded_expr): Select
  type based upon internal markup.
* translate.cxx: Emit it.
* elaborate.h: Corresponding changes.
* NEWS, stap.1.in: Document it.
* testsuite/buildko/three.stp, buildok/thirtyfour.stp, parseok/twentyone.stp:
  Test it.

14 years agoPR 11338 (partial): Used @defined in signal.stp and general update.
David Smith [Tue, 4 May 2010 17:01:01 +0000 (12:01 -0500)]
PR 11338 (partial): Used @defined in signal.stp and general update.

* tapset/signal.stp: Large update to get working on RHEL4, RHEL5,
  RHEL6(beta), f12, and rawhide. Removed some kernel version checks.
* testsuite/buildok/signal-all-probes.stp: No longer tests "internal"
  probes.
* testsuite/buildok/signal-detailed.stp: New detailed test of all signal
  probes and convenience variables.
* testsuite/buildok/signal-check_ignored.stp: New detailed test which can
  fail on some platforms because we can't find inline function arguments.
* testsuite/buildok/signal-handle.stp: Ditto.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail signal-check_ignored.stp
  and signal-handle.stp

14 years agoPR 11441: Preparation for client/server merge into stap.
Dave Brolley [Fri, 30 Apr 2010 14:56:30 +0000 (10:56 -0400)]
PR 11441: Preparation for client/server merge into stap.

- Factor out main into initialization, argument parsing, argument checking
  pass 0-4, pass 5, cleanup.
- Move systemtap_session methods into their own file (session.cxx)

14 years agoPotentialloy confusing typo
Dave Brolley [Mon, 29 Mar 2010 15:44:11 +0000 (11:44 -0400)]
Potentialloy confusing typo

If it does not already exit -> If it does not already exist.

14 years agoFix typo in conditionalizing uprobe_get_pc extension
Wenji Huang [Tue, 4 May 2010 02:58:23 +0000 (10:58 +0800)]
Fix typo in conditionalizing uprobe_get_pc extension

* runtime/stack-i386.c: Use ifdef.
* runtime/stack.c: Correct CONFIG_UPROBE_GET_PC.

14 years agoPR11504 part: remove synthetic probe_NNNN name from error messages and most diagnostics
Frank Ch. Eigler [Mon, 3 May 2010 19:24:46 +0000 (15:24 -0400)]
PR11504 part: remove synthetic probe_NNNN name from error messages and most diagnostics

* elaborate.cxx (typeresolution_info::visit_target_symbol): Use
  sole_location as opposed to derived_probe name.
  (unresolved, invalid, mismatch): Remove the name/etc. prefix, as token
  context is available.
* translate.cxx (emit_lock_decls): Print sole_location here too.

14 years agouprobes: autoconf conditionalize uprobe_get_pc extension
Frank Ch. Eigler [Mon, 3 May 2010 17:45:03 +0000 (13:45 -0400)]
uprobes: autoconf conditionalize uprobe_get_pc extension

* runtime/autoconf-uprobe-get-pc.c: New file.
* buildrun.cxx: Build it, conditionally define STAPCONF_UPROBE_GET_PC.
* runtime/stack*.c, runtime/uprobes*/*.[ch]: Use it.  Forget GET_PC_URETPROBE_NONE.
* tapsets.cxx: Ditto.

14 years agoMake sure testsuite/buildok/memory-write_shared_copy.stp compiles.
David Smith [Mon, 3 May 2010 19:04:51 +0000 (14:04 -0500)]
Make sure testsuite/buildok/memory-write_shared_copy.stp compiles.

* testsuite/buildok/memory-write_shared_copy.stp: Fix compilation on
  systems where vm.write_shared_copy doesn't exist.

14 years agoMove failing nfs test to its own testcase.
David Smith [Mon, 3 May 2010 18:52:54 +0000 (13:52 -0500)]
Move failing nfs test to its own testcase.

* testsuite/buildok/nfs-detailed.stp: Move nfs.fop.check_flags test to
  nfs-fop.check_flags.stp (since it fails on RHEL5 and would mask other
  nfs test failures).
* testsuite/buildok/nfs-fop.check_flags.stp: New test.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail nfs-fop.check_flags.stp.

14 years agoPR 11338 (partial): Used @defined in memory.stp and general update.
David Smith [Mon, 3 May 2010 18:18:53 +0000 (13:18 -0500)]
PR 11338 (partial): Used @defined in memory.stp and general update.

* tapset/memory.stp: Large update to get working on RHEL4, RHEL5,
  RHEL6(beta), f12, and rawhide. Removed all kernel version checks.
* testsuite/buildok/memory-detailed.stp: New detailed test of all memory
  probes and convenience variables.
* testsuite/buildok/vm.tracepoints.kmalloc.stp: Moved into
  memory-detailed.stp.
* testsuite/buildok/vm.tracepoints.stp: Ditto.
* testsuite/buildok/memory-mmap.stp: New detailed test which can fail on
  some platforms because we can't find inline function arguments.
* testsuite/buildok/memory-write_shared_copy.stp: Ditto.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail memory-mmap.stp and
  memory-write_shared_copy.stp.

14 years agoMake sure prelink is available during tests.
Mark Wielaard [Mon, 3 May 2010 11:11:16 +0000 (13:11 +0200)]
Make sure prelink is available during tests.

* systemtap.spec: Explicitly require prelink for systemtap-testsuite.
* testsuite/systemtap.exelib/exelib.exp: Fail if prelinking fails.

14 years agoGet memory.stp embedded-C functions working on 2.6.9 kernels (RHEL4).
David Smith [Thu, 29 Apr 2010 17:58:01 +0000 (12:58 -0500)]
Get memory.stp embedded-C functions working on 2.6.9 kernels (RHEL4).

* tapset/memory.stp: Define __GFP_DMA32, GFP_DMA32, __GFP_ZERO,
  __GFP_NOMEMALLOC, and __GFP_HARDWALL if not defined.
* testsuite/buildok/memory-embedded.stp: New testcase.

14 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Stan Cox [Wed, 28 Apr 2010 16:59:56 +0000 (12:59 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

14 years agoAdd probe performance script.
Stan Cox [Wed, 28 Apr 2010 16:57:45 +0000 (12:57 -0400)]
Add probe performance script.

scripts/probe_perf:  New.

14 years agoSmall typo in NEWS
Wenji Huang [Wed, 28 Apr 2010 09:30:39 +0000 (17:30 +0800)]
Small typo in NEWS

14 years agoAUTHORS bump
Josh Stone [Tue, 27 Apr 2010 23:36:33 +0000 (16:36 -0700)]
AUTHORS bump

14 years agoRegenerate example indexes
Josh Stone [Tue, 27 Apr 2010 23:32:23 +0000 (16:32 -0700)]
Regenerate example indexes

14 years agoPR4396: Tweak the dumpstack example and add meta
Josh Stone [Tue, 27 Apr 2010 23:29:16 +0000 (16:29 -0700)]
PR4396: Tweak the dumpstack example and add meta

14 years agoPR4396: script to dump hung task's kernel stack
Wenji Huang [Tue, 27 Apr 2010 22:49:01 +0000 (15:49 -0700)]
PR4396: script to dump hung task's kernel stack

14 years agoPR 11338 (partial): Used @defined in nfs.stp and general update.
David Smith [Tue, 27 Apr 2010 16:18:58 +0000 (11:18 -0500)]
PR 11338 (partial): Used @defined in nfs.stp and general update.

* tapset/nfs.stp: Large update to get working on RHEL4, f12, and
  rawhide.  RHEL5 fails because of PR 1155 (can't find inline function
  arguments). with probe nfs.fop.check_flags.  Removed all kernel version
  checks.
* testsuite/buildok/nfs-detailed.stp: New detailed test of all nfs probes
  and convenience variables.

14 years agoFix small typo in README.security
Wenji Huang [Tue, 27 Apr 2010 07:02:26 +0000 (15:02 +0800)]
Fix small typo in README.security

14 years agoPR11340: Use local vardecls for tracepoint/marker args
Josh Stone [Tue, 27 Apr 2010 01:16:51 +0000 (18:16 -0700)]
PR11340: Use local vardecls for tracepoint/marker args

This gets rid of the "probe_context_var" field of target_symbols, which
was a hacky way to resolve args into a special local variable.  Now we
create a real local vardecl and mark it with "skip_init" so we know that
it will be filled in by derived_probe-specific code.

* staptree.h (target_symbol): Remove probe_context_var.
  (vardecl): Add skip_init.
* elaborate.h (derived_probe::emit_probe_context_vars): Remove, as such
  vars are now emitted along with all the other locals.
* elaborate.cxx (semantic_pass_opt2): Make skip_init locals immune to
  read/write analysis.
  (const_folder::visit_defined_op): No more probe_context_var.
  (typeresolution_info::visit_symbol): Ditto.
* tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_arg):
  Refer to the local name as a normal symbol reference.
  (mark_derived_probe::mark_derived_probe): If target_symbols were used,
  add vardecls to the probe locals.
  (mark_derived_probe::emit_probe_context_vars): Remove.
* tapsets.cxx (var_expanding_visitor::visit_defined_op): For @defined,
  there's no longer a "success" via probe_context_var.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Refer to
  the local name as a normal symbol reference.
  (tracepoint_derived_probe::tracepoint_derived_probe): For each used
  arg, add a vardecl to the probe locals.
  (tracepoint_derived_probe::emit_probe_context_vars): Remove.
* translate.cxx (c_unparser::emit_common_header): No probe_context_vars.
  (c_unparser::emit_probe): Don't init the skip_init locals.
  (c_unparser_assignment::visit_symbol): No more probe_context_var.

14 years agoloc2c: Do not barf on multiple values left on stack.
Roland McGrath [Mon, 26 Apr 2010 18:38:02 +0000 (11:38 -0700)]
loc2c: Do not barf on multiple values left on stack.

* loc2c.c (translate): Do not barf on multiple values left on stack.

14 years agoPR 11338 (partial): Used @defined in nfsd.stp and general update.
David Smith [Mon, 26 Apr 2010 16:56:29 +0000 (11:56 -0500)]
PR 11338 (partial): Used @defined in nfsd.stp and general update.

* tapset/nfsd.stp: Large update to get working on RHEL4, RHEL5, f12, and
  rawhide.  Removed some embedded-C and kernel version checks.
* testsuite/buildok/nfsd-embedded.stp: Added the rest of the nfsd embedded
  functions.
* testsuite/buildok/nfsd-detailed.stp: New detailed test of all nfsd
  probes and convenience variables.

14 years agoLocal arrays are now a semantic failure, instead of a translation failure.
Mark Wielaard [Fri, 23 Apr 2010 15:26:45 +0000 (17:26 +0200)]
Local arrays are now a semantic failure, instead of a translation failure.

Commit 5abd36 Block local stats and arrays in pass 2 changed when a
local array is detected as failure.

* testsuite/transko/three.stp: Moved to...
* testsuite/semko/array02.stp: ...here.

14 years agoWe also need SYSTEMTAP_INCLUDES for CFLAGS since mf_keycache.c has probes.
Stan Cox [Fri, 23 Apr 2010 15:25:28 +0000 (11:25 -0400)]
We also need SYSTEMTAP_INCLUDES for CFLAGS since mf_keycache.c has probes.

* systemtap.apps/mysql.exp (CFLAGS):  Add SYSTEMTAP_INCLUDES.

14 years agoPR11222: Also search ABRTD debuginfo cache
Frank Ch. Eigler [Fri, 23 Apr 2010 00:16:09 +0000 (20:16 -0400)]
PR11222: Also search ABRTD debuginfo cache

* setupdwfl.cxx (debuginfo*arr): Add /var/cache/abrt-di/usr/lib/debug.

14 years agomention yum-builddep and apt-get build-dep in README build instructions
Frank Ch. Eigler [Thu, 22 Apr 2010 23:45:45 +0000 (19:45 -0400)]
mention yum-builddep and apt-get build-dep in README build instructions

14 years agoConsolidate load_aggregate logic
Josh Stone [Thu, 22 Apr 2010 01:53:03 +0000 (18:53 -0700)]
Consolidate load_aggregate logic

* translate.cxx (c_unparser::load_aggregate): Every caller needed to
  figure out pre_agg and var vs. mapvar, so let's do it for them.
  (c_unparser::visit_foreach_loop): Defer more to load_aggregate.
  (c_unparser::visit_arrayindex): Ditto.
  (c_unparser::visit_print_format): Ditto.
  (c_unparser::visit_stat_op): Ditto.
  (c_tmpcounter::load_aggregate): New, determine all the tmps needed to
  mirror c_unparser::load_aggregate.
  (c_tmpcounter::visit_foreach_loop): Call load_aggregate.
  (c_tmpcounter::visit_arrayindex): Ditto.
  (c_tmpcounter::visit_print_format): Ditto.
  (c_tmpcounter::visit_stat_op): Ditto.

14 years agoLet hist buckets be printed with other arguments
Josh Stone [Thu, 22 Apr 2010 00:46:38 +0000 (17:46 -0700)]
Let hist buckets be printed with other arguments

We already have quite a kludge to fall back from the print(@hist(...))
special case if the @hist happens to have a bucket arrayindex on it.  In
that case we're printing scalars, so we can allow the print to contain
other scalar values too.

As noted in a comment, this still fails if the arrayindex is the start
of a larger expression. :(

* parse.cxx (parser::parse_symbol): Parse other print args after @hist.
* testsuite/buildok/print_histogram_entry.stp: Add a few prints to
  exercise this (and one that still doesn't work).

14 years agoPR2168: Support foreach over pmap histograms
Josh Stone [Thu, 22 Apr 2010 00:24:08 +0000 (17:24 -0700)]
PR2168: Support foreach over pmap histograms

* translate.cxx (c_tmpcounter::visit_foreach_loop): Add tmps for hist
  indexes, only if it's not already cached from an outer foreach.
  (c_unparser::visit_foreach_loop): Allow the possibility that the hist
  var might need to be a mapvar.
* testsuite/buildok/pmap_foreach.stp: Add a nested foreach loop.
* testsuite/systemtap.base/foreach_value.stp: Add a nested foreach loop.
* testsuite/systemtap.base/foreach_value.exp: Add expected output.

14 years agoPR2168: Support break/continue in histogram bucket foreach
Josh Stone [Wed, 21 Apr 2010 22:35:01 +0000 (15:35 -0700)]
PR2168: Support break/continue in histogram bucket foreach

* translate.cxx (c_unparser::visit_foreach_loop): Output break and
  continue labels for histogram bucket foreach.
* testsuite/buildok/iterate_histogram_buckets.stp: Enable test.

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