]> sourceware.org Git - systemtap.git/log
systemtap.git
15 years agoKeep track of relocation section sizes.
Mark Wielaard [Tue, 14 Apr 2009 17:30:56 +0000 (19:30 +0200)]
Keep track of relocation section sizes.

* runtime/sym.h (_stp_section): Add size field.
* translate.cxx (dump_unwindsyms): Get start of module address space,
  turn seclist into vector of secname, size pairs, track relocation section
  size, or add module address range if no sections, output size in
 _stp_section list.

15 years agoMake stmt_rel.exp have good compatibility
Wenji Huang [Fri, 10 Apr 2009 03:48:39 +0000 (23:48 -0400)]
Make stmt_rel.exp have good compatibility

15 years agoCleanup symbol table sanity checking.
Mark Wielaard [Thu, 9 Apr 2009 21:18:46 +0000 (23:18 +0200)]
Cleanup symbol table sanity checking.

* translate.cxx (dump_unwindsyms): Get and check against module end, only
  check STT_FUNC && SHN_ABS for kernel, check shndxp for non-allocated
  section.

15 years agoUses <asm/syscall.h> when available.
David Smith [Thu, 9 Apr 2009 17:06:05 +0000 (12:06 -0500)]
Uses <asm/syscall.h> when available.
2009-04-09  David Smith  <dsmith@redhat.com>

        * buildrun.cxx (compile_pass): Compile autoconf test for
        <asm/syscall.h>.
        * runtime/autoconf-asm-syscall.c: New "autoconf" test the presence
        of <asm/syscall.h>.
        * runtime/syscall.h: If <asm/syscall.h> exists, use it.
        Otherwise, use our private copy of the functions for each
        architecture.
        (syscall_get_nr): Renamed from __stp_user_syscall_nr().
        (syscall_get_return_value): Renamed from
        __stp_user_syscall_return_value().
        (syscall_get_arguments): Renamed from __stp_user_syscall_arg().
        * runtime/task_finder.c
        (__stp_utrace_task_finder_target_syscall_exit): Uses new syscall.h
        functions.
        * tapset/utrace.stp: Ditto.

15 years agoMake simple probes work even without KPROBES in the kernel.
Mark Wielaard [Thu, 9 Apr 2009 16:20:32 +0000 (18:20 +0200)]
Make simple probes work even without KPROBES in the kernel.

Without KPROBES very little works atm. But stack.c file is unconditionally
imported, while these two functions are only used through context-unwind.stp.
This at least lets us do simple sanity checks on "plain" kernels.

* runtime/stack.c (_stp_stack_print, _stp_stack_snprint):
  Wrap in #if defined (CONFIG_KPROBES).

15 years agoAdd tests for probefunc(), usymname(), uaddr() versus shared libraries.
Mark Wielaard [Thu, 9 Apr 2009 12:26:07 +0000 (14:26 +0200)]
Add tests for probefunc(), usymname(), uaddr() versus shared libraries.

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

15 years agoMake new stap_task_finder_targets chain on correct list.
Mark Wielaard [Thu, 9 Apr 2009 12:22:03 +0000 (14:22 +0200)]
Make new stap_task_finder_targets chain on correct list.

* runtime/task_finder.c (stap_register_task_finder_target): Also check both
  pathlen are zero.

15 years agoMake sure code using the vma tracker compiles again.
Mark Wielaard [Wed, 8 Apr 2009 21:35:21 +0000 (23:35 +0200)]
Make sure code using the vma tracker compiles again.

* runtime/runtime.h: Include task_finder.c.
* runtime/sym.c: Always define task_finder callbacks for usage in tapsets.
* runtime/task_finder.c: Define dummy stap_task_finder_target when
  ! defined(CONFIG_UTRACE).
* tapsets.cxx: Never include task_finder.c directly.

15 years agoFix DEBUG_TASK_FINDER_VMA compilation.
Mark Wielaard [Wed, 8 Apr 2009 17:27:42 +0000 (19:27 +0200)]
Fix DEBUG_TASK_FINDER_VMA compilation.

* runtime/sym.c (_stp_tf_mmap_cb): We get passed vm_flags, not flags.

15 years agoAdd main executable symbol uprobe to uprobes_lib.exp test.
Mark Wielaard [Wed, 8 Apr 2009 16:11:34 +0000 (18:11 +0200)]
Add main executable symbol uprobe to uprobes_lib.exp test.

There was nothing wrong with the probe itself, but because the body
was empty the compiler optimised away the actual call...

* testsuite/systemtap.base/uprobes_lib.exp: Activate main exe probe, expect
  more output.
* testsuite/systemtap.base/uprobes_lib.stp: Also probe main and main_lib.
* testsuite/systemtap.base/uprobes_exe.c: Put some code in main_func.
* testsuite/systemtap.base/uprobes_lib.c: Likewise for lib_func.

15 years agoConsider function when handling .label
Stan Cox [Wed, 8 Apr 2009 21:19:04 +0000 (17:19 -0400)]
Consider function when handling .label

* tapsets.cxx(dwflpp::iterate_over_cu_labels): New parameter function.
Do wildcard match for function.
* testsuite/systemtap.base/labels.exp: Test .label function handling.

15 years agoBetter error handling in 'setup_server'.
David Smith [Wed, 8 Apr 2009 20:31:49 +0000 (15:31 -0500)]
Better error handling in 'setup_server'.
2009-04-08  David Smith  <dsmith@redhat.com>

        * lib/systemtap.exp (setup_server): Better error handling.

15 years agoAdded '#ifdef STP_NEED_VMA_TRACKER' around code that needs it.
David Smith [Wed, 8 Apr 2009 18:14:24 +0000 (13:14 -0500)]
Added '#ifdef STP_NEED_VMA_TRACKER' around code that needs it.
2009-04-08  David Smith  <dsmith@redhat.com>

        * runtime/sym.c: Added '#ifdef STP_NEED_VMA_TRACKER' around code
        that needs it.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
David Smith [Wed, 8 Apr 2009 17:42:39 +0000 (12:42 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoOnly includes task_finder.c when needed.
David Smith [Wed, 8 Apr 2009 17:41:55 +0000 (12:41 -0500)]
Only includes task_finder.c when needed.
2009-04-08  David Smith  <dsmith@redhat.com>

        * tapsets.cxx (itrace_derived_probe_group::emit_module_decls):
        Added inclusion of task_finder.c back.  Unconditionally including
        it when not needed causes all systemtap scripts to fail on kernels
        with no utrace support.
        (utrace_derived_probe_group::emit_module_decls): Ditto.
        (uprobe_derived_probe_group::emit_module_decls): Ditto.
        * runtime/runtime.h: Removed unconditional inclusion of
        task_finder.c.

15 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Stan Cox [Wed, 8 Apr 2009 16:40:27 +0000 (12:40 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

15 years agoDo not do a partial name comparison for .label.
Stan Cox [Wed, 8 Apr 2009 16:36:37 +0000 (12:36 -0400)]
Do not do a partial name comparison for .label.

* tapsets.cxx (dwflpp::iterate_over_cu_labels): Compare with strcmp not strncmp.

15 years agotweak nettop.stp demo to sort by accumulated counts despite merging
Frank Ch. Eigler [Wed, 8 Apr 2009 16:29:29 +0000 (12:29 -0400)]
tweak nettop.stp demo to sort by accumulated counts despite merging

15 years agoFix stats for processes that only transmitted data without receiving
Eugeniy Meshcheryakov [Wed, 8 Apr 2009 14:57:39 +0000 (16:57 +0200)]
Fix stats for processes that only transmitted data without receiving

15 years agoOmit symbols that have suspicious addresses (before base) from symbol table.
Mark Wielaard [Wed, 8 Apr 2009 10:35:01 +0000 (12:35 +0200)]
Omit symbols that have suspicious addresses (before base) from symbol table.

* translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values.

15 years agoUse _stp_snprintf in _stp_symbol_snprint.
Mark Wielaard [Wed, 8 Apr 2009 09:11:34 +0000 (11:11 +0200)]
Use _stp_snprintf in _stp_symbol_snprint.

* runtime/sym.c (_stp_symbol_snprint): Use _stp_snprintf, no _stp_printf.

15 years agoAdd uaddr() context tapset function.
Mark Wielaard [Wed, 8 Apr 2009 08:59:27 +0000 (10:59 +0200)]
Add uaddr() context tapset function.

* tapset/context.stp (uaddr): New sfunction.
* testsuite/buildok/uaddr.stp: New test.

15 years agoFix so publicanized Tapset Reference manual can be generated again.
William Cohen [Tue, 7 Apr 2009 18:46:28 +0000 (14:46 -0400)]
Fix so publicanized Tapset Reference manual can be generated again.

15 years agoAdd valid interval in error message when timer probe out of range.
Mark Wielaard [Tue, 7 Apr 2009 12:59:59 +0000 (14:59 +0200)]
Add valid interval in error message when timer probe out of range.

* tapsets.cxx (hrtimer_derived_probe): Take scale argument, add
  interval/scale to semantic_error message.
  (timer_builder): Set and pass scale.

15 years agoTrack VMA per pid (group_leader/tgid).
Mark Wielaard [Tue, 7 Apr 2009 12:17:09 +0000 (14:17 +0200)]
Track VMA per pid (group_leader/tgid).

* runtime/sym.c (_stp_tf_vm_cb): Add and remove tsk->group_leader.
  (_stp_mod_sec_lookup): find vma for task->group_leader.

15 years agoCreate usymname and usymdata variant that trigger STP_NEED_VMA_TRACKER.
Mark Wielaard [Tue, 7 Apr 2009 10:25:53 +0000 (12:25 +0200)]
Create usymname and usymdata variant that trigger STP_NEED_VMA_TRACKER.

* tapset/context-symbols.stp (syname, symdata): Pass NULL for kernel address.
* tapset/ucontext-symbols.stp: New file defining usymname and usymdata.
* testsuite/systemtap.context/usymbols.exp: Use usymname, remove
  STP_NEED_VMA_TRACKER hack.
* testsuite/buildok/usymdata.stp: New test.
* testsuite/buildok/usymname.stp: Likewise.

15 years agoPR 9940. Rearchitected task_finder.c a bit.
David Smith [Tue, 7 Apr 2009 13:23:14 +0000 (08:23 -0500)]
PR 9940.  Rearchitected task_finder.c a bit.
2009-04-07  David Smith  <dsmith@redhat.com>

PR 9940.
* tapsets.cxx (emit_vma_callback_probe_decl): Initialized new
callbacks.
(utrace_derived_probe_group::emit_probe_decl): Ditto.
(uprobe_derived_probe_group::emit_module_decls): Uses new
callback.  Makes sure mapping is executable before trying to set a
probe in it.
(itrace_derived_probe_group::emit_module_init): Calls
_stp_sym_init().
(utrace_derived_probe_group::emit_module_init): Ditto.
(uprobe_derived_probe_group::emit_module_init): Ditto.
* runtime/sym.c: Moved task_finder_vma.c inclusion here from
task_finder.c.
(_stp_sym_init): New function.
(_stp_tf_mmap_cb): New function that replaces _stp_tf_vm_cb.
(_stp_tf_munmap_cb): Ditto.
* runtime/task_finder.c: Removed task_finder_vma.c inclusion.
Split vm_callback into 3 callbacks: mmap_callback,
munmap_callback, and mprotect_callback.
(stap_register_task_finder_target): Initializes new events
variables for the new callbacks.
(__STP_TASK_VM_BASE_EVENTS): No longer specifies syscall entry
events.
(__stp_call_mmap_callbacks): New function.
(__stp_call_mmap_callbacks_with_vma): Ditto.
(__stp_call_munmap_callbacks): Ditto.
(__stp_call_mprotect_callbacks): Ditto.
(__stp_call_vm_callbacks): Removed.
(__stp_utrace_task_finder_target_quiesce): Calls
__stp_call_mmap_callbacks() instead of __stp_call_vm_callbacks().
(__stp_utrace_task_finder_target_syscall_entry): Removed
function.
(__stp_utrace_task_finder_target_syscall_exit): Reports raw
mmap()/mprotect()/munmap() events.

15 years agoPR10026: Read marker/tracepoint args directly
Josh Stone [Mon, 6 Apr 2009 23:11:30 +0000 (16:11 -0700)]
PR10026: Read marker/tracepoint args directly

We already stash the context variables for markers and tracepoints into
the locals for the probe body, but then we were using separate functions
to read those locals for each particular probe body.

This patch instead teaches the unparser how to emit the local name
directly for those context variables.  The resulting code from the
translator is much simpler now.

15 years agoPR10037: add target_symbol token to $context error messages
Frank Ch. Eigler [Mon, 6 Apr 2009 23:40:13 +0000 (19:40 -0400)]
PR10037: add target_symbol token to $context error messages

* tapsets.cxx (many foo-translate-bar): Add const target_symbol*
  parameter, for ->tok use when constructing semantic_errors.

15 years agoRun autoreconf
Eugeniy Meshcheryakov [Mon, 6 Apr 2009 15:43:44 +0000 (17:43 +0200)]
Run autoreconf

15 years agoMake install-scripts depend on install-binSCRIPTS
Eugeniy Meshcheryakov [Mon, 6 Apr 2009 15:42:18 +0000 (17:42 +0200)]
Make install-scripts depend on install-binSCRIPTS

This is needed for running make with -j. Fixes Debian bug #522800.

15 years agoAmend process/errsnoop.stp shebang
Eugene Teo [Sun, 5 Apr 2009 03:52:44 +0000 (11:52 +0800)]
Amend process/errsnoop.stp shebang

15 years agoRemove extra commas in SEE ALSO sections
Eugeniy Meshcheryakov [Sat, 4 Apr 2009 19:58:06 +0000 (21:58 +0200)]
Remove extra commas in SEE ALSO sections

15 years agoMake examples executable
Eugeniy Meshcheryakov [Sat, 4 Apr 2009 19:36:52 +0000 (21:36 +0200)]
Make examples executable

15 years agoPR5163: Assign need_uprobes during pass-2
Josh Stone [Fri, 3 Apr 2009 21:50:18 +0000 (14:50 -0700)]
PR5163: Assign need_uprobes during pass-2

We were doing this in pass-3, which means it was never set for cached
runs, and so staprun didn't get the -u flag.  Now need_probes is set as
soon as a uprobe_derived_probe is saved into the session in pass-2.

15 years agoPR10032: Trigger cleanup after relay thread errors
Josh Stone [Fri, 3 Apr 2009 20:32:22 +0000 (13:32 -0700)]
PR10032: Trigger cleanup after relay thread errors

When the relay threads encounter an error, they now send SIGTERM to the
rest of the process before the thread exit, so we get a clean shutdown.
For EPIPE in particular, error messages are also suppressed.

15 years agoCorrect column heading from uid to pid.
William Cohen [Fri, 3 Apr 2009 18:41:14 +0000 (14:41 -0400)]
Correct column heading from uid to pid.

15 years agoDescribe the ansi_colors.stp and ansi_colors2.stp. Label tables appropriately.
William Cohen [Fri, 3 Apr 2009 18:38:19 +0000 (14:38 -0400)]
Describe the ansi_colors.stp and ansi_colors2.stp. Label tables appropriately.

15 years agonew process/errsnoop.stp sample script
Eugene Teo [Fri, 3 Apr 2009 17:47:57 +0000 (13:47 -0400)]
new process/errsnoop.stp sample script

15 years agoMake ansi_colors2.stp script executable
Eugene Teo [Fri, 3 Apr 2009 15:56:19 +0000 (23:56 +0800)]
Make ansi_colors2.stp script executable

15 years agoUpdate scripts to use the new ANSI tapset
Eugene Teo [Fri, 3 Apr 2009 15:54:23 +0000 (23:54 +0800)]
Update scripts to use the new ANSI tapset

This updates the example scripts to use the new ANSI escape sequences
tapset. It also adds the copyright header that was missing in
ansi_colors.stp for a long time.

15 years agoNew ANSI escape sequences tapset
Eugene Teo [Fri, 3 Apr 2009 15:46:43 +0000 (23:46 +0800)]
New ANSI escape sequences tapset

This adds a new tapset for ANSI escape sequences. It is based on an
existing tapset that was written by Masami Hiramatsu for the stapgames
project. This also adds a version of ansi_color.stp script that displays
other attributes other than the bold effect.

15 years agomake skip-badvars warning message sensitive to -w suppression
Frank Ch. Eigler [Fri, 3 Apr 2009 15:35:35 +0000 (11:35 -0400)]
make skip-badvars warning message sensitive to -w suppression

15 years agoImprovements to errno tapset
Eugene Teo [Fri, 3 Apr 2009 15:18:14 +0000 (23:18 +0800)]
Improvements to errno tapset

This adds an errno_p() function that will return an absolute errno if it
is valid, or zero if it is not. It also simplifies the if statement in
the errno_str() function.

15 years agoAdd a .gitignore for uprobes
Josh Stone [Fri, 3 Apr 2009 05:41:18 +0000 (22:41 -0700)]
Add a .gitignore for uprobes

15 years agoReally fix run-stap this time, I promise!
Josh Stone [Fri, 3 Apr 2009 01:59:03 +0000 (18:59 -0700)]
Really fix run-stap this time, I promise!

15 years agoFix strftime format bug
Masami Hiramatsu [Thu, 2 Apr 2009 22:44:34 +0000 (18:44 -0400)]
Fix strftime format bug

This fixes bugs in strftime-subset function. This modifies %C, %l and %j to
fit the output of date command.

15 years agoFix a bug in file size limitation code.
Masami Hiramatsu [Thu, 2 Apr 2009 22:44:34 +0000 (18:44 -0400)]
Fix a bug in file size limitation code.

This fixes a bug in stapio, which checks written data size and switches
new file when it exceeds a limit. The problem is that written-data-size
counter ignores the first written-data size when switching files. So,
actual file size always exceeds the limit. This changes stapio to
initialize written-data-size counter with the size of the data which
will be written in new file.

15 years agoReorder includes so regs.c and regs-ia64.c included before task_finder.c.
William Cohen [Thu, 2 Apr 2009 21:41:20 +0000 (17:41 -0400)]
Reorder includes so regs.c and regs-ia64.c included before task_finder.c.

15 years agoRevert "runtime/syscall.h: Forward declare __ia64_fetch_register."
William Cohen [Thu, 2 Apr 2009 21:40:58 +0000 (17:40 -0400)]
Revert "runtime/syscall.h: Forward declare __ia64_fetch_register."

This reverts commit 49be62cc7130e60947bbae90b6bf177e173c8b29.

15 years agoruntime/syscall.h: Forward declare __ia64_fetch_register.
Mark Wielaard [Thu, 2 Apr 2009 21:19:27 +0000 (23:19 +0200)]
runtime/syscall.h: Forward declare __ia64_fetch_register.

15 years agoDisable ccache during kernel module builds
Josh Stone [Thu, 2 Apr 2009 19:16:12 +0000 (12:16 -0700)]
Disable ccache during kernel module builds

Our module builds always have a 0% ccache hit rate, because the compiler
commands always include the randomized tmpdir.  Thus, I'm setting
CCACHE_DISABLE=1 so ccache never saves these one-use objects.

(Besides, we already have our own caching in place for this stuff...)

15 years agoRewrite stmt_rel.exp to only rely on -l output.
Stan Cox [Thu, 2 Apr 2009 19:15:22 +0000 (15:15 -0400)]
Rewrite stmt_rel.exp to only rely on -l output.

* testsuite/systemtap.base/stmt_rel.exp: Rewrite.

15 years agoPR6580: Implement symname, symdata and modname context functions.
Mark Wielaard [Thu, 2 Apr 2009 16:42:38 +0000 (18:42 +0200)]
PR6580: Implement symname, symdata and modname context functions.

This adds a couple of the suggested context/stack revamp functions
from PR6580. In particular it replaces the symbolname() function that
sneaked in with the pr6866 branch merge with the suggested symname().

* runtime/sym.c (_stp_mod_sec_lookup): Make section optional.
  (_stp_symbol_snprint): Provide a way to get optional module info.
* tapset/context-symbols.stp: Replace symbolname() with symname(),
  add modname() and symdata().
  (probemod): Implement pc based fallback.
* tapset/context-unwind.stp (caller): Adjust for _stp_symbol_snprint
  change.
* testsuite/systemtap.context/usymbols.exp: Use new symname.
* testsuite/buildok/modname.stp: New test.
* testsuite/buildok/symdata.stp: Likewise.
* testsuite/buildok/symname.stp: Likewise.

15 years agoitrace.exp: s/utrace_support_found/utrace_p/
Mark Wielaard [Thu, 2 Apr 2009 14:26:50 +0000 (16:26 +0200)]
itrace.exp: s/utrace_support_found/utrace_p/

15 years agoPR9995: Test for [installtest_p] && [utrace_p].
Mark Wielaard [Thu, 2 Apr 2009 12:48:37 +0000 (14:48 +0200)]
PR9995: Test for [installtest_p] && [utrace_p].

15 years agoCheck for utrace in usymbols.exp.
Mark Wielaard [Thu, 2 Apr 2009 12:42:02 +0000 (14:42 +0200)]
Check for utrace in usymbols.exp.

15 years agoMake task_finder.c compiler if ! defined (CONFIG_UTRACE).
Mark Wielaard [Thu, 2 Apr 2009 11:49:12 +0000 (13:49 +0200)]
Make task_finder.c compiler if ! defined (CONFIG_UTRACE).

* runtime/task-finder.c: If ! defined (CONFIG_UTRACE) define dummy noop
  API for sym.c consisting of struct stap_task_finder_target,
  stap_add_vma_map_info, stap_remove_vma_map_info and
  stap_find_vma_map_info.

15 years agoPR10019: --skip-badvars to suppress run-time memory errors too
Frank Ch. Eigler [Thu, 2 Apr 2009 02:50:47 +0000 (22:50 -0400)]
PR10019: --skip-badvars to suppress run-time memory errors too

* NEWS: Note this change.
* hash.cxx (find_script_hash): Add s.skip_badvars into hash.
* translate.cxx (translate_pass): Emit STP_SKIP_BADVARS.
* runtime/loc2c-runtime.h (DEREF_FAULT, STORE_DEREF_FAULT): Provide
  dummy implementation if STP_SKIP_BADVARS.

15 years agoFix the magic run-stap wrappers even more
Josh Stone [Thu, 2 Apr 2009 02:41:55 +0000 (19:41 -0700)]
Fix the magic run-stap wrappers even more

15 years agoPR4105: removing redundant buildok/twentysix.stp test
Frank Ch. Eigler [Thu, 2 Apr 2009 02:16:28 +0000 (22:16 -0400)]
PR4105: removing redundant buildok/twentysix.stp test

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Roland McGrath [Thu, 2 Apr 2009 01:12:10 +0000 (18:12 -0700)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoFix sudo magic wrappers for run-stap devel script.
Roland McGrath [Thu, 2 Apr 2009 01:11:48 +0000 (18:11 -0700)]
Fix sudo magic wrappers for run-stap devel script.

15 years agointroduce [utrace_p] as dejagnu check for utrace presence in kernel
Frank Ch. Eigler [Thu, 2 Apr 2009 00:33:51 +0000 (20:33 -0400)]
introduce [utrace_p] as dejagnu check for utrace presence in kernel

* testsuite/lib/systemtap.exp: Define here.
* testsuite/systemtap.*/*.exp: Use it here.  Eliminate duplicated
  utrace_support_present logic.

15 years agoMove testcase itrace3's warning into expect
Josh Stone [Thu, 2 Apr 2009 00:01:53 +0000 (17:01 -0700)]
Move testcase itrace3's warning into expect

As it was, the ATTENTION was causing expect mismatches even when the
test worked fine.  The warning is served just as well from the expect
script before starting the test.

15 years agoAdd insn.block testcase to itrace.exp in testsuite
Maynard Johnson [Wed, 1 Apr 2009 16:22:53 +0000 (11:22 -0500)]
Add insn.block testcase to itrace.exp in testsuite

Earlier today, I posted a runtime patch for the insn.block probe point.
Once that patch is committed, the insn.block probe can be safely tested
on any architecture.  The attached patch adds such a testcase to the
testsuite.

Regards,
-Maynard

15 years agoFix for insn probe: Call arch_has_*_step() prior to calling utrace_control
Maynard Johnson [Wed, 1 Apr 2009 20:26:25 +0000 (15:26 -0500)]
Fix for insn probe: Call arch_has_*_step() prior to calling utrace_control

The attached patch is version 2 for the problem I reported earlier
today.

Frank, is this more what you had in mind?  With this patch, there's no
need for the user to look at the system log.  Error messages are sent to
stderr:

ERROR: insn probe init: arch does not support block step mode
ERROR: probe process("/test").function("doit1@/test.c:22").return registration error (rc -1)

-Maynard

15 years agoRevert "Fix runtime/itrace.c to call arch_has_*_step() prior to calling utrace_control"
Josh Stone [Wed, 1 Apr 2009 23:39:12 +0000 (16:39 -0700)]
Revert "Fix runtime/itrace.c to call arch_has_*_step() prior to calling utrace_control"

This reverts commit 489afa702639fd10e9756795bd516d939766247d.

15 years agoFix runtime/itrace.c to call arch_has_*_step() prior to calling utrace_control
Maynard Johnson [Wed, 1 Apr 2009 14:51:57 +0000 (09:51 -0500)]
Fix runtime/itrace.c to call arch_has_*_step() prior to calling utrace_control

As Roland pointed out in his Mar 31 reply to a posting of mine (subject:
Re: Testing insn.block probe point uncovers possible utrace bug),
utrace_control() documents that the caller must ensure that
arch_has_single_step and arch_has_block_step are defined before trying
to use those step modes.  The attached patch addresses that issue.  I've
tested this patch on x86_64 arch, and a block step test runs
successfully, since block step is supported on that arch.  Testing on
ppc64 arch, the test fails as expected (since block step is not
supported on ppc64 yet) with:
"ERROR: callback for <pid> failed: 1"
which is sent to stdderr and
"usr_itrace_init: arch does not support block step mode"
which is sent to the system log.

This isn't the most user-friendly way of surfacing an error.  Perhaps
the stap runtime could have a set of defined return codes that would be
mapped to strings so the user can get an idea of what the error is
without looking in the system log.  But that's a side issue, of course.

Regards,
-Maynard

15 years agoPR10016: Purge stap of all pgrp and system() usage
Josh Stone [Wed, 1 Apr 2009 21:49:12 +0000 (14:49 -0700)]
PR10016: Purge stap of all pgrp and system() usage

We hereby no longer try to manipulate process groups in any way.  We
don't set a private process group, and we never kill() our entire group
either.  Instead of using system(), we now have a stap_system() which
saves the child PID, so when we get a terminating signal we can pass it
along to the child.

Signals sent through the TTY have always worked, since the TTY sends it
to the entire pgrp.  However, if we're running as part of a wrapper
script or GUI, which may not have a separate process group for stap, we
still would like to allow "kill -TERM $STAPPID" to terminate stap
nicely.

There's still a short window of failure in the time that staprun is
active, because we can't kill a setuid process from a user process.
Once staprun drops privileges and execs to stapio though, everything
should work fine.

15 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Mark Wielaard [Wed, 1 Apr 2009 21:42:53 +0000 (23:42 +0200)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

15 years agoMove #endif for STP_NEED_VMA_TRACKER up to not cover other utrace callbacks.
Mark Wielaard [Wed, 1 Apr 2009 21:30:18 +0000 (23:30 +0200)]
Move #endif for STP_NEED_VMA_TRACKER up to not cover other utrace callbacks.

* tapsets.cxx (utrace_derived_probe_group::emit_module_init): Correct #endif.

15 years agoPR10020 sys_sigaltstack param change
Frank Ch. Eigler [Wed, 1 Apr 2009 21:20:05 +0000 (17:20 -0400)]
PR10020 sys_sigaltstack param change

The new code uses a %( kernel_v < "2.6.29" %) conditional to look at
the passed pt_regs instead of named *bx parameters.  A more general
solution will be needed at some point.

15 years agoMerge branch 'master' into pr6866
Mark Wielaard [Wed, 1 Apr 2009 21:04:29 +0000 (23:04 +0200)]
Merge branch 'master' into pr6866

15 years agoWrap vma callbacks in STP_NEED_VMA_TRACKER.
Mark Wielaard [Wed, 1 Apr 2009 20:40:04 +0000 (22:40 +0200)]
Wrap vma callbacks in STP_NEED_VMA_TRACKER.

Will be defined by new ucontext symbol stapset.

* tapset.cxx: Wrap all vma callbacks in STP_NEED_VMA_TRACKER.
* testsuite/systemtap.context/usymbols.exp: Define STP_NEED_VMA_TRACKER
  explicitly for now.

15 years agoUse alloca trick to keep argN active on GCC 4.1.
Stan Cox [Wed, 1 Apr 2009 19:48:24 +0000 (15:48 -0400)]
Use alloca trick to keep argN active on GCC 4.1.

* includes/sys/sdt.h (STAP_UNINLINE): New.
(STAP_UNINLINE_LABEL): New.
static_uprobes.exp: Match using charset instead of .*

15 years agotestsuite/systemtap.context/*.tcl: Don't wait 4 whole minutes for timeout.
Mark Wielaard [Wed, 1 Apr 2009 10:31:50 +0000 (12:31 +0200)]
testsuite/systemtap.context/*.tcl: Don't wait 4 whole minutes for timeout.

15 years agocontext.exp: log which subtest is being sourced.
Mark Wielaard [Wed, 1 Apr 2009 10:25:14 +0000 (12:25 +0200)]
context.exp: log which subtest is being sourced.

15 years agoPR4105: support up to 9 (up from 5) array index dimensions
Frank Ch. Eigler [Wed, 1 Apr 2009 15:30:50 +0000 (11:30 -0400)]
PR4105: support up to 9 (up from 5) array index dimensions

* runtime/map-gen.c, pmap-gen.c: Hand-expand arity 6..9 cases throughout.
* testsuite/buildok/thirty.stp: New test.
* testsuite/buildko/two.stp: New test.

An Alan Smithee patch.

15 years agosemok/badvar.stp test: add stap -p2 as for other semok tests
Frank Ch. Eigler [Wed, 1 Apr 2009 15:26:01 +0000 (11:26 -0400)]
semok/badvar.stp test: add stap -p2 as for other semok tests

15 years agoCustomize .mark -l output.
Stan Cox [Tue, 31 Mar 2009 15:54:26 +0000 (11:54 -0400)]
Customize .mark -l output.

* tapsets.cxx (dwarf_builder::build): Add .mark name wildcard check.
Customize -l handling.
* testsuite/systemtap.base/static_uprobes.exp: Test .mark name wildcard.

15 years agoAdd fake Systemtap Hackers author to tapset reference manual template.
Mark Wielaard [Tue, 31 Mar 2009 15:26:01 +0000 (17:26 +0200)]
Add fake Systemtap Hackers author to tapset reference manual template.

* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add authorblock.

15 years agoAdd missing socket function argument descriptions.
Mark Wielaard [Tue, 31 Mar 2009 14:34:41 +0000 (16:34 +0200)]
Add missing socket function argument descriptions.

* tapsets/socket.stp: Add descriptions for proto, family and state.

15 years agoPR10016: Run stap in its own process group with waiter process for signals.
Mark Wielaard [Tue, 31 Mar 2009 10:15:09 +0000 (12:15 +0200)]
PR10016: Run stap in its own process group with waiter process for signals.

* main.cxx (runner): New main function.
  (waiter_handler): Signal handler for waiter process.
  (waiter): Waiter process waitpid function.
  (main): Fork and run wait and runner in their own processes.

15 years agoPR9998: new config and test files
Wenji Huang [Mon, 30 Mar 2009 21:29:20 +0000 (17:29 -0400)]
PR9998: new config and test files

* runtime/autoconf-x86-gs.c : New file.
* testsuite/systemtap.base/x86_gs.exp : New test case.
* testsuite/systemtap.base/x86_gs.stp : Ditto.

15 years agoPR9998: adapt tapset/i686/registers.stp to latest kernel
Wenji Huang [Mon, 30 Mar 2009 21:23:42 +0000 (17:23 -0400)]
PR9998: adapt tapset/i686/registers.stp to latest kernel

* buildrun.cxx (compile_pass): Add autoconf-x86-gs.c.
* tapset/i686/registers.stp (_stp_register_regs): Update offsets.
  (test_x86_gs): Auxiliary function.
* runtime/autoconf-x86-gs.c : New file.
* testsuite/systemtap.base/x86_gs.exp : New test case.
* testsuite/systemtap.base/x86_gs.stp : Ditto.

15 years agoPR10016: systemtap kills all processes in process group on signal.
Mark Wielaard [Mon, 30 Mar 2009 19:18:30 +0000 (21:18 +0200)]
PR10016: systemtap kills all processes in process group on signal.

* main.cxx (main): Make sure we run in our own process group.

15 years agoTest marker probe parameter types.
Stan Cox [Mon, 30 Mar 2009 14:23:27 +0000 (10:23 -0400)]
Test marker probe parameter types.

* testsuite/systemtap.base/sdt_types.c: New file.
* testsuite/systemtap.base/sdt_types.stp: New file.
* testsuite/systemtap.base/static_uprobes.exp:  Use sdt_types for type testing.

15 years agoprefer using /usr/bin/lsb_release to deduce distribution for testsuite
Frank Ch. Eigler [Sun, 29 Mar 2009 20:40:13 +0000 (16:40 -0400)]
prefer using /usr/bin/lsb_release to deduce distribution for testsuite

15 years agotweak "Distro:" line generation in testsuite logs, to moot "oracle-enterprise.patch"
Frank Ch. Eigler [Sun, 29 Mar 2009 19:57:11 +0000 (15:57 -0400)]
tweak "Distro:" line generation in testsuite logs, to moot "oracle-enterprise.patch"

15 years agohand-regen configure after commit 99c0acad yxmlto->xmlto typo fix
Frank Ch. Eigler [Sun, 29 Mar 2009 19:51:40 +0000 (15:51 -0400)]
hand-regen configure after commit 99c0acad yxmlto->xmlto typo fix

15 years agoAdd header
Eugeniy Meshcheryakov [Sat, 28 Mar 2009 22:10:20 +0000 (23:10 +0100)]
Add header

15 years agoFix typo s/yxmlto/xmlto/
Eugeniy Meshcheryakov [Sat, 28 Mar 2009 21:36:02 +0000 (22:36 +0100)]
Fix typo s/yxmlto/xmlto/

15 years agoPR7045: on 64-bit kernels, allow 32-bit userspace to be pass elf validation release-0.9.5
Frank Ch. Eigler [Fri, 27 Mar 2009 17:01:54 +0000 (13:01 -0400)]
PR7045: on 64-bit kernels, allow 32-bit userspace to be pass elf validation

* tapsets.cxx (validate_elf): Reorganize glob matching for x86 and ppc.

15 years agoDon't do beginning of statement check for .mark probes
Stan Cox [Fri, 27 Mar 2009 16:51:22 +0000 (12:51 -0400)]
Don't do beginning of statement check for .mark probes

* tapsets.cxx (dwarf_query): Add has_mark.
(query_cu): Use for beginning of statement check.
(dwarf_builder::build): Set has_mark.

15 years agoVersion bumps for 0.9.5 release
Josh Stone [Fri, 27 Mar 2009 16:38:50 +0000 (09:38 -0700)]
Version bumps for 0.9.5 release

15 years agoPR6819: clarify syntactic vs. semantic probe point validity
Frank Ch. Eigler [Fri, 27 Mar 2009 16:15:19 +0000 (12:15 -0400)]
PR6819: clarify syntactic vs. semantic probe point validity

15 years agoinitialize skip_badvars=0. rererenag developers in session.h to do so in the future
Frank Ch. Eigler [Fri, 27 Mar 2009 16:07:49 +0000 (12:07 -0400)]
initialize skip_badvars=0.  rererenag developers in session.h to do so in the future

15 years agoPR10000: emit _stp_relocate* calculations correctly for kernel/module global $data
Frank Ch. Eigler [Fri, 27 Mar 2009 15:54:42 +0000 (11:54 -0400)]
PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data

* translate.cxx (dump_unwindsyms): Also emit STT_OBJECT symbols,
  therefore .data etc. sections into stap-symbols.h.

* tapsets.cxx (iterate_over_modules): Omit a dwfl_getmodules()
  RC-checking assertion that blocked meaningful $context var
  error messages.
  (dwflpp::emit_address): Bypass dwfl_module_relocate_address()
  for kernel symbols as it has been unreliable; subtract sess.sym_stext
  manually.

* testsuite/buildok/seventeen.stp: Extend test with module $global.

15 years ago.gitignore: Add testsuite exe and so files and initscript systemtap.
Mark Wielaard [Fri, 27 Mar 2009 11:45:51 +0000 (12:45 +0100)]
.gitignore: Add testsuite exe and so files and initscript systemtap.

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