]> sourceware.org Git - systemtap.git/log
systemtap.git
15 years agoUse dwarf_diename instead of a DW_AT_name lookup
Josh Stone [Thu, 20 Aug 2009 00:07:30 +0000 (17:07 -0700)]
Use dwarf_diename instead of a DW_AT_name lookup

We should always use the canonical dwarf_diename.  The code being
replaced here wasn't even using dwarf_attr_integrate, so it may have
been missing the accessibility of some names.

* dwflpp.cxx (dwflpp::iterate_over_labels): Use dwarf_diename.

15 years agoUse dwarf_type_name in more places
Josh Stone [Wed, 19 Aug 2009 23:48:53 +0000 (16:48 -0700)]
Use dwarf_type_name in more places

* dwarf_wrappers.cxx (dwarf_type_name): Moved here from tapsets.cxx, and
  added a variant that returns a string for easier ostreaming.
* dwflpp.cxx (dwflpp::print_members): Use dwarf_type_name for errors.
  (dwflpp::find_struct_member): Ditto.
  (dwflpp::translate_components): Ditto.
  (dwflpp::translate_final_fetch_or_store): Ditto.
  (dwflpp::literal_stmt_for_pointer): Ditto.
* tapsets.cxx (dwarf_derived_probe::saveargs): Pass die to
  dwarf_type_name by pointer instead of reference.
  (uprobe_derived_probe::saveargs): Ditto.
  (resolve_tracepoint_arg_type): Ditto.

15 years agoPR10538: Use {...} for naming anonymous types
Josh Stone [Wed, 19 Aug 2009 21:40:53 +0000 (14:40 -0700)]
PR10538: Use {...} for naming anonymous types

* tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename.

15 years agoPR10538: Improve location lookup for unions
Josh Stone [Wed, 19 Aug 2009 20:30:31 +0000 (13:30 -0700)]
PR10538: Improve location lookup for unions

We had a bug that the starting call to find_struct_member used the same
memory for the parentdie and the resulting member.  If parentdie is a
union, then the first member probably won't have a location, and we
actually assert that it must be a union.  Since we wrote the result in
the same memory, we lost the real info about the parent, and so the
assertion failed.

* dwflpp.cxx (dwflpp::translate_components): Use distinct memory for the
  parent and resulting member in the call to find_struct_member.
  (dwflpp::find_struct_member): Remove the needless parentdie copy.

15 years ago* testsuite/systemtap.base/postgres.exp: New test for checking sdt
Stan Cox [Wed, 19 Aug 2009 20:11:09 +0000 (16:11 -0400)]
* testsuite/systemtap.base/postgres.exp: New test for checking sdt
  marker support as used by postgres.  Currently assumes, and
  verifies, that postgres is installed in /usr/local

15 years agoPR10228: fix non-utrace building regression
Frank Ch. Eigler [Wed, 19 Aug 2009 16:18:48 +0000 (12:18 -0400)]
PR10228: fix non-utrace building regression

* translate.cxx (dump_unwindsyms): Decide based on modname[] not
  mainfile[] to emit a vmcb.
* runtime/task_finder.c (non-UTRACE): Include dummy stap_{start,stop}_*
  functions.

15 years agoImproved testcase error handling.
David Smith [Wed, 19 Aug 2009 16:20:59 +0000 (11:20 -0500)]
Improved testcase error handling.
* testsuite/systemtap.base/arith.exp: Improved error handling.
* testsuite/systemtap.base/cmd_parse.exp: Ditto.

15 years agoImproved systemtap.printf/sharedbuf.exp testcase.
David Smith [Wed, 19 Aug 2009 15:15:21 +0000 (10:15 -0500)]
Improved systemtap.printf/sharedbuf.exp testcase.
* testsuite/systemtap.printf/sharedbuf.exp: Handles failure better and
  possible modpost warnings.

15 years agoFix typo in sdt_types.stp (missing newline).
Mark Wielaard [Wed, 19 Aug 2009 09:58:44 +0000 (11:58 +0200)]
Fix typo in sdt_types.stp (missing newline).

* testsuite/systemtap.base/sdt_types.stp (int_var): Add \n to printf.

15 years agoPR10495: allow multiple probe aliases with same name
Frank Ch. Eigler [Wed, 19 Aug 2009 00:12:57 +0000 (20:12 -0400)]
PR10495: allow multiple probe aliases with same name

* elaborate.cxx (match_node::bind): Change ->end to ->ends[] vector.
  (find_and_build,build_no_more): Iterate over ends[].
* elaborate.h: Corresponding changes.
* testsuite/semok/thirtyfour.stp: New test.
* NEWS, doc/langref.tex: Note this.

15 years agoAUTHORS update
Josh Stone [Tue, 18 Aug 2009 22:59:37 +0000 (15:59 -0700)]
AUTHORS update

15 years agoPR10512 STAP_PROBES don't work in c++ constructors/destructors testcase.
Mark Wielaard [Tue, 18 Aug 2009 21:03:00 +0000 (23:03 +0200)]
PR10512 STAP_PROBES don't work in c++ constructors/destructors testcase.

* testsuite/systemtap.base/cxxclass.exp: New file.
* testsuite/systemtap.base/cxxclass.stp: Likewise.
* testsuite/systemtap.base/cxxclass.cxx: Likewise.

15 years agoPR10512 Referencing computed goto labels in c++ constructors does work.
Mark Wielaard [Tue, 18 Aug 2009 20:08:51 +0000 (22:08 +0200)]
PR10512 Referencing computed goto labels in c++ constructors does work.

PR10533 inlined vars are not always found was fixed which means we
no longer need to prevent inlining of the STAP_PROBE macros.

* includes/sys/sdt.h (STAP_UNINLINE_LABEL): Removed.
  (STAP_PROBE[1-9]_): Remove label: and STAP_UNINLINE_LABEL.

15 years agoAdd testcase for PR10533 (inlined vars) and 10537 (inlined labels - disabled)
Mark Wielaard [Tue, 18 Aug 2009 20:01:53 +0000 (22:01 +0200)]
Add testcase for PR10533 (inlined vars) and 10537 (inlined labels - disabled)

Partial testcase for PR10533 (inlined vars) and 10537 (inlined labels)
currently we cannot use the full testcase since stap doesn't support
probing multiple instances of inlined labels.

* testsuite/systemtap.base/inlinedvars.exp: New file.
* testsuite/systemtap.base/inlinedvars.stp: Likewise.
* testsuite/systemtap.base/inlinedvars.c: Likewise.

15 years agoPR10533 inlined vars are not always found (dwflpp).
Mark Wielaard [Tue, 18 Aug 2009 19:54:54 +0000 (21:54 +0200)]
PR10533 inlined vars are not always found (dwflpp).

dwflpp::find_variable_and_frame_base switched too early to "pyshical view"
of die tree. We need to lookup the var in the "syntactical view" of the die
tree first. Then when we see a DW_TAG_inlined_subroutine while walking the
syntactical die tree as returned by dwarf_getscopes for a given variable
to retrieve the frame base, then we need to switch to walking the physical
die tree where the subroutine is inlined.

* dwflpp.cxx (find_variable_and_frame_base): Don't immediately go to
  die_scopes, but lookup var first based on pc. Then switch "die branches"
  when searching for frame base and a DW_TAG_inlined_subroutine is
  encountered.

15 years agoPR10533 inlined vars are not always found (lo2c-test off-by-one).
Mark Wielaard [Tue, 18 Aug 2009 19:52:59 +0000 (21:52 +0200)]
PR10533 inlined vars are not always found (lo2c-test off-by-one).

* loc2c-test.c (handle_variable): Set inner to zero after
  calling dwarf_getscopes_die(), for loop will increase inner.

15 years agoPR10518: context shrinkage with function recursion analysis feeding MAXNESTING
Frank Ch. Eigler [Tue, 18 Aug 2009 19:52:02 +0000 (15:52 -0400)]
PR10518: context shrinkage with function recursion analysis feeding MAXNESTING

* translate.cxx (emit_common_header, translate_pass): Use new
  recursion_info visitor to calculate appropriate MAXNESTING value for
  scripts with or without recursion.
* tapsets.cxx (common_probe_entryfn_prologue): Initialize c->nesting = -1.
* stap.1.in: Clarify MAXNESTING value.

15 years agoAdapt tracepoints to the new probe_locals union
Josh Stone [Tue, 18 Aug 2009 17:54:11 +0000 (10:54 -0700)]
Adapt tracepoints to the new probe_locals union

* tapsets.cxx (tracepoint_derived_probe_group::emit_module_decls): Use
  probe_locals to set the tracepoint arguments for the probe.
* testsuite/systemtap.base/tracepoints.exp: Include the arguments in the
  pass-4 tracepoint test.

15 years agoPR10516: reduce context size
Frank Ch. Eigler [Tue, 18 Aug 2009 16:26:26 +0000 (12:26 -0400)]
PR10516: reduce context size

* translate.cxx (emit_common_header): Emit probe locals into
  a separate union, not into the locals[] array.
  (emit_probe): Adapt.

15 years agoelfutils build tweak: run nested configure with bash, add -fgnu89-inline
Frank Ch. Eigler [Tue, 18 Aug 2009 15:37:27 +0000 (11:37 -0400)]
elfutils build tweak: run nested configure with bash, add -fgnu89-inline

* configure.ac: Tweak --with-elfutils nested configure invocation.
* rest of auto* files: regenerated with fedora-11 tools

15 years ago* dtrace.in: Honor the dirname for the output file.
Stan Cox [Tue, 18 Aug 2009 14:50:05 +0000 (10:50 -0400)]
* dtrace.in: Honor the dirname for the output file.
* testsuite/systemtap.base/dtrace.exp: New test.

15 years agoPR10533 loc2c doesn't resolve frame base correctly for inlined vars.
Mark Wielaard [Tue, 18 Aug 2009 13:50:40 +0000 (15:50 +0200)]
PR10533 loc2c doesn't resolve frame base correctly for inlined vars.

When we see a DW_TAG_inlined_subroutine while walking the syntactical
die tree as returned by dwarf_getscopes for a given variable to retrieve
the frame base, then we need to switch to walking the physical die tree
where the subroutine is inlined.

* loc2c-test.c (handle_variable): Switch "die branches" when searching
  for frame base and a DW_TAG_inlined_subroutine is encountered.

15 years agoPrint DIE offsets in loc2c-test scope dumps.
Roland McGrath [Tue, 18 Aug 2009 09:27:38 +0000 (02:27 -0700)]
Print DIE offsets in loc2c-test scope dumps.

15 years agoUnlocks global variables, then calls _stp_print_flush().
David Smith [Mon, 17 Aug 2009 17:27:15 +0000 (12:27 -0500)]
Unlocks global variables, then calls _stp_print_flush().
* translate.cxx (c_unparser::emit_probe): Unlocks global variables, then
  calls _stp_print_flush() (instead of the other way around).

15 years agoCache failed tracepoint headers too
Josh Stone [Sat, 15 Aug 2009 00:56:46 +0000 (17:56 -0700)]
Cache failed tracepoint headers too

Rather than re-attempting a tracepoint header that fails to compile, we
now save an empty file into the cache to indicate "nothing to see here."
See also PR10424.

* tapsets.cxx (tracepoint_builder::get_tracequery_module): Use /dev/null
  as the empty result file if make_tracequery fails.
  (tracepoint_builder::init_dw): Ignore empty tracequery modules.

15 years agoPR10228: use task_finder_vma for -d /user/object files.
Frank Ch. Eigler [Fri, 14 Aug 2009 02:53:44 +0000 (22:53 -0400)]
PR10228: use task_finder_vma for -d /user/object files.

* main.cxx (main): For "-d /path" arguments, enable task finder.
* runtime/sym.h (_stp_module): Add *vmcb member.
* task_finder{.cxx,.h} (emit_vma_callback_probe_decl): Zap.
* tapset-itrace.cxx, tapset-utrace.cxx: Use unwindsyms_modules
  instead.
* tapsets.cxx (uprobe::emit_module_decls): Ditto.
* translate.cxx (emit_module_init): Emit task finder registrations
  for vmcb's associated with _stp_modules.
  (dump_unwindsyms): Associate vmcbs with user-space unwindsyms entries.

15 years agousability: don't suppress pass-4 compiler errors
Frank Ch. Eigler [Thu, 13 Aug 2009 20:04:56 +0000 (16:04 -0400)]
usability: don't suppress pass-4 compiler errors

... since a pass-4 compilation error is just as bad as pass-2 error.

* buildrun.cxx (run_make_cmd): Remove "2>&1".

15 years agoAdd missing quote for uname.tcl
Wenji Huang [Fri, 14 Aug 2009 05:51:36 +0000 (01:51 -0400)]
Add missing quote for uname.tcl

* testsuite/systemtap.exelib/uname.tcl: Add '"'.

15 years agoPR10507: tweak heuristics for stap_uprobes[] allocation
Frank Ch. Eigler [Wed, 12 Aug 2009 20:07:08 +0000 (16:07 -0400)]
PR10507: tweak heuristics for stap_uprobes[] allocation

* tapsets.cxx (uprobes::emit_module_decls): Compute MAXUPROBES
  with x-treme kl3v3rn3ss.
* stap.1.in: Clarify MAXUPROBES.

15 years agoPR10461: Probe identical functions only once
Josh Stone [Wed, 12 Aug 2009 00:01:35 +0000 (17:01 -0700)]
PR10461: Probe identical functions only once

In C++ especially, a function definition in a header may be compiled
into multiple CUs, but the linker will merge those into a single output
function.  We don't want to place multiple probes on the same function.

The dupe-detection from the alias code (commit 1c6b77e5) already tracks
identical functions within a CU, so I've just lifted this to instead
track function entrypcs at the module level.

* dwflpp.cxx (dwflpp::iterate_over_functions): Remove dupe checks.
* tapsets.cxx (dwarf_query): Add alias_dupes set to the query.
  (dwarf_query::handle_query_module): Reset the dupes for each module.
  (query_dwarf_func): Check that we only probe each entrypc once.

15 years agoDon't call dwarf_lowpc after dwarf_entrypc fails
Josh Stone [Tue, 11 Aug 2009 21:59:41 +0000 (14:59 -0700)]
Don't call dwarf_lowpc after dwarf_entrypc fails

The implementation of dwarf_entrypc already checks for _lowpc, so it's
redundant for us to attempt a _lowpc call too.

* dwflpp.cxx (dwflpp::function_entrypc): Remove XXX comment.
  (dwflpp::die_entrypc): Don't bother with _lowpc if _entrypc fails

15 years agoImproved context.exp error handling.
David Smith [Tue, 11 Aug 2009 22:08:47 +0000 (17:08 -0500)]
Improved context.exp error handling.
* testsuite/systemtap.context/context.exp: Makes sure errors are output to
  the log file.  Also, a Makefile is copied with 'cp -p' to avoid make
  erroring out if the Makefile's date is in the future (as can be the case
  if running the test over nfs).
* testsuite/systemtap.context/args.tcl: Makes sure 'close' errors are
  ignored.
* testsuite/systemtap.context/backtrace.tcl: Ditto.

15 years agoAdd 'unused' attribute to module_data and module_size arguments of check_permissions.
Dave Brolley [Tue, 11 Aug 2009 15:57:04 +0000 (11:57 -0400)]
Add 'unused' attribute to module_data and module_size arguments of check_permissions.

15 years agoexelib testcase now ensures uprobes.ko is up to date.
David Smith [Tue, 11 Aug 2009 13:40:49 +0000 (08:40 -0500)]
exelib testcase now ensures uprobes.ko is up to date.
* testsuite/systemtap.exelib/cleanup.tcl: Makes sure uprobes.ko is up to
  date.
* testsuite/systemtap.exelib/lib.tcl: Ditto.
* testsuite/systemtap.exelib/mark.tcl: Ditto.
* testsuite/systemtap.exelib/uname.tcl: Ditto.
* testsuite/systemtap.exelib/ustack.tcl: Ditto.

15 years agoRH516691. SSL typo in manpage.
Mark Wielaard [Tue, 11 Aug 2009 07:49:00 +0000 (09:49 +0200)]
RH516691. SSL typo in manpage.

* stap-server.8.in: Fix SLL typo to read SSL.

15 years agoAvoid assertion error for no matched function in statement probe
Wenji Huang [Mon, 10 Aug 2009 23:29:50 +0000 (19:29 -0400)]
Avoid assertion error for no matched function in statement probe

* dwflpp.cxx (iterate_over_functions): Return for NULL pointer.
* testsuite/systemtap.base/statement.exp: Add test case.

15 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Josh Stone [Mon, 10 Aug 2009 22:17:35 +0000 (15:17 -0700)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

15 years agoPR10499: Integrate attributes in dwarf_decl_file/line
Josh Stone [Mon, 10 Aug 2009 21:48:39 +0000 (14:48 -0700)]
PR10499: Integrate attributes in dwarf_decl_file/line

Elfutils prior to 0.143 didn't use attr_integrate when looking up the
decl_file or decl_line, so the attributes would sometimes be missed.
For those old versions, we define custom implementations to do the
integration.

* dwarf_wrappers.cxx (dwarf_decl_file_integrate): New.
  (dwarf_decl_line_integrate): New.
* dwarf_wrappers.h: Add macros to redirect calls to the above functions.
* dwflpp.cxx (dwflpp::iterate_over_labels): Replace a manual attribute
  lookup that is the same as dwarf_decl_line.

15 years agoSimplify _ELFUTILS_PREREQ checking
Josh Stone [Mon, 10 Aug 2009 20:01:30 +0000 (13:01 -0700)]
Simplify _ELFUTILS_PREREQ checking

We were jumping through a few hoops to deal with elfutils < 0.138 that
did not have the _ELFUTILS_PREREQ macro.  I've added an always-false
dummy macro to take its place when it doesn't exit.  All of the other
"#ifdef _ELFUTILS_PREREQ" ugliness can now go away.

15 years agoMerge branch 'master' of ssh://mark@sourceware.org/git/systemtap
Mark Wielaard [Mon, 10 Aug 2009 16:28:40 +0000 (18:28 +0200)]
Merge branch 'master' of ssh://mark@sourceware.org/git/systemtap

15 years agoPR10506 experiment: use /sbin/insmod for uprobes.ko loading
Frank Ch. Eigler [Mon, 10 Aug 2009 16:13:31 +0000 (12:13 -0400)]
PR10506 experiment: use /sbin/insmod for uprobes.ko loading

* runtime/staprun/staprun.c (enable_uprobes): insmod, not insert_module().

15 years agoOnly add extra error on no probes found if no previous errors already shown.
Mark Wielaard [Mon, 10 Aug 2009 15:44:31 +0000 (17:44 +0200)]
Only add extra error on no probes found if no previous errors already shown.

* elaborate.cxx (semantic_pass): Don't add "no probes found" if session
  already had other errors.

15 years agoIt is not an error or warning if the local database of authorized signing
Dave Brolley [Mon, 10 Aug 2009 15:47:17 +0000 (11:47 -0400)]
It is not an error or warning if the local database of authorized signing
certificates does not exist. It just means that the signed module is untrusted.

15 years agoUse nop instructions without parameters on arm
Eugeniy Meshcheryakov [Sat, 8 Aug 2009 13:51:44 +0000 (15:51 +0200)]
Use nop instructions without parameters on arm

Fixes FTBFS, see
https://buildd.debian.org/fetch.cgi?pkg=systemtap;ver=0.9.9-1;arch=armel;stamp=1249664825

15 years agoZap dwarf_diename_integrate
Josh Stone [Sat, 8 Aug 2009 01:51:19 +0000 (18:51 -0700)]
Zap dwarf_diename_integrate

The dwarf_diename in elfutils learned a long time ago to use
dwarf_attr_integrate when looking up the name.  Our minimum elfutils
0.126 has this, so we don't need to kludge it ourselves.

15 years agoMake files executable
Eugeniy Meshcheryakov [Fri, 7 Aug 2009 14:40:18 +0000 (16:40 +0200)]
Make files executable

15 years agoDo not use plain [] in help string in configure.ac
Eugeniy Meshcheryakov [Fri, 7 Aug 2009 14:31:36 +0000 (16:31 +0200)]
Do not use plain [] in help string in configure.ac

This confuses Debian's automake.

15 years agoPR10486 Raise default MAXSTRINGLEN.
Mark Wielaard [Thu, 6 Aug 2009 22:01:04 +0000 (00:01 +0200)]
PR10486 Raise default MAXSTRINGLEN.

* translate.cxx (translate_pass): Raise MAXSTRINGLEN to 256 for 32bit arches
  and to 512 for 64bit arches.
* testsuite/systemtap.context/backtrace.tcl: Don't set MAXSTRINGLEN.
* testsuite/systemtap.exelib/ustack.tcl: Likewise.
* testsuite/systemtap.string/str_replace.exp: Explicitly set MAXSTRINGLEN.

15 years agoFix a couple of sdt_query reorg problems.
Stan Cox [Thu, 6 Aug 2009 20:20:39 +0000 (16:20 -0400)]
Fix a couple of sdt_query reorg problems.

* tapsets.cxx (sdt_query::handle_query_module): For uprobe probes:
1) find all same named probes to handle multiple probes per module
2) use new_base for uprobe probes to handle $$name
* sdt_misc.exp:  Test $$name

15 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 6 Aug 2009 18:40:20 +0000 (14:40 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Thu, 6 Aug 2009 18:36:37 +0000 (13:36 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoWorks with or without a ring_buffer_iter.
David Smith [Thu, 6 Aug 2009 18:35:11 +0000 (13:35 -0500)]
Works with or without a ring_buffer_iter.
* runtime/transport/ring_buffer.c (_stp_find_next_event): Works with or
  without a ring_buffer iterator.
  (_stp_find_next_event): Ditto.
  (_stp_data_read_trace): Ifdef'ed out using ring_buffer iterators.
  (_stp_get_iterator): New function.
  (_stp_data_write_reserve): Calls _stp_get_iterator().

15 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 6 Aug 2009 18:35:08 +0000 (14:35 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

15 years agoFix missing strlen compile error.
Stan Cox [Thu, 6 Aug 2009 18:27:48 +0000 (14:27 -0400)]
Fix missing strlen compile error.

StapParser.cxx (#include cstring): New.

15 years ago2009-08-06 Dave Brolley <brolley@redhat.com>
Dave Brolley [Thu, 6 Aug 2009 16:25:50 +0000 (12:25 -0400)]
2009-08-06  Dave Brolley  <brolley@redhat.com>

        * modverify.c (staprun.h): #include it.
        (verify_it): Now accepts module data and signature data as arguments.
        Don't open and read the signature here. Don't read the module here.
        (verify_module): Now accepts module data as argument. Read the signature

        once here.
        * modverify.h (verify_module): Now accepts module data as argument.
        * staprun.c (main): Don't call check_permissions here.
        * staprun.h (check_permissions): Prototype removed.
        * staprun_funcs.c (check_permissions): Now static. Accepts module data
        as argument. Pass module data to check_signature.
        (insert_module): Canonicalize the module path early here. Call
        check_permissions here, passing it the mapped module data.
        (check_signature): Now accepts module data as argument. Pass the module
        data to verify_module.
        (check_path): Use the already-canonicalized module path.

15 years agoRH515870 Error message about missing module uprobes when updating.
Mark Wielaard [Thu, 6 Aug 2009 15:46:27 +0000 (17:46 +0200)]
RH515870 Error message about missing module uprobes when updating.

Fix 3>&1 typo.

* systemtap.spec: Use 2>&1 to redirect error messages.

15 years agoPR10294: support wider range for statement probe
Wenji Huang [Thu, 6 Aug 2009 02:58:46 +0000 (22:58 -0400)]
PR10294: support wider range for statement probe

* dwflpp.cxx (iterate_over_srcfile_lines): Add pattern parameter.
* dwflpp.h (iterate_over_srcfile_lines): Ditto.
* testsuite/systemtap.base/bz10294.c: Test case.
* testsuite/systemtap.base/bz10294.stp: Ditto.
* testsuite/systemtap.base/bz6905.exp: Deleted.
* testsuite/systemtap.base/statement.exp: Merge bz10294 with bz6905.

15 years agoPR10491 Don't assign to REG_IP if it isn't an lvalue (s390 and ia64).
Mark Wielaard [Thu, 6 Aug 2009 08:41:46 +0000 (10:41 +0200)]
PR10491 Don't assign to REG_IP if it isn't an lvalue (s390 and ia64).

To fixup REG_IP to show the correct value after a [ku]probe trap we
assigned the address of the actual instruction pointer of the probed
instruction. That doesn't work on architectures, s390 and ia64, where
REG_IP is not a simple lvalue. Just don't try to fixup the address in
those cases. If this isn't enough, the uprobe_stmt_num.exp testcase
will point this out.

* runtime/regs.h: Define REG_IP_LVALUE for x86_64, i386, powerpc64 and arm.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Only fixup
  REG_IP when REG_IP_LVALUE is defined.
  (uprobe_derived_probe_group::emit_module_decls): Likewise.
  (kprobe_derived_probe_group::emit_module_decls): Likewise.

15 years agoRemove as_root calls from the printf testsuite
Josh Stone [Thu, 6 Aug 2009 00:56:44 +0000 (17:56 -0700)]
Remove as_root calls from the printf testsuite

Once upon a time, we would use sudo staprun, and so output files from
"-o" were owned by root.  For a while now we've used a setuid staprun
instead, and the output files are created by stapio as the user.  Thus,
we don't need as_root to remove those files anymore.

* testsuite/systemtap.printf/end1b.exp: Clean up without as_root.
* testsuite/systemtap.printf/mixed_outb.exp: Ditto.
* testsuite/systemtap.printf/out1b.exp: Ditto.
* testsuite/systemtap.printf/out2b.exp: Ditto.
* testsuite/systemtap.printf/out3b.exp: Ditto.

15 years agoDon't spawn uprobes tests with sudo
Josh Stone [Wed, 5 Aug 2009 23:55:24 +0000 (16:55 -0700)]
Don't spawn uprobes tests with sudo

Using spawn with sudo doesn't work well, because the password prompt
won't go to the correct TTY.  The only reason that the uprobes tests
needed to do this is so uprobes.ko could be built as root.  Now instead,
I've added a pre-check that will directly call the uprobes make with
sudo (via the as_root proc).

* testsuite/lib/systemtap.exp (uprobes_p): Check and build uprobes.ko.
* testsuite/systemtap.base/uprobes.exp: Use uprobes_p; don't spawn sudo.
* testsuite/systemtap.base/bz6850.exp: Ditto.
* testsuite/systemtap.base/bz10078.exp: Ditto.
* testsuite/systemtap.base/bz6905.exp: sudo isn't needed for -p2.

15 years agoFix compile error when not HAVE_NSS with staprun.
Maran [Wed, 5 Aug 2009 13:36:01 +0000 (15:36 +0200)]
Fix compile error when not HAVE_NSS with staprun.

* runtime/staprun/staprun_funcs.c (check_permissions): Declare
  check_signature_rc outside HAVE_NSS block.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
15 years agoMerge branch 'release'
Josh Stone [Wed, 5 Aug 2009 04:09:18 +0000 (21:09 -0700)]
Merge branch 'release'

15 years agoVersion bumps for the 0.9.9 release release-0.9.9
Josh Stone [Wed, 5 Aug 2009 00:42:09 +0000 (17:42 -0700)]
Version bumps for the 0.9.9 release

15 years agoFix grapher compilation warnings from rpm build
Josh Stone [Wed, 5 Aug 2009 03:29:51 +0000 (20:29 -0700)]
Fix grapher compilation warnings from rpm build

* grapher/Graph.cxx (Graph::Graph): Initialize in declaration order.
* grapher/GraphWidget.cxx (GraphWidget::on_expose_event): Remove several
  unused local variables.

15 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 4 Aug 2009 23:19:31 +0000 (19:19 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

15 years agoAdd NEWS about unprivileged user support
Dave Brolley [Tue, 4 Aug 2009 23:19:09 +0000 (19:19 -0400)]
Add NEWS about unprivileged user support

15 years agoAdd many more NEWS entries for recent features
Josh Stone [Tue, 4 Aug 2009 22:52:08 +0000 (15:52 -0700)]
Add many more NEWS entries for recent features

15 years agoRename and package the grapher
Josh Stone [Tue, 4 Aug 2009 22:11:44 +0000 (15:11 -0700)]
Rename and package the grapher

* grapher/Makefile.am: Rename the binary to stapgraph.
* grapher/Makefile.in: Regen.
* systemtap.spec: Add a -grapher subpackage.

15 years agoAdd NEWS on stapgraph
Tim Moore [Tue, 4 Aug 2009 21:57:10 +0000 (23:57 +0200)]
Add NEWS on stapgraph

15 years agoAdd NEWS on DW_OP_call_frame_CFA, uprobes/ustack, .probes and statement().
Mark Wielaard [Tue, 4 Aug 2009 20:52:43 +0000 (22:52 +0200)]
Add NEWS on DW_OP_call_frame_CFA, uprobes/ustack, .probes and statement().

15 years agoAdd #include and casting to allow compilations of grapher on RHEL5.
William Cohen [Tue, 4 Aug 2009 18:00:07 +0000 (14:00 -0400)]
Add #include and casting to allow compilations of grapher on RHEL5.

15 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Dave Brolley [Tue, 4 Aug 2009 16:35:41 +0000 (12:35 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

Conflicts:

cache.cxx

15 years agoAdd update_visitor::replace
Josh Stone [Mon, 3 Aug 2009 22:49:40 +0000 (15:49 -0700)]
Add update_visitor::replace

I noticed that most uses of update_visitor::require() were simply
writing the value back to the same place, i.e. foo = require(foo).  The
new replace() method just encapsulates that paradigm, so we don't have
the duplication between the LHS and RHS.

* staptree.h (update_visitor::replace): New.
* elaborate.cxx, staptree.cxx, tapset-mark.cxx, tapset-perfmon.cxx,
  tapset-procfs.cxx, tapset-utrace.cxx, tapsets.cxx: Update all require
  calls that are simply updating the value in-place.

15 years agoStrengthen the template types in update_visitor
Josh Stone [Mon, 3 Aug 2009 22:20:19 +0000 (15:20 -0700)]
Strengthen the template types in update_visitor

* staptree.h (update_visitor::require, provide): Make the parameters and
  return values a T*, to make it explicit that we want pointer types.

15 years agoMerge branch 'array_index'
Josh Stone [Mon, 3 Aug 2009 22:16:09 +0000 (15:16 -0700)]
Merge branch 'array_index'

15 years agoPR2049: support arbitrary $target-array indexing
Josh Stone [Mon, 3 Aug 2009 21:45:21 +0000 (14:45 -0700)]
PR2049: support arbitrary $target-array indexing

Rather than just numeric literals, we can now support arbitrary
expressions for the index value.  Note that loc2c won't allow this for
noncontiguous arrays, as the access methods need to be statically
computed, but for contiguous arrays and pointers-as-arrays it works
just fine.

* staptree.h (target_symbol::component): Add expression_array_index.
* staptree.cxx (target_symbol::visit_components): New helper.
  (target_symbol::assert_no_components): Recognize new array type.
  (target_symbol::component::print): Print subexpressions.
  (traversing_visitor::visit_target_symbol, visit_cast_op): Visit the
  indexing components too.
  (varuse_collecting_visitor::visit_target_symbol): Ditto.
  (update_visitor::visit_target_symbol, visit_cast_op): Ditto.
* elaborate.cxx (void_statement_reducer::visit_target_symbol): New.
  (void_statement_reducer::visit_cast_op): Save indexes too.
* parse.cxx (parser::parse_target_symbol_components): Parse expressions.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Pass
  expression-indexes as parameters (indexN) to the dwarf function.
  (dwarf_cast_expanding_visitor::visit_cast_op): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
  (sdt_var_expanding_visitor::visit_target_symbol): Visit the new @cast.
* dwflpp.cxx (dwflpp::translate_components): Use THIS->indexN.
* translate.cxx (c_unparser::visit_target_symbol): Correct error msg.
* testsuite/systemtap.base/pointer_array.stp: Use a simple index.

15 years agoPR10475: ensure that loc2c can find its array size
Josh Stone [Mon, 3 Aug 2009 21:20:46 +0000 (14:20 -0700)]
PR10475: ensure that loc2c can find its array size

* loc2c.c (array_stride): iterate DIEs past typedef/const/volatile

15 years agoMake sure we pick up our own sdt.h, not the (maybe not installed) system one.
Mark Wielaard [Mon, 3 Aug 2009 15:02:03 +0000 (17:02 +0200)]
Make sure we pick up our own sdt.h, not the (maybe not installed) system one.

* Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/includes.
* Makefile.in: Regenerated.

15 years agoUnify no-component assertions on target variables
Josh Stone [Sat, 1 Aug 2009 00:24:13 +0000 (17:24 -0700)]
Unify no-component assertions on target variables

There are several tapsets that can't deal with component dereferences on
their target variables, and they all check-and-throw in the same way.
This refactors the checks into a target_symbol member.

* staptree.cxx (target_symbol::assert_no_components): New.
* tapsets.cxx (tracepoint_var_expanding_visitor::visit_target_symbol_arg,
  tracepoint_var_expanding_visitor::visit_target_symbol_context): Use
  the new assertion function to check for no components.
* tapset-mark.cxx (mark_var_expanding_visitor::visit_target_symbol_arg,
  mark_var_expanding_visitor::visit_target_symbol_context): Ditto.
* tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto.
* tapset-utrace.cxx (utrace_var_expanding_visitor::visit_target_symbol_arg,
  utrace_var_expanding_visitor::visit_target_symbol_context): Ditto.

15 years agoMake a real type for target_symbol->components
Josh Stone [Sat, 1 Aug 2009 00:00:09 +0000 (17:00 -0700)]
Make a real type for target_symbol->components

Now the dereferences on target_symbol and cast_op are tracked with a
struct instead of just a generic pair.  The first immediate benefit is
that we can track the token for more exact error reporting.

* staptree.h (target_symbol): Add a new component type.
* staptree.cxx (target_symbol::component::print): New.
  (operator<<(ostream&, target_symbol::component&): New.
  (target_symbol::print): Adapt component printing.
  (cast_op::print): Ditto.
* parse.cxx (parser::parse_target_symbol_components): Adapt to the new
  component construction.
* dwflpp.cxx (dwflpp::find_struct_member): take the component as a
  parameter for a better token in error messages
  (dwflpp::translate_components): Adapt to the new component type.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't
  overwrite the token in target_symbol saved errors.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.

15 years agoRefactor parser for target_symbol->components
Josh Stone [Fri, 31 Jul 2009 20:46:54 +0000 (13:46 -0700)]
Refactor parser for target_symbol->components

The components were being parsed for both target_symbols and cast_ops,
so this change refactors that code into a single function.

* parse.cxx (parser::parse_target_symbol_components): New.
  (parser::parse_symbol): Use the new function.

15 years agoDrop a couple of unnecessary std:: qualifiers
Josh Stone [Fri, 31 Jul 2009 20:29:18 +0000 (13:29 -0700)]
Drop a couple of unnecessary std:: qualifiers

* staptree.cxx (target_symbol::print): Drop std:: from parameter o.
  (cast_op::print): Ditto.

15 years agoNEWS: note faster pass-2
Frank Ch. Eigler [Fri, 31 Jul 2009 21:51:22 +0000 (17:51 -0400)]
NEWS: note faster pass-2

15 years agoPR10204: Place userspace markers in systemtap itself
Kent Sebastian [Fri, 31 Jul 2009 20:35:20 +0000 (16:35 -0400)]
PR10204: Place userspace markers in systemtap itself

* tapset/stap_staticmarkers.stp: new file (for real this time)

15 years agoMerge branch 'master' of git+ssh://sources.redhat.com/git/systemtap
Kent Sebastian [Fri, 31 Jul 2009 20:34:25 +0000 (16:34 -0400)]
Merge branch 'master' of git+ssh://sources.redhat.com/git/systemtap

15 years agoPR10204: Place userspace markers in systemtap itself
Kent Sebastian [Fri, 31 Jul 2009 18:45:10 +0000 (14:45 -0400)]
PR10204: Place userspace markers in systemtap itself

* cache.cxx (add_to_cache,clean_cache): add static markers
* main.cxx (main): likewise
* runtime/staprun/common.c (send_request): likewise
* runtime/staprun/mainloop.c (stp_main_loop): likewise
* runtime/staprun/staprun.c (remove_module): likewise
* runtime/staprun/staprun.h: include sdt.h
* runtime/staprun/staprun_funcs.c (insert_module): likewise
* util.cxx (stap_system): likewise
* tapset/stap_staticmarkers.stp: new file

15 years agoAdd testcase for PR10458, PR10459 and PR10454.
Mark Wielaard [Fri, 31 Jul 2009 17:54:53 +0000 (19:54 +0200)]
Add testcase for PR10458, PR10459 and PR10454.

Last test currently disabled because PR10454 is still open.

* testsuite/systemtap.context/uprobe_stmt_num.exp: New file.
* testsuite/systemtap.context/uprobe_stmt_num.stp: Likewise.
* testsuite/systemtap.context/uprobe_stmt_num.c: Likewise.

15 years agoPR10458. User actual breakpoint address for [ku]probe[ret].
Mark Wielaard [Fri, 31 Jul 2009 16:46:47 +0000 (18:46 +0200)]
PR10458. User actual breakpoint address for [ku]probe[ret].

Setup the pt_regs REG_IP to the actual breakpoint address before
entering a probe handler for [ku]probe[ret] (and restore it after
returning). This helps getting symbol resolution and backtraces
more correct and makes it more conform with other probe handlers
like the iutrace and profile timers that also provide pt_regs
(which untill now exhibited off-by-one errors while unwinding).

* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
  Setup REG_IP correctly before calling enter_kprobe_probe
  and enter_kretprobe_probe, and restore afterwards.
  (uprobe_derived_probe_group::emit_module_decls): Likewise for
  enter_uprobe_probe and enter_uretprobe_probe.
  (kprobe_derived_probe_group::emit_module_decls): Likewise for
  enter_kprobe2_probe and enter_kretprobe2_probe.
* runtime/unwind/i386.h (arch_unw_init_frame_info): Initialize
  info->call_frame to zero.
* runtime/unwind/x86_64.h (arch_unw_init_frame_info): Likewise.

15 years agoRelax the type-matching in the cmd_parse13 test
Josh Stone [Fri, 31 Jul 2009 02:24:17 +0000 (19:24 -0700)]
Relax the type-matching in the cmd_parse13 test

Dwarf probes are now printing their $target variables in -L, so we need
to handle more than just stap types in the regular expression.

15 years agodtrace.in: Don't interpret -h -o FILE, just use the filename as is.
Stan Cox [Thu, 30 Jul 2009 21:04:09 +0000 (17:04 -0400)]
dtrace.in: Don't interpret -h -o FILE, just use the filename as is.

15 years agoPR10459. Disable all warning messages on -w.
Mark Wielaard [Wed, 29 Jul 2009 22:06:59 +0000 (00:06 +0200)]
PR10459. Disable all warning messages on -w.

* stap.1.in: Document that -w disables all warning messages.
* dwflpp.cxx (get_module_dwarf): Only output warning when session
  suppress_warnings is not set.
* translate.cxx (dump_unwindsyms): Likewise.
  (emit_symbol_data_done): Likewise.
* tapsets.cxx (query_module_symtab): Likewise.
  (read_from_elf_file): Take systemtap_session, check suppress_warnings
  before emitting warning.
  (read_from_text_file): Likewise.
  (get_symtab): Call read_from_elf_file and read_from_text_file with session.

15 years agoRemove unused result_string from ustack.tcl.
Mark Wielaard [Wed, 29 Jul 2009 21:26:26 +0000 (23:26 +0200)]
Remove unused result_string from ustack.tcl.

* testsuite/systemtap.exelib/ustack.tcl: Remove result_string.

15 years agoEnable variable listing (-L) for uprobes
Josh Stone [Wed, 29 Jul 2009 21:34:32 +0000 (14:34 -0700)]
Enable variable listing (-L) for uprobes

All $target variables and their C-types are now printed in -L mode.

* tapsets.cxx (uprobe_derived_probe::uprobe_derived_probe): Save the local
  arguments while we still have the dwflpp open.
  (uprobe_derived_probe::saveargs): New
  (uprobe_derived_probe::printargs): New

15 years agoEnable variable listing (-L) for dwarf probes
Josh Stone [Wed, 29 Jul 2009 21:07:37 +0000 (14:07 -0700)]
Enable variable listing (-L) for dwarf probes

All $target variables and their C-types are now printed in -L mode.

* tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Save the local
  arguments while we still have the dwflpp open.
  (dwarf_derived_probe::saveargs): New
  (dwarf_derived_probe::printargs): New

15 years agoUse a real session flag for -L
Josh Stone [Wed, 29 Jul 2009 19:35:29 +0000 (12:35 -0700)]
Use a real session flag for -L

Rather than relying on 'unoptimized' to tell us that the listing mode
should print the variables too, this adds an explicit listing_mode_vars.

* session.h (systemtap_session): Add listing_mode_vars
* main.cxx (main): Set s.listing_mode_vars appropriately.
  (printscript): Use the new flag for deciding whether to print locals

15 years agoBreak up dwarf_var_expanding_visitor::visit_target_symbol
Josh Stone [Wed, 29 Jul 2009 19:13:40 +0000 (12:13 -0700)]
Break up dwarf_var_expanding_visitor::visit_target_symbol

This just refactors large chunks of visit_target_symbol into a couple of
smaller functions.

* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_context): New
  (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): New
  (dwarf_var_expanding_visitor::visit_target_symbol): Call the new ones

15 years agoPR6978: support $$parms for process.syscall
Wenji Huang [Tue, 28 Jul 2009 23:50:24 +0000 (19:50 -0400)]
PR6978: support $$parms for process.syscall

* tapset-utrace.cxx (visit_target_symbol_arg): Handle $$parms.
* testsuite/systemtap.base/utrace_p4.exp: Add test case.
* testsuite/systemtap.base/utrace_p5.exp: Ditto.

15 years agoPR10453: Fix crash.exp not to refer removed file
Masami Hiramatsu [Tue, 28 Jul 2009 21:26:55 +0000 (17:26 -0400)]
PR10453: Fix crash.exp not to refer removed file

* systemtap.base/crash.exp: Use command-line script instead of removed
  script file.

15 years agoImproves functionality on rawhide (2.6.31-rcX) kernels.
David Smith [Tue, 28 Jul 2009 19:40:41 +0000 (14:40 -0500)]
Improves functionality on rawhide (2.6.31-rcX) kernels.
* runtime/transport/ring_buffer.c (struct _stp_iterator): Renamed from
  _stp_ring_buffer_data.
  (_stp_data_open_trace): Uses _stp_iterator.
  (_stp_data_release_trace): Ditto.
  (_stp_ring_buffer_empty_cpu): Ditto.
  (_stp_ring_buffer_empty): Ditto.
  (_stp_ring_buffer_consume): Ditto.
  (_stp_tracing_wait_pipe): Ditto.
  (_stp_peek_next_event): Ditto.
  (_stp_find_next_event): Ditto.
  (_stp_data_read_trace): Ditto.
  (_stp_data_write_reserve): Ditto.

15 years agoInstall yum-utils when yumdownloader is missing first in stapprep.sh.
Mark Wielaard [Tue, 28 Jul 2009 09:57:27 +0000 (11:57 +0200)]
Install yum-utils when yumdownloader is missing first in stapprep.sh.

* doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh: Check whether
  yumdownloader is already available and install yum-utils if not.

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