]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years ago(PR14571 partial fix) For dyninst, use TLS for map and stat data.
David Smith [Fri, 21 Sep 2012 20:13:28 +0000 (15:13 -0500)]
(PR14571 partial fix) For dyninst, use TLS for map and stat data.

* runtime/dyninst/tls_data.c: New file.
* runtime/stat.c (struct _Stat): Add a tls_data_container_t structure.
  (_stp_stat_tls_object_init): New function.
  (_stp_stat_tls_object_free): Ditto.
  (_stp_stat_init): Instead of directly allocating percpu data, for
  dyninst set up tls data to be created when accessed by calling
  _stp_tls_data_container_init().
  (_stp_stat_del): For dyninst, call _stp_tls_data_container_cleanup() to
  remove all the tls data.
  (_stp_stat_add): For dyninst, get the proper tls stat object.
  (_stp_stat_get_cpu): Deleted unused function.
  (_stp_stat_get): For dyninst, get the proper tls stat objects.
  (_stp_stat_clear): For dyninst, clear the stat in each thread's tls data.
* runtime/stat.h (struct stat_data): Add a tls_data_object_t structure.
* runtime/map.c (_stp_map_tls_object_init): New function.
  (_stp_map_tls_object_free): Ditto.
  (_stp_pmap_new): Instead of directly allocating percpu data, for dyninst
  set up tls data to be created when accessed by calling
  _stp_tls_data_container_init().
  (_stp_pmap_clear): For dyninst, clear the map in each thread's tls data.
  (_stp_pmap_del): For dyninst, call _stp_tls_data_container_cleanup() to
  remove all the tls data.
  (_stp_pmap_agg): Add dyninst support.
* runtime/map.h (struct map_root): Add a tls_data_object_t structure.
  (struct pmap): Add a tls_data_container_t structure.
* runtime/map-stat.c (_stp_hstat_tls_object_init): New function.
  (_stp_pmap_new_hstat_linear): For dyninst, override the standard tls
  data object init function with _stp_hstat_tls_object_init(), which knows
  how to handle hstats.
  (_stp_pmap_new_hstat_log): Ditto.
* runtime/pmap-gen.c (_stp_pmap_tls_object_init): New function.
  (_stp_pmap_new): For dyninst, override the standard tls
  data object init function with _stp_pmap_tls_object_init(), which knows
  how to handle pmaps.
  (_stp_pmap_set): For dyninst, get the proper tls pmap object.
  (_stp_pmap_add): Ditto.
  (_stp_pmap_get_cpu): Ditto.
  (_stp_pmap_get): Ditto.
  (_stp_pmap_del): Ditto.
* runtime/dyninst/linux_defs.h: Added container_of(), list_entry(),
  list_for_each_entry(), and list_for_each_entry_safe().

11 years agoFixup sym.c _stp_module_check note_addr warning.
Mark Wielaard [Fri, 21 Sep 2012 08:30:12 +0000 (10:30 +0200)]
Fixup sym.c _stp_module_check note_addr warning.

The check said "notes_addr <= base_addr" /* shouldn't happen */
But the warning said "build-id address %lx < base %lx".
Make them both <=.

11 years agoAdd MODULE_INFO() macro for dyninst mode.
David Smith [Thu, 20 Sep 2012 21:13:48 +0000 (16:13 -0500)]
Add MODULE_INFO() macro for dyninst mode.

* runtime/dyninst/runtime.h: Add MODULE_INFO() macro to get things
  compiling in dyninst mode (the testsuite adds a "--modinfo intree=Y"
  argument).

11 years agoPR6580: reimplement straightforward legacy functions in terms of stack().
Serguei Makarov [Wed, 19 Sep 2012 20:34:23 +0000 (16:34 -0400)]
PR6580: reimplement straightforward legacy functions in terms of stack().

11 years agoPR6580 clarification: comment explaining suitability of current kluge for _stp_get_ur...
Serguei Makarov [Wed, 19 Sep 2012 15:00:22 +0000 (11:00 -0400)]
PR6580 clarification: comment explaining suitability of current kluge for _stp_get_uregs() clearing kernel cache.

The inefficiency alluded to only occurs when interspersing
*partial* kernel and user unwinds, e.g. try this with -DDEBUG_UNWIND=1:

stack(0); ustack(0); stack(1); ustack(1); ...

11 years agoparse.cxx swallow tokens we are definitely not using.
Mark Wielaard [Wed, 19 Sep 2012 08:33:29 +0000 (10:33 +0200)]
parse.cxx swallow tokens we are definitely not using.

The tokens produced by expect_* () were immediately dropped on the floor
after inspection. And a lot of places in the parser called next () just
to get passed the current token without using it. Those tokens could
immediately be cleaned up saving ~3MB of "lost memory".

valgrind stap -v -k -p4 -e 'probe begin { log("Hello, World!"); exit(); }'
Before:
==12545==    definitely lost: 2,470,128 bytes in 51,408 blocks
==12545==    indirectly lost: 14,180,805 bytes in 319,624 blocks

After:
==14782==    definitely lost: 18,856 bytes in 220 blocks
==14782==    indirectly lost: 12,432,436 bytes in 264,176 blocks

11 years agostapdyn: Enable user macros and verbose gcc reporting
Josh Stone [Wed, 19 Sep 2012 00:22:42 +0000 (17:22 -0700)]
stapdyn: Enable user macros and verbose gcc reporting

11 years agostapdyn: Add execname() using prctl(PR_GET_NAME)
Josh Stone [Wed, 19 Sep 2012 00:20:26 +0000 (17:20 -0700)]
stapdyn: Add execname() using prctl(PR_GET_NAME)

11 years agoPR6580: incremental unwinder with cache.
Serguei Makarov [Mon, 17 Sep 2012 22:03:31 +0000 (18:03 -0400)]
PR6580: incremental unwinder with cache.

Implements a cached unwinder, allowing most backtrace tapset functions
to be implemented in terms of stack() without loss of performance.
stack() calls can be made repeatedly and in any order, and they will
use the results of a single unwind. (Works only with the DWARF
unwinder).

_stp_stack_kernel_print et. al. retain their prior behaviour,
including a number of fallbacks not available to the incremental
unwind. These fallbacks only emit backtrace strings, which can be
tokenized on the tapset end as a last resort.

* runtime/unwind/unwind.h -- define struct unwind_cache to store PCs
  obtained from unwinder.
* runtime/common_probe_context.h -- include two sets of unwinder
  context and cache, one for user side, one for kernel.
* tapsets.cxx -- probe prologue includes a small thing to mark
  the unwind caches as being in an uninitialized state.
* runtime/stack.c -- incremental unwinder implementation.
* runtime/stack-dwarf.c -- deleted. Code moved to stack.c since
  this is now the preferred unwind method.
* tapset/linux/[u]context-symbols.stp -- change stack(), ustack()
  to directly call incremental unwinder.

11 years ago(PR14571 partial fix) For dyninst, rename 'stat' to 'stat_data'.
David Smith [Mon, 17 Sep 2012 18:54:18 +0000 (13:54 -0500)]
(PR14571 partial fix) For dyninst, rename 'stat' to 'stat_data'.

* runtime/stat.h: To avoid clashing with 'stat' definition from
  /usr/include/sys/stat.h, rename internal 'stat' typedef to 'stat_data'.
* runtime/map-gen.c: Renamed 'stat' to 'stat_data'.
* runtime/map-stat.c: Ditto.
* runtime/map.c: Ditto.
* runtime/map.h: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat-common.c: Ditto.
* runtime/stat.c: Ditto.

11 years agoCleanup for PR6580: well-duh typo fix for last commit.
Serguei Makarov [Mon, 17 Sep 2012 15:34:13 +0000 (11:34 -0400)]
Cleanup for PR6580: well-duh typo fix for last commit.

11 years agoCleanup for PR6580: replace context probe_flags with individual status bits.
Serguei Makarov [Mon, 17 Sep 2012 15:10:39 +0000 (11:10 -0400)]
Cleanup for PR6580: replace context probe_flags with individual status bits.

Instead of checking c->probe_flags against _STP_PROBE_STATE_*, use
c->user_mode_p and c->full_uregs_p.

11 years ago(PR14571 partial fix) For dyninst, use TLS for the context structure.
David Smith [Fri, 14 Sep 2012 15:13:19 +0000 (10:13 -0500)]
(PR14571 partial fix) For dyninst, use TLS for the context structure.

* translate.cxx (c_unparser::emit_common_header): Update to use thread
  local storage in dyninst mode for context structure.
  (c_unparser::emit_global_param): Since there are no module parameters
  with dyninst, don't bother emitting code.
  (c_unparser::emit_module_init): Don't bother emitting kernel-only code
  in dyninst mode.
* runtime/vsprintf.c (_stp_vsprint_memory): For dyninst, use thread local
  storage to get correct context structure.
* tapsets.cxx (common_probe_entryfn_prologue): Take a 'systemtap_sesion'
  argument instead of a 'translator_output' argument.  This allows access
  to the s.is_usermode() function (so we can avoid outputting kernel code
  when using dyninst).
  (dwarf_derived_probe_group::emit_module_decls): Update
  common_probe_entryfn_prologue() call.
  (uprobe_derived_probe_group::emit_module_utrace_decls): Ditto.
  (uprobe_derived_probe_group::emit_module_inode_decls): Ditto.
  (uprobe_derived_probe_group::emit_module_dyninst_decls): Ditto.
  (kprobe_derived_probe_group::emit_module_decls): Ditto.
  (hwbkpt_derived_probe_group::emit_module_decls): Ditto.
  (tracepoint_derived_probe_group::emit_module_decls): Ditto.
* tapset-been.cxx (be_derived_probe_group::emit_module_decls): Ditto.
* tapset-itrace.cxx (itrace_derived_probe_group::emit_module_decls): Ditto.
* tapset-mark.cxx (mark_derived_probe_group::emit_module_decls): Ditto.
* tapset-netfilter.cxx (netfilter_derived_probe_group::emit_module_decls):
  Ditto.
* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls): Ditto.
* tapset-procfs.cxx (procfs_derived_probe_group::emit_module_decls):
  Ditto.
* tapset-timers.cxx (profile_derived_probe_group::emit_module_decls):
  Ditto.
* tapset-utrace.cxx (utrace_derived_probe_group::emit_module_decls):
  Ditto.
* tapsets.h: Updated common_probe_entryfn_prologue() declaration.

11 years agoInclude a closing ''' for kvm_service_time.meta so the tests run properly.
William Cohen [Thu, 13 Sep 2012 19:31:58 +0000 (15:31 -0400)]
Include a closing ''' for kvm_service_time.meta so the tests run properly.

11 years agoParameterize variables used in config and initscript files.
William Cohen [Wed, 12 Sep 2012 17:22:17 +0000 (13:22 -0400)]
Parameterize variables used in config and initscript files.

11 years agoFixed PR14560 to avoid cmd_parse.exp hanging on RHEL5.
David Smith [Tue, 11 Sep 2012 22:24:18 +0000 (17:24 -0500)]
Fixed PR14560 to avoid cmd_parse.exp hanging on RHEL5.

* testsuite/systemtap.base/cmd_parse.exp: Change cmd_parse14 test to use
  grep instead of expect to avoid hangs on RHEL5.

11 years ago(PR14488 partial fix) Make memory writing more robust.
David Smith [Mon, 10 Sep 2012 21:20:16 +0000 (16:20 -0500)]
(PR14488 partial fix) Make memory writing more robust.

* runtime/dyninst/linux_defs.h (__copy_from_user): Remove unused code (and
  update comment).
  (__put_user): New macro.
  (__copy_to_user): New function.
  (__put_user_fn): Ditto.
* runtime/dyninst/loc2c-runtime.h (__get_user_asm): Fix macro to return
  error code.
  (__put_user_asm): New macro.

11 years agoCorrect the location of uconversions.stp in tapsets.tmpl
William Cohen [Mon, 10 Sep 2012 18:44:42 +0000 (14:44 -0400)]
Correct the location of uconversions.stp in tapsets.tmpl

11 years agodoc: elaborate on process.* context variables and sdt.h markers
Frank Ch. Eigler [Mon, 10 Sep 2012 17:02:13 +0000 (13:02 -0400)]
doc: elaborate on process.* context variables and sdt.h markers

11 years agodoc: mention 'context variables' as an alias for 'target variables'
Frank Ch. Eigler [Mon, 10 Sep 2012 17:01:50 +0000 (13:01 -0400)]
doc: mention 'context variables' as an alias for 'target variables'

11 years agolangref.tex: document various embedded-C pragmas
Serguei Makarov [Mon, 10 Sep 2012 16:44:49 +0000 (12:44 -0400)]
langref.tex: document various embedded-C pragmas

11 years agolangref.tex: clarify when embedded-C code (as opposed to expressions) may appear
Serguei Makarov [Mon, 10 Sep 2012 16:30:06 +0000 (12:30 -0400)]
langref.tex: clarify when embedded-C code (as opposed to expressions) may appear

11 years agodflpp.cxx (find_variable_and_frame_base): Remove extra bracket in error.
Mark Wielaard [Mon, 10 Sep 2012 08:29:15 +0000 (10:29 +0200)]
dflpp.cxx (find_variable_and_frame_base): Remove extra bracket in error.

Before:
semantic error: unable to find local 'task', dieoffset 0x111604 in nfs,
near pc 0x78863 in nfs_read_done fs/nfs/proc.c ( (alternatives: $data):
identifier '$task' at [...]

After:
semantic error: unable to find local 'task', dieoffset 0x111604 in nfs,
near pc 0x78863 in nfs_read_done fs/nfs/proc.c (alternatives: $data):
identifier '$task' at [...]

11 years ago(PR14488 partial fix) Make memory reading more robust.
David Smith [Fri, 7 Sep 2012 19:57:18 +0000 (14:57 -0500)]
(PR14488 partial fix) Make memory reading more robust.

* runtime/dyninst/runtime.h (assert_is_myproc): New dummy macro.
  (stp_dummy_init): Opens the /proc/self/mem file.
  (stp_dummy_exit): Close the file.
* runtime/dyninst/linux_defs.h (user_mode): New dummy macro.
  (__copy_from_user): Rewrote to read memory from /proc/self/mem, to be
  able to catch errors.
* runtime/stp_string.h (__stp_get_user): Always use __get_user(), no
  matter what arch we're on in dyninst mode.
* tapset/uconversions.stp: Moved from tapset/linux/uconversions.stp, since
  the dyninst runtime can use the functions also.

11 years agoImprove dwflpp::find_variable_and_frame_base error message when var not found.
Mark Wielaard [Fri, 7 Sep 2012 13:04:44 +0000 (15:04 +0200)]
Improve dwflpp::find_variable_and_frame_base error message when var not found.

Mention scope DIE offset and module name.

11 years agostap-report: add slackware package-listing widgetry
Frank Ch. Eigler [Thu, 6 Sep 2012 18:18:25 +0000 (14:18 -0400)]
stap-report: add slackware package-listing widgetry

11 years agoPR14549: Revert "PR6580: rewrite simple to-be-deprecated backtrace functions in terms...
Serguei Makarov [Thu, 6 Sep 2012 14:06:26 +0000 (10:06 -0400)]
PR14549: Revert "PR6580: rewrite simple to-be-deprecated backtrace functions in terms of new ones"

This reverts commit 4e4aaf10d022db0f607b9e729b1a7abd5decc1b4, keeping the
definition of spsyms(), in order to avoid regression PR14549.

11 years agoPR14546 Only copy registers of initial state.
Mark Wielaard [Wed, 5 Sep 2012 19:09:43 +0000 (21:09 +0200)]
PR14546 Only copy registers of initial state.

The DWARF unwinder was copying too much information into the cie_regs
state possibly overwriting ~18 bytes after the unwind_context. Just copy
the registers.

Fix small testsuite type s/ko/ok/ in pr14546.exp

11 years agoPR14546: testcase for repeated unwinder invocations.
Serguei Makarov [Wed, 5 Sep 2012 20:31:17 +0000 (16:31 -0400)]
PR14546: testcase for repeated unwinder invocations.

11 years agochmod +x ./testsuite/semko/entry04.stp
William Cohen [Wed, 5 Sep 2012 14:43:44 +0000 (10:43 -0400)]
chmod +x ./testsuite/semko/entry04.stp

11 years agosystemtap.spec: activate with_dyninst on rhel7 too
Frank Ch. Eigler [Tue, 4 Sep 2012 14:14:50 +0000 (10:14 -0400)]
systemtap.spec: activate with_dyninst on rhel7 too

11 years agoPR14534: systemtap.spec should include ../stap-env in -server, not -runtime
Frank Ch. Eigler [Fri, 31 Aug 2012 14:28:32 +0000 (10:28 -0400)]
PR14534: systemtap.spec should include ../stap-env in -server, not -runtime

11 years agoPR14524: also document in tapset/DEVGUIDE.
Serguei Makarov [Tue, 28 Aug 2012 14:04:55 +0000 (10:04 -0400)]
PR14524: also document in tapset/DEVGUIDE.

11 years agoPR14524: document /* unmangled */ pragma for embedded-C functions.
Serguei Makarov [Mon, 27 Aug 2012 19:31:08 +0000 (15:31 -0400)]
PR14524: document /* unmangled */ pragma for embedded-C functions.

11 years agoPR14524: test case for per-function legacy mangling pragma
Serguei Makarov [Mon, 27 Aug 2012 19:14:41 +0000 (15:14 -0400)]
PR14524: test case for per-function legacy mangling pragma

11 years agoPR10299 residue: only define STAP_RETVALUE for non-void functions
Serguei Makarov [Mon, 27 Aug 2012 18:52:15 +0000 (14:52 -0400)]
PR10299 residue: only define STAP_RETVALUE for non-void functions

11 years agoPR14524: support old embedded-locals notation on a per-function basis
Serguei Makarov [Mon, 27 Aug 2012 18:13:39 +0000 (14:13 -0400)]
PR14524: support old embedded-locals notation on a per-function basis

Adding the pragma /* unmangled */ to an embedded-C function now enables
the use of the pre-1.8 local names, i.e. THIS->n instead of STAP_ARG_n.
This aids migration of pre-1.8 scripts and tapsets by allowing mixing
two kinds of embedded functions (pre- and post-1.8) in the same code.

11 years agoNEWS: note that stap(dyn) does selinux checks itself now
Frank Ch. Eigler [Thu, 23 Aug 2012 22:36:58 +0000 (18:36 -0400)]
NEWS: note that stap(dyn) does selinux checks itself now

11 years agolangref: Mention 'delete' in the Arrays and Statistics sections
Josh Stone [Wed, 22 Aug 2012 22:41:49 +0000 (15:41 -0700)]
langref: Mention 'delete' in the Arrays and Statistics sections

When reading just the sections on Arrays and Statistics, it was not
apparent that the 'delete' statement is applicable to each.  These
sections now have a mention and back-reference to the delete statement.

Reported-By: Ben Woodard <woodard@redhat.com>
11 years agoDon't require prefix for ia64 rpm.
Stan Cox [Tue, 21 Aug 2012 22:17:11 +0000 (18:17 -0400)]
Don't require prefix for ia64 rpm.

* systemtap.spec (Requires): ia64 does not have prelink.

11 years agoruntime: Use typedef-typeof for safer function pointers
Josh Stone [Tue, 21 Aug 2012 18:46:30 +0000 (11:46 -0700)]
runtime: Use typedef-typeof for safer function pointers

We use kallsyms_lookup_name to access several functions that are
publicly declared but not exported.  We were manually recreating the
call signatures for function pointers though, which is begging for
trouble.  This patch updates all those typedefs to use typeof on the
original function declaration, so we hopefully get compile-time breakage
if the call signature ever changes on us.

11 years agoFixed PR14467 by correcting memory initialization.
David Smith [Tue, 21 Aug 2012 18:19:37 +0000 (13:19 -0500)]
Fixed PR14467 by correcting memory initialization.

* runtime/stp_utrace.c (utrace_task_alloc): Don't try to initialize the
  utrace structure after possibly freeing it.

11 years agosystemtap.spec: Be sensitive to %{?rhel} for publican branding
Frank Ch. Eigler [Tue, 21 Aug 2012 13:50:31 +0000 (09:50 -0400)]
systemtap.spec: Be sensitive to %{?rhel} for publican branding

Manually setting publican_brand to RedHat vs. fedora is too unpleasant.

11 years agostapdyn: Check for cooperative SELinux booleans
Josh Stone [Mon, 20 Aug 2012 21:22:25 +0000 (14:22 -0700)]
stapdyn: Check for cooperative SELinux booleans

We know that deny_ptrace=1 or allow_execstack=0 will prevent Dyninst
from working; with libselinux we can check this beforehand.

* configure.ac: Check for libselinux via pkg-config.
* stapdyn/Makefile.am: Add selinux flags when present.
* [...autoreconf...]
* stapdyn/dynutil.cxx (check_dyninst_sebools): New, validate the
  mentioned SELinux booleans for Dyninst compatibility.
* stapdyn/dynsdt.cxx (main): Call check_dyninst_sebools.
* stapdyn/stapdyn.cxx (main): Ditto.
* systemtap.spec: BuildRequire libselinux-devel for dyninst builds.

11 years agoPR6580: cleanly handle overflow of MAXSTRINGLEN (subject to further testing)
Serguei Makarov [Mon, 20 Aug 2012 18:16:35 +0000 (14:16 -0400)]
PR6580: cleanly handle overflow of MAXSTRINGLEN (subject to further testing)

11 years agoPR6580: notice oops in earlier commit.
Serguei Makarov [Mon, 20 Aug 2012 15:40:46 +0000 (11:40 -0400)]
PR6580: notice oops in earlier commit.

11 years agobuild compatibility: drop unnecessary decl
Frank Ch. Eigler [Mon, 20 Aug 2012 17:11:50 +0000 (13:11 -0400)]
build compatibility: drop unnecessary decl

commit dec33462a left some detritus behind.  Clean that up.

* hash.h (struct hash): Don't forward-declare.

11 years agoPR6580: rewrite simple to-be-deprecated backtrace functions in terms of new ones
Serguei Makarov [Fri, 17 Aug 2012 20:27:44 +0000 (16:27 -0400)]
PR6580: rewrite simple to-be-deprecated backtrace functions in terms of new ones

For now, avoid changing backtrace(), probemod(), or the functions that
depend on not running into MAXSTRINGLEN according to their documentation.

11 years agoPR6580: more missed @unwind_error() renaming.
Serguei Makarov [Fri, 17 Aug 2012 19:18:47 +0000 (15:18 -0400)]
PR6580: more missed @unwind_error() renaming.

11 years agoPR6580: rename @unwind_error() to something more descriptive.
Serguei Makarov [Fri, 17 Aug 2012 19:07:32 +0000 (15:07 -0400)]
PR6580: rename @unwind_error() to something more descriptive.

11 years agoFixed PR14463 by changing error handling of utrace_control().
David Smith [Fri, 17 Aug 2012 18:31:24 +0000 (13:31 -0500)]
Fixed PR14463 by changing error handling of utrace_control().

* runtime/stp_utrace.c (utrace_barrier): Add a 'might_sleep()' call since
  it calls schedule_timeout_interruptible(), which sleeps.
* runtime/linux/task_finder2.c (__stp_utrace_attach): Ignore
  EINPROGRESS errors from utrace_control() when passed UTRACE_STOP, since
  that just means the task hasn't stopped yet.
* runtime/linux/task_finder.c (__stp_utrace_attach_flags): Ditto.

11 years agobuild compatibility: gcc 4.7 with -std=c++11, std::hash collision
Frank Ch. Eigler [Thu, 16 Aug 2012 00:58:59 +0000 (20:58 -0400)]
build compatibility: gcc 4.7 with -std=c++11, std::hash collision

* hash.cxx (struct hash): Rename to stap_hash to avoid conflict with
  std::hash template.
* session.h: Corresponding changes.

Reported-By: Doug Evans <dje@google.com>
11 years agobuild compatibility: gcc 4.7 with -std=c++11
Frank Ch. Eigler [Thu, 16 Aug 2012 00:56:58 +0000 (20:56 -0400)]
build compatibility: gcc 4.7 with -std=c++11

* dwflpp.cxx, tapsets.cxx: On glibc >= 2.7, use scanf %ms instead of %as,
  as the former is more posixly correct.

Reported-By: Doug Evans <dje@google.com>
11 years agoPR11659: Hook into the panic_notifier_list
Chris Meek [Wed, 15 Aug 2012 19:44:55 +0000 (15:44 -0400)]
PR11659: Hook into the panic_notifier_list

This feature lets stap dump the trace buffers to the serial console on a
kernel panic. The basic functionality is there, but it could use some
tweeking including adding a summary report at the end of the dump.
Currently it only works for the relay buffer V2.

11 years agomore typo fix for langref.tex
Serguei Makarov [Wed, 15 Aug 2012 15:37:42 +0000 (11:37 -0400)]
more typo fix for langref.tex

11 years agoPR14313: clarifying message for alias_suffixes.stp example.
Serguei Makarov [Wed, 15 Aug 2012 15:35:00 +0000 (11:35 -0400)]
PR14313: clarifying message for alias_suffixes.stp example.

11 years agoPR14313: rewrite alias suffix example in langref.tex.
Serguei Makarov [Wed, 15 Aug 2012 15:31:59 +0000 (11:31 -0400)]
PR14313: rewrite alias suffix example in langref.tex.

The rewrite avoids possible confusion due to the fact that there is
a syscall.read.return alias defined in the tapset (which changes how
the suffix is resolved in the real code vs. in the example with
only one custom syscall.read alias).

11 years agoFix PR14026 by updating the IP before calling the inode-uprobe handler.
David Smith [Wed, 15 Aug 2012 15:11:12 +0000 (10:11 -0500)]
Fix PR14026 by updating the IP before calling the inode-uprobe handler.

* tapsets.cxx (uprobe_derived_probe_group::emit_module_inode_decls): Fix
  the IP before calling the real probe handler using
  uprobe_get_swbp_addr().
* buildrun.cxx (compile_pass): Added
  STAPCONF_UPROBE_GET_SWBP_ADDR_EXPORTED autoconf.
* runtime/linux/runtime.h: Add kallsyms_uprobe_get_swbp_addr declaration.
* runtime/linux/uprobes-inode.c: Ditto.
* runtime/transport/transport.c (_stp_transport_init): If
  STAPCONF_UPROBE_GET_SWBP_ADDR_EXPORTED isn't defined, use
  kallsyms_lookup_name() to find the address of 'uprbe_get_swbp_addr'.

11 years agoPR6580: implement psyms().
Serguei Makarov [Tue, 14 Aug 2012 19:02:08 +0000 (15:02 -0400)]
PR6580: implement psyms().

11 years agoPR6580 misc oops: put ucontext stuff in ucontext-*!
Serguei Makarov [Tue, 14 Aug 2012 15:51:35 +0000 (11:51 -0400)]
PR6580 misc oops: put ucontext stuff in ucontext-*!

11 years agoImprove PR14463 by avoiding sleeping in the clone handler.
David Smith [Tue, 14 Aug 2012 15:38:14 +0000 (10:38 -0500)]
Improve PR14463 by avoiding sleeping in the clone handler.

* runtime/linux/task_finder2.c (__stp_tf_alloc_task_work): Change
  parameter to a void pointer.
  (__stp_tf_clone_worker): New function.
  (__stp_utrace_task_finder_report_clone): Uses stp_task_work_add() to
  call __stp_tf_clone_worker() when we can safely sleep.

11 years agoPR6580: implement callers(), ucallers().
Serguei Makarov [Tue, 14 Aug 2012 14:32:22 +0000 (10:32 -0400)]
PR6580: implement callers(), ucallers().

11 years agoPR14396: Fix a kernel typo in utf_user_trunc.stp
Josh Stone [Tue, 14 Aug 2012 01:50:24 +0000 (18:50 -0700)]
PR14396: Fix a kernel typo in utf_user_trunc.stp

* testsuite/systemtap.base/utf_user_trunc.stp: s/kernel/user/

11 years agoPR14396: Truncate UTF strings silently
Josh Stone [Tue, 14 Aug 2012 01:32:40 +0000 (18:32 -0700)]
PR14396: Truncate UTF strings silently

The UTF-16 and UTF-32 conversion functions were correctly refusing to
write a partial UTF-8 sequence into the buffer, but they were treating
that case as an error.  It should just silently stop processing, so the
result is truncated just as any other string concatenation does.

* tapset/linux/conversions.stp (kernel_string_utf32): Treat only rc<0
  from _stp_convert_utf32 as an error; rc==0 is truncation.
  (kernel_string_utf16): Ditto.
* tapset/linux/uconversions.stp (user_string_utf32): Ditto.
  (user_string_utf16): Ditto.
* testsuite/systemtap.base/utf_kernel_trunc.*: Test a broad range of
  truncation points within kernel UTF strings.
* testsuite/systemtap.base/utf_user_trunc.*: Same test for userspace.
  (The duplication is unfortunate, but it's not too crazy.)

11 years agostap: Include DYNINST in the enabled feature list
Josh Stone [Mon, 13 Aug 2012 23:00:43 +0000 (16:00 -0700)]
stap: Include DYNINST in the enabled feature list

11 years agoDon't report non-git if we have an extra-version
Josh Stone [Mon, 13 Aug 2012 22:45:23 +0000 (15:45 -0700)]
Don't report non-git if we have an extra-version

When we're not building from git, but we do have --with-extra-version,
just let that suffice in our version strings.  But when we do have a git
repo, still print the fullest information possible.

* version.h: Define STAP_EXTENDED_VERSION with this scheme.
* session.cxx, stapdyn/stapdyn.cxx, staprun/common.c: Use it.

11 years agoPR6580: implement naive stack(), ustack()
Serguei Makarov [Mon, 13 Aug 2012 20:48:15 +0000 (16:48 -0400)]
PR6580: implement naive stack(), ustack()

11 years agoPR14460 ipaddr.exp: all hail bash /dev/tcp
Frank Ch. Eigler [Mon, 13 Aug 2012 00:10:22 +0000 (20:10 -0400)]
PR14460 ipaddr.exp: all hail bash /dev/tcp

Use bash's /dev/tcp/127.0.0.1/8079 and /dev/tcp/::1/8079, which work.

11 years agoPR14460 try 1
Frank Ch. Eigler [Mon, 13 Aug 2012 00:05:46 +0000 (20:05 -0400)]
PR14460 try 1

Switch to tcl's [socket HOST PORT] facilities as a netcat client
substitute.  Except tcl 8.5* doesn't speak ipv6 jive.  Also, switch to
port 8079 for tests, expecting to conflict less with normal ongoings
than good old 8080.

11 years agoPR14396: Add pretty-printing support for UTF
Josh Stone [Sat, 11 Aug 2012 00:46:13 +0000 (17:46 -0700)]
PR14396: Add pretty-printing support for UTF

* dwarf_wrappers.h: Define DW_ATE_UTF if elfutils < 0.155.
* tapsets.cxx (dwarf_pretty_print::recurse_base): Print UTF with %#c
  too. This will generally only work with the ASCII subset for now...
  (dwarf_pretty_print::print_chars): Match strings by char/UTF encoding
  types, rather than by type name, and use the byte_size to select the
  correct string dereferencing function.
* testsuite/systemtap.base/utf_pretty.*: Test it!

11 years agoPR14396: Add UTF-16/32 conversion functions
Josh Stone [Fri, 10 Aug 2012 22:15:29 +0000 (15:15 -0700)]
PR14396: Add UTF-16/32 conversion functions

* runtime/stp_string.c (_stp_convert_utf32): New, write the given
  UTF-32 code point as UTF-8 in the given buffer.
* tapset/linux/conversions.stp (kernel_string_utf32): New, read and
  convert a UTF-32 string from kernel memory.
  (kernel_string_utf16): Same for UTF-16, handling surrogate pairs.
  (kernel_string2_utf32, kernel_string2_utf16): Same w/ custom error.
* tapset/linux/uconversions.stp: All of the above for user memory.
* testsuite/buildok/conversions*.stp: Add build tests.
* testsuite/systemtap.base/utf_*: New runtime tests.

11 years agoloc2c-runtime.h: Add uread() and uwrite()
Josh Stone [Fri, 10 Aug 2012 21:50:41 +0000 (14:50 -0700)]
loc2c-runtime.h: Add uread() and uwrite()

These are the userspace equivalents to kread() and kwrite().

For the (unused) STAPCONF_PROBE_KERNEL case, just define them as direct
equivalents.  Also add in missing kderef and store_kderef the same way.

For the architecture-implemented case, they are nearly identical to
kread and kwrite, just s/kderef/uderef/.  So to avoid duplication, I've
added in a layer of macro indirection to pass in the appropriate deref
function.  (Nevermind that the [ku]derefs are often identical -- oh,
what a tangled web we weave...)

11 years agoexamples: regenerate indexes
Frank Ch. Eigler [Fri, 10 Aug 2012 23:18:32 +0000 (19:18 -0400)]
examples: regenerate indexes

11 years agoPR14164 (netfilter.stp): fix documentation oops.
Serguei Makarov [Fri, 10 Aug 2012 20:40:19 +0000 (16:40 -0400)]
PR14164 (netfilter.stp): fix documentation oops.

11 years agoPR14453: add some forward decls for rhel6.3 rpc tracepoints
Frank Ch. Eigler [Fri, 10 Aug 2012 19:46:06 +0000 (15:46 -0400)]
PR14453: add some forward decls for rhel6.3 rpc tracepoints

* tapsets.cxx (tracepoint_extra_decls): Forward-declare rpc_clnt and rpc_wait_queue.

11 years agoPR14164 (netfilter.stp): fix requirements for Ethernet-IP case for ARP.
Serguei Makarov [Fri, 10 Aug 2012 18:29:24 +0000 (14:29 -0400)]
PR14164 (netfilter.stp): fix requirements for Ethernet-IP case for ARP.

11 years agoPR14452: drop 1ULL literal from sys/sdt.h
Frank Ch. Eigler [Fri, 10 Aug 2012 17:56:36 +0000 (13:56 -0400)]
PR14452: drop 1ULL literal from sys/sdt.h

Use (unsigned long long) 1 instead, which is for some reason kosherer.

11 years agoPR14449: systemtap-server should work without systemtap-runtime preinstalled
Frank Ch. Eigler [Fri, 10 Aug 2012 15:05:23 +0000 (11:05 -0400)]
PR14449: systemtap-server should work without systemtap-runtime preinstalled

Adding a %triggerin to -client to respond to -server being installed.

11 years agoPR14164 (netfilter.stp): decode ARP packet contents on Ethernet.
Serguei Makarov [Fri, 10 Aug 2012 15:09:15 +0000 (11:09 -0400)]
PR14164 (netfilter.stp): decode ARP packet contents on Ethernet.

11 years agoconfigury: need libdwarf-devel for stapdyn
Frank Ch. Eigler [Wed, 8 Aug 2012 15:28:58 +0000 (11:28 -0400)]
configury: need libdwarf-devel for stapdyn

Or else, perhaps stapdyn doesn't need a manual -ldwarf in dyninst_LIBS.

11 years agoImprove task_finder/task_finder2 error handling.
David Smith [Fri, 10 Aug 2012 13:39:51 +0000 (08:39 -0500)]
Improve task_finder/task_finder2 error handling.

* runtime/linux/task_finder.c (stap_start_task_finder): When we ignore
  EPERM or ENOENT errors, be sure to not accidently return the ignored
  error.
* runtime/linux/task_finder2.c (stap_start_task_finder): Ditto.

11 years agoPR14164: fix missing endianness conversion in ARP header extractor.
Serguei Makarov [Thu, 9 Aug 2012 19:20:54 +0000 (15:20 -0400)]
PR14164: fix missing endianness conversion in ARP header extractor.

11 years agoUse macros (PR11207) in netfilter.stp (PR13667).
Serguei Makarov [Thu, 9 Aug 2012 13:54:59 +0000 (09:54 -0400)]
Use macros (PR11207) in netfilter.stp (PR13667).

11 years agoPR11207 cleanup: rename session.macros to session.c_macros to clarify distinction...
Serguei Makarov [Thu, 9 Aug 2012 13:47:09 +0000 (09:47 -0400)]
PR11207 cleanup: rename session.macros to session.c_macros to clarify distinction from SystemTap macroprocessor macros.

11 years agoIn task_work worker functions, make sure the task isn't exiting.
David Smith [Wed, 8 Aug 2012 15:31:11 +0000 (10:31 -0500)]
In task_work worker functions, make sure the task isn't exiting.

* runtime/linux/task_finder2.c (__stp_tf_quiesce_worker): If the
  task is exiting, quit early.
  (__stp_tf_mmap_worker): Ditto.
* runtime/stp_utrace.c (utrace_resume): Ditto.

11 years agoFix problems with varargs macros in dyninst/io.c.
David Smith [Tue, 7 Aug 2012 22:32:01 +0000 (17:32 -0500)]
Fix problems with varargs macros in dyninst/io.c.

* runtime/dyninst/io.c: Convert _stp_warn(), _stp_error(),
  _stp_softerror(), and _stp_dbug() from varargs macros into varargs
  functions so that calling _stp_warn() (for example) with just a format
  argument works correctly.

11 years agostapdyn: Add a bit of documentation to stap.1
Josh Stone [Tue, 7 Aug 2012 20:12:28 +0000 (13:12 -0700)]
stapdyn: Add a bit of documentation to stap.1

11 years agoAUTHORS bump
Josh Stone [Tue, 7 Aug 2012 19:43:49 +0000 (12:43 -0700)]
AUTHORS bump

11 years agouse file based requires
Dennis Gilmore [Fri, 13 Jul 2012 13:41:29 +0000 (08:41 -0500)]
use file based requires

11 years agoFix ifarch statement
Peter Robinson [Fri, 13 Jul 2012 13:29:37 +0000 (14:29 +0100)]
Fix ifarch statement

11 years agoparse: Fix a -Werror=delete-non-virtual-dtor
Josh Stone [Tue, 7 Aug 2012 19:24:18 +0000 (12:24 -0700)]
parse: Fix a -Werror=delete-non-virtual-dtor

  CXX    stap-parse.o
../parse.cxx: In destructor ‘parser::pp1_activation::~pp1_activation()’:
../parse.cxx:421:16: error: deleting object of polymorphic class type
‘parser::pp_macrodecl’ which has non-virtual destructor might cause
undefined behaviour [-Werror=delete-non-virtual-dtor]
cc1plus: all warnings being treated as errors

We need virtual ~macrodecl to destroy the inherited pp_macrodecl.

11 years agospec: Configure the rpm verrel into the build
Josh Stone [Tue, 7 Aug 2012 19:10:59 +0000 (12:10 -0700)]
spec: Configure the rpm verrel into the build

11 years agoPR11207: minimal explanatory documentation for macroprocessor for 2.0pre.
Serguei Makarov [Tue, 7 Aug 2012 18:59:43 +0000 (14:59 -0400)]
PR11207: minimal explanatory documentation for macroprocessor for 2.0pre.

11 years agostapdyn: fix NEWS for loss of systemtap-stapdyn subpackage
Frank Ch. Eigler [Tue, 7 Aug 2012 18:42:00 +0000 (14:42 -0400)]
stapdyn: fix NEWS for loss of systemtap-stapdyn subpackage

11 years agoPR11207: good NEWS, everyone!
Serguei Makarov [Tue, 7 Aug 2012 15:48:47 +0000 (11:48 -0400)]
PR11207: good NEWS, everyone!

11 years agoPR11207: initial version of simplified tapset-macro loading from .stpm files.
Serguei Makarov [Tue, 7 Aug 2012 15:37:05 +0000 (11:37 -0400)]
PR11207: initial version of simplified tapset-macro loading from .stpm files.

11 years agostapdyn: don't put it into a separate subrpm; leave it in -runtime
Frank Ch. Eigler [Tue, 7 Aug 2012 13:57:04 +0000 (09:57 -0400)]
stapdyn: don't put it into a separate subrpm; leave it in -runtime

11 years agoAUTHORS bump
Josh Stone [Tue, 7 Aug 2012 01:52:48 +0000 (18:52 -0700)]
AUTHORS bump

11 years agostapdyn: Don't ship dynsdt
Josh Stone [Tue, 7 Aug 2012 01:44:31 +0000 (18:44 -0700)]
stapdyn: Don't ship dynsdt

This is more of a test/demo program at this point, so it doesn't really
warrant installation or rpm packaging.  Demoting...

11 years agostapdyn: Add a NEWS blurb
Josh Stone [Tue, 7 Aug 2012 01:26:37 +0000 (18:26 -0700)]
stapdyn: Add a NEWS blurb

(partly borrowed from Fedora's Systemtap2 feature page)

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