]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years agoPR14682: fix _stp_pmap_agg error exit path
Frank Ch. Eigler [Mon, 8 Oct 2012 00:01:37 +0000 (20:01 -0400)]
PR14682: fix _stp_pmap_agg error exit path

commit 82523f19 changed the error-exit path of _stp_pmap_agg, but was
confused by the multiple (three!) levels of nested loops in effect at
the point of failure.  While the prior "return;" skipped an overall
(newly needed) aggregate-unlock; the current "break;" skipped too
little.  Switch to a proper simple goto to almost but not quite
return;.

11 years agotestsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes
Frank Ch. Eigler [Mon, 8 Oct 2012 00:01:03 +0000 (20:01 -0400)]
testsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes

11 years agospec: lament the need for a few other -m32 prereqs that are hard to name
Frank Ch. Eigler [Sun, 7 Oct 2012 19:42:48 +0000 (15:42 -0400)]
spec: lament the need for a few other -m32 prereqs that are hard to name

11 years agostapdyn: Boost the comment ratio
Josh Stone [Sat, 6 Oct 2012 00:57:38 +0000 (17:57 -0700)]
stapdyn: Boost the comment ratio

There's no functional change here, just a lot of words...

11 years agostapdyn: Limit functions searches to the stap module
Josh Stone [Sat, 6 Oct 2012 00:02:56 +0000 (17:02 -0700)]
stapdyn: Limit functions searches to the stap module

This is slightly more efficient because we already know which object we
expect to have the functions, so we don't need to search the whole app.

* stapdyn/stapdyn.cxx (call_inferior_function): Take the BPatch_object
  in which we're searching for functions as a parameter.
  (instrument_uprobe_target, instrument_uprobes): Ditto.
  (dynamic_library_callback): Pass the stap dso from global.
  (main): Save the stap dso into a global, and pass it as needed.

11 years agostapdyn: track dlopened objects for probes
Josh Stone [Fri, 5 Oct 2012 23:27:27 +0000 (16:27 -0700)]
stapdyn: track dlopened objects for probes

* stapdyn/stapdyn.cxx (instrument_uprobe_target): New, factored out the
  code to write all the probes from one target to one object.
  (instrument_uprobes): Use instrument_uprobe_target for each.
  (dynamic_library_callback): New, identify if a new object is a target,
  and call instrument_uprobe_target if so.
  (find_uprobes): Fill the vector as a parameter, and then return a
  success status directly instead of floating the exception.
  (main): Register the dynamic_library_callback for dlopens.

11 years agoAUTHORS bump
Frank Ch. Eigler [Fri, 5 Oct 2012 23:38:54 +0000 (19:38 -0400)]
AUTHORS bump

11 years agostapdyn: implement more of dyninst/context.stp
Josh Stone [Fri, 5 Oct 2012 21:28:26 +0000 (14:28 -0700)]
stapdyn: implement more of dyninst/context.stp

Added cpu(), registers_valid(), uaddr(), and addr().

11 years agostapdyn: move the dumb lock inside c->busy checks
Josh Stone [Fri, 5 Oct 2012 20:45:51 +0000 (13:45 -0700)]
stapdyn: move the dumb lock inside c->busy checks

11 years agostapdyn: Give better -c example in NEWS
Josh Stone [Fri, 5 Oct 2012 18:30:09 +0000 (11:30 -0700)]
stapdyn: Give better -c example in NEWS

... better in that it doesn't show Dyninst breaking exceptions.
https://lists.cs.wisc.edu/archive/dyninst-api/2012/msg00096.shtml

11 years agoNEWS for stapdyn : kinda mention that -x is not yet actually supported for 2.0
Serguei Makarov [Fri, 5 Oct 2012 18:11:56 +0000 (14:11 -0400)]
NEWS for stapdyn : kinda mention that -x is not yet actually supported for 2.0

11 years agoPut the 'stapdyn_big_dumb_lock' back.
David Smith [Fri, 5 Oct 2012 18:15:17 +0000 (13:15 -0500)]
Put the 'stapdyn_big_dumb_lock' back.

* runtime/dyninst/runtime.h: Put the 'stapdyn_big_dumb_lock' back until
  the print buffers are properly multithreaded.

11 years ago(PR14637 partial fix) Improve stapdyn locking.
David Smith [Fri, 5 Oct 2012 17:52:43 +0000 (12:52 -0500)]
(PR14637 partial fix) Improve stapdyn locking.

* runtime/dyninst/runtime.h: Remove the 'stapdyn_big_dumb_lock' and make
  preempt_disable() and preempt_enable_no_resched() do nothing for
  dyninst.
* runtime/dyninst/tls_data.c: Change the mutex in tls_data_container_t to
  a rwlock.
  (_stp_tls_free_per_thread_ptr): Write lock the container before remove
  the object from the list (and reduce the amount of time the container is
  locked).
  (_stp_tls_get_per_thread_ptr): Write lock the container before adding
  the object from the list (and reduce the amount of time the container is
  locked).
* runtime/map.c (_stp_pmap_agg): Be sure to unlock the map in error
  conditions.
* runtime/pmap-gen.c (KEYSYM(_stp_pmap_get)): Be sure to unlock the
  container in an error condition.

11 years agodocumentation: mention .maxactive(NNN) / -DKRETACTIVE=NNN for .return probes
Frank Ch. Eigler [Fri, 5 Oct 2012 16:25:21 +0000 (12:25 -0400)]
documentation: mention .maxactive(NNN) / -DKRETACTIVE=NNN for .return probes

11 years agotapset: tweak function::tokenize man page to refer to "" rather than NULL
Frank Ch. Eigler [Fri, 5 Oct 2012 14:57:40 +0000 (10:57 -0400)]
tapset: tweak function::tokenize man page to refer to "" rather than NULL

11 years agoPR14573 (partial): Pass some registers into stapdyn
Josh Stone [Fri, 5 Oct 2012 02:04:14 +0000 (19:04 -0700)]
PR14573 (partial): Pass some registers into stapdyn

There doesn't seem to be a way to create and pass the pt_regs structure
from the Dyninst API, but we can still get most registers.  This patch
adds a new enter_dyninst_uprobe_regs() to receive registers and fill
them into a pt_regs from there.

XXX Dyninst is currently limited in how many individual function
arguments it can pass, so for now I'm cutting it down to the first 8.

* runtime/dyninst/stapdyn.h: Declare enter_dyninst_uprobe_regs.
* runtime/dyninst/uprobes.c: Implement it, filling all dwarf registers
  into a local struct pt_regs.
* runtime/dyninst/regs.c: Include regs.h to get SET_REG_IP.
* stapdyn/stapdyn.cxx (get_dwarf_registers): Create BPatch_snippets for
  as many of the DWARF registers as possible (bug-limited to 8).
  (instrument_uprobes): Look for the new entry function and use it.

11 years agostapdyn: Add a copy of the kernel's clamp_t
Josh Stone [Thu, 4 Oct 2012 23:42:26 +0000 (16:42 -0700)]
stapdyn: Add a copy of the kernel's clamp_t

This is used in a number of places for bounds checking.

11 years agostapdyn: #define simple_strtol strtol
Josh Stone [Thu, 4 Oct 2012 23:41:02 +0000 (16:41 -0700)]
stapdyn: #define simple_strtol strtol

... needed for tapset/string.stp:strtol()

11 years agoPR14179: Split up loc2c-runtime.h for linux|dyninst
Josh Stone [Thu, 4 Oct 2012 23:19:10 +0000 (16:19 -0700)]
PR14179: Split up loc2c-runtime.h for linux|dyninst

* runtime/loc2c-runtime.h: Remove deref functions and special register
  handling from this shared base, and rename k_dwarf_register_N to
  pt_dwarf_register_N to be more neutral.
* runtime/linux/loc2c-runtime.h: Move the deref functions and special
  register handling here.  Nothing new, just transplanted.
* runtime/dyninst/loc2c-runtime.h: Add deref and register functions.
* runtime/dyninst/copy.c (__copy_from_user, __copy_to_user): Move from
  linux_def.h, since these are custom implementations, not kernel copies.
  (_stp_strncpy_from_user, _stp_copy_from_user): New implementations.

11 years agoUse uread() in __STP_GET_USER
Josh Stone [Thu, 4 Oct 2012 23:03:23 +0000 (16:03 -0700)]
Use uread() in __STP_GET_USER

With uread, splitting 64-bit is already handled for ix86/arm, so we
don't have to repeat that code in user_int64().

11 years agoNEWS entry for PR11659 (being definitely noteworthy for 2.0)
Serguei Makarov [Thu, 4 Oct 2012 18:58:45 +0000 (14:58 -0400)]
NEWS entry for PR11659 (being definitely noteworthy for 2.0)

For the other plausible 2.0 news entries, going to wait a bit
for confirmation of noteworthiness.

11 years agoMark some tests as KFAIL.
Dave Brolley [Thu, 4 Oct 2012 16:56:30 +0000 (12:56 -0400)]
Mark some tests as KFAIL.

11 years agoCorrect the expected output of some tests.
Dave Brolley [Thu, 4 Oct 2012 16:56:08 +0000 (12:56 -0400)]
Correct the expected output of some tests.

11 years agoReport details of child exits due to signals
Josh Stone [Wed, 3 Oct 2012 20:55:37 +0000 (13:55 -0700)]
Report details of child exits due to signals

Our stap_waitpid reports signals as 128+n (like most shells).  We can
use that to recover the signal number and print strsignal too.

* util.cxx (stap_system): Split the exit notice for signals.
* remote.cxx (direct::finish): Ditto.

11 years agostapdyn: nullify the pagefault machinations for derefs
Josh Stone [Wed, 3 Oct 2012 19:59:15 +0000 (12:59 -0700)]
stapdyn: nullify the pagefault machinations for derefs

We don't need to care about pagefault safety in userspace, but the
definitions making those into preempt_disable led to recursing on
stapdyn_big_dumb_lock (going away in PR14571).  We can just #define
the pagefault_enable/disable away for the dyninst runtime.

11 years agolicense: change smileytap.svg's embedded license to GPLv2 + EPL1.0
Frank Ch. Eigler [Wed, 3 Oct 2012 19:17:47 +0000 (15:17 -0400)]
license: change smileytap.svg's embedded license to GPLv2 + EPL1.0

(This file is not actually packaged in systemtap RPMs.)

11 years agoPR13814: Note the relevant kernel commits, and allow >=3.4
Josh Stone [Wed, 3 Oct 2012 17:56:42 +0000 (10:56 -0700)]
PR13814: Note the relevant kernel commits, and allow >=3.4

11 years agocleanup -- proper version check for daddr_to_string() deprecation
Serguei Makarov [Wed, 3 Oct 2012 17:37:36 +0000 (13:37 -0400)]
cleanup -- proper version check for daddr_to_string() deprecation

11 years agoPR6580: properly-properly non-deprecate print_stack() et al.
Serguei Makarov [Wed, 3 Oct 2012 17:31:15 +0000 (13:31 -0400)]
PR6580: properly-properly non-deprecate print_stack() et al.

After consultation, the previous patch is probably a bit hasty.

11 years agoPR6580: properly deprecate print_stack() et al
Serguei Makarov [Wed, 3 Oct 2012 16:04:13 +0000 (12:04 -0400)]
PR6580: properly deprecate print_stack() et al

11 years agoPR13814: presume PR13193-override for kernel >3.4
Frank Ch. Eigler [Wed, 3 Oct 2012 00:55:10 +0000 (20:55 -0400)]
PR13814: presume PR13193-override for kernel >3.4

https://lkml.org/lkml/2012/3/5/124 fixed a kprobes bug, so we don't
have to pessimize kprobes on kernels that include that patch.

* staprun/staprun.c (disable_kprobes_optimization):
  Don't, on uname -r > 3.4.

11 years ago(PR14571 partial fix) Add dyninst pmap stat fixes.
David Smith [Tue, 2 Oct 2012 21:27:55 +0000 (16:27 -0500)]
(PR14571 partial fix) Add dyninst pmap stat fixes.

* runtime/pmap-gen.c (KEYSYM(_stp_pmap_tls_object_init)): Initialize the
  histogram parameters, in case this pmap contains a histogram.
  (KEYSYM(_stp_pmap_new)): For dyninst, override the tls data object init
  function.

11 years agoNEWS entry for %( systemtap_privilege %? ...
Serguei Makarov [Tue, 2 Oct 2012 20:32:52 +0000 (16:32 -0400)]
NEWS entry for %( systemtap_privilege %? ...

11 years agoPR13693 groundwork: basic testcase for %( systemtap_privilege
Serguei Makarov [Tue, 2 Oct 2012 20:29:18 +0000 (16:29 -0400)]
PR13693 groundwork: basic testcase for %( systemtap_privilege

11 years agoBug 860750 - stapusr user not able to run modules compiled and signed by the server
Dave Brolley [Tue, 2 Oct 2012 19:39:09 +0000 (15:39 -0400)]
Bug 860750 - stapusr user not able to run modules compiled and signed by the server

- When #ifndef HAVE_ELF_GETSHDRSTRNDX is true, then there is insufficient
  ELF support to examine a signed systemtap module in order to determine the
  privilege credentials required to run it. In this case, staprun should behave
  like an older, multi-privilege-level-unaware, staprun and load the module for
  stapusr and above. Since we know that it has been correctly signed, the module
  is either an old dual-privilege module compiled fopr stapusr (ok), or it is
  a new multi-privilege-enabled module compiled for stapusr or stapsys. In this
  case, the module's internal self check will determine whether the user actually has
  the required credentials. The module will abort if the user does not have the
  required credentials.

- Small bug in translating the user's privilege credential mask to a string.

11 years agoEnsure that all err() messages end in a newline.
Dave Brolley [Wed, 26 Sep 2012 19:49:32 +0000 (15:49 -0400)]
Ensure that all err() messages end in a newline.

11 years agostapdyn: Make sure dyninst probes have a pt_regs
Josh Stone [Tue, 2 Oct 2012 19:00:39 +0000 (12:00 -0700)]
stapdyn: Make sure dyninst probes have a pt_regs

loc2c-generated code assumes pt_regs are available, so use a dummy
struct to make sure we always have *something* for it to dereference.

11 years agostapdyn: Fork output from stdout/stderr
Josh Stone [Tue, 2 Oct 2012 18:23:48 +0000 (11:23 -0700)]
stapdyn: Fork output from stdout/stderr

We're still using the target's stdio (PR14491), but we're now using
separate FILE handles to do it, so we're not affected by the target
closing its own stdout early.

* runtime/dyninst/io.c (_stp_out, _stp_err): Private FILE handles.
  (_stp_clone_file): Clone a FILE handle, also setting FD_CLOEXEC.
  (_stp_warn, _stp_error, _stp_softerror, _stp_dbug): Use _stp_err.
* runtime/dyninst/print.c )_stp_print_flush): Use _stp_err and _stp_out.
* runtime/dyninst/runtime.h (stp_dyninst_ctor): Clone stderr and stdout.
  (stp_dyninst_dtor): Close _stp_err and _stp_out.

11 years agostapdyn: Don't silence pass-4 gcc errors
Josh Stone [Tue, 2 Oct 2012 17:55:26 +0000 (10:55 -0700)]
stapdyn: Don't silence pass-4 gcc errors

* buildrun.cxx (compile_dyninst): Just as compile_pass() always shows
  error output from Kbuild, we should always show gcc errors from
  compiling dyninst modules too.

11 years agostapdyn: Use FD_CLOEXEC on _stp_mem_fd instead of O_CLOEXEC
Josh Stone [Tue, 2 Oct 2012 17:55:19 +0000 (10:55 -0700)]
stapdyn: Use FD_CLOEXEC on _stp_mem_fd instead of O_CLOEXEC

O_CLOEXEC is only available since Linux 2.6.23, which is fairly old, but
we may still care to run on such systems.  Using fcntl FD_CLOEXEC can
accomplish the same thing, and we don't need to worry about the race of
other threads calling exec at the same time as our module load, because
the whole process will be frozen.

11 years agoFix stap.1 typo in aggregate example.
David Smith [Tue, 2 Oct 2012 18:33:51 +0000 (13:33 -0500)]
Fix stap.1 typo in aggregate example.

11 years agoPR11424: remove obsolete nodwf tests, now that nodwf works better
Frank Ch. Eigler [Tue, 2 Oct 2012 16:02:06 +0000 (12:02 -0400)]
PR11424: remove obsolete nodwf tests, now that nodwf works better

11 years agoPR14650: combine more userspace-deref functions
Frank Ch. Eigler [Tue, 2 Oct 2012 13:53:54 +0000 (09:53 -0400)]
PR14650: combine more userspace-deref functions

* runtime/linux/copy.c: Move out _stp_read_address definition.
  (__stp_strncpy_from_user): Simply accept vicarious protection
  from caller _stp_strncpy_from_user.
  (_stp_copy_from_user): Protect more.
* runtime/stp_string.c (_stp_text_str): Use _stp_read_address
  instead of barenaked __stp_get_user.
* runtime/stp_string.h (__stp_get_user): Simplify; now only for
  use by ...
  (_stp_read_address): Moved here.

11 years agotestsuite: make sure conversions.exp test cases don't fail due to MAXSKIPPED
Frank Ch. Eigler [Tue, 2 Oct 2012 13:53:24 +0000 (09:53 -0400)]
testsuite: make sure conversions.exp test cases don't fail due to MAXSKIPPED

11 years ago(PR14574 partial fix) Make the systemtap.maps/*.exp tests use dyninst also.
David Smith [Tue, 2 Oct 2012 15:04:05 +0000 (10:04 -0500)]
(PR14574 partial fix) Make the systemtap.maps/*.exp tests use dyninst also.

* testsuite/systemtap.maps/absentstats.exp: Added dyninst testing.
* testsuite/systemtap.maps/elision.exp: Ditto.
* testsuite/systemtap.maps/exists.exp: Ditto.
* testsuite/systemtap.maps/foreach_fail.exp: Ditto.
* testsuite/systemtap.maps/foreach_limit.exp: Ditto.
* testsuite/systemtap.maps/foreach_limit2.exp: Ditto.
* testsuite/systemtap.maps/hist_in_string.exp: Ditto.
* testsuite/systemtap.maps/ii.exp: Ditto.
* testsuite/systemtap.maps/iiiiii.exp: Ditto.
* testsuite/systemtap.maps/is.exp: Ditto.
* testsuite/systemtap.maps/ix.exp: Ditto.
* testsuite/systemtap.maps/ix_clear.exp: Ditto.
* testsuite/systemtap.maps/ix_clear2.exp: Ditto.
* testsuite/systemtap.maps/ix_clear3.exp: Ditto.
* testsuite/systemtap.maps/ix_hist.exp: Ditto.
* testsuite/systemtap.maps/linear.exp: Ditto.
* testsuite/systemtap.maps/linear_0.exp: Ditto.
* testsuite/systemtap.maps/linear_bad.exp: Ditto.
* testsuite/systemtap.maps/linear_empty.exp: Ditto.
* testsuite/systemtap.maps/linear_large.exp: Ditto.
* testsuite/systemtap.maps/linear_large_neg.exp: Ditto.
* testsuite/systemtap.maps/linear_nearlyempty.exp: Ditto.
* testsuite/systemtap.maps/linear_neg.exp: Ditto.
* testsuite/systemtap.maps/linear_over.exp: Ditto.
* testsuite/systemtap.maps/linear_overunder.exp: Ditto.
* testsuite/systemtap.maps/linear_under.exp: Ditto.
* testsuite/systemtap.maps/log.exp: Ditto.
* testsuite/systemtap.maps/log_edge.exp: Ditto.
* testsuite/systemtap.maps/map_hash.exp: Ditto.
* testsuite/systemtap.maps/map_wrap.exp: Ditto.
* testsuite/systemtap.pass1-4/debugtypes.exp: Ditto.

11 years agoNEWS entry for PR13693
Serguei Makarov [Tue, 2 Oct 2012 14:57:42 +0000 (10:57 -0400)]
NEWS entry for PR13693

11 years agoNEWS entry for PR6580
Serguei Makarov [Tue, 2 Oct 2012 14:48:20 +0000 (10:48 -0400)]
NEWS entry for PR6580

11 years ago(PR14571 partial fix) Correctly handle maps with limited entries.
David Smith [Tue, 2 Oct 2012 14:56:42 +0000 (09:56 -0500)]
(PR14571 partial fix) Correctly handle maps with limited entries.

* translate.cxx (mapvar::init): Remove hardcoded 'wrap' initialization and
  let _stp_map_new() initialize 'wrap'.
* runtime/map.c (_stp_map_init): Set new 'wrap' parameter in map itself.
  (_stp_map_new): Pass new 'wrap' parameter down to _stp_map_init().
  (_stp_map_tls_object_init): Pass cached 'wrap' field to _stp_map_init().
  (_stp_pmap_new): Pass new 'wrap' parameter down to _stp_map_init().
* runtime/map.h: Update function prototypes with new 'wrap' parameter.
* runtime/map-gen.c (KEYSYM(_stp_map_new)): Pass new 'wrap' parameter down
  to the correct _stp_map_new* function.
* runtime/pmap-gen.c (KEYSYM(_stp_pmap_new)): Pass new 'wrap' parameter
  down to the correct _stp_pmap_new* function
* runtime/map-stat.c (_stp_map_new_hstat_log): Pass new 'wrap' parameter
  down to _stp_map_new().
  (_stp_map_new_hstat_linear): Ditto.
  (_stp_pmap_new_hstat_linear): Ditto.
  (_stp_pmap_new_hstat_log): Ditto.

11 years agoPR14555, replace kernel symbol "_stext" by a macro in runtime/k_syms.h
Alexander Lochmann [Mon, 1 Oct 2012 22:42:15 +0000 (18:42 -0400)]
PR14555, replace kernel symbol "_stext" by a macro in runtime/k_syms.h

The macro is used by the runtime as well as the compilation
components. It is not guaranteed that this symbol is always called
"_stext" on all archtitectures. On powerpc64 for example its name is
".__start". Stap will not run on other architectures where this symbol
has a different name because the lookup for "_stext" will fail.

Adjusted by <fche> to leave _stext as the relocation pseudo-section
name as used by relocation basis code, and parametrizing only
symbol names.

11 years agostap.1 - get rid of inevitably-outdated list of unprivileged functions
Serguei Makarov [Mon, 1 Oct 2012 21:12:03 +0000 (17:12 -0400)]
stap.1 - get rid of inevitably-outdated list of unprivileged functions

11 years agostap.1 - document myproc-unprivileged PR6580 tapset functions
Serguei Makarov [Mon, 1 Oct 2012 19:06:22 +0000 (15:06 -0400)]
stap.1 - document myproc-unprivileged PR6580 tapset functions

11 years agoPR6580: transition to new print_syms() functions
Serguei Makarov [Mon, 1 Oct 2012 18:14:44 +0000 (14:14 -0400)]
PR6580: transition to new print_syms() functions

11 years agoPR6580: more descriptive names for psyms() et al.
Serguei Makarov [Mon, 1 Oct 2012 15:01:34 +0000 (11:01 -0400)]
PR6580: more descriptive names for psyms() et al.

11 years agoFix the return value of get_self_path()
Josh Stone [Mon, 1 Oct 2012 05:26:43 +0000 (22:26 -0700)]
Fix the return value of get_self_path()

The 'buf' only has a good value if readlink succeeded, but the 'file'
also still points to the fallback original value on failure.

11 years agotestsuite stap_run_batch don't add an extra empty argument.
Mark Wielaard [Sun, 30 Sep 2012 21:44:28 +0000 (23:44 +0200)]
testsuite stap_run_batch don't add an extra empty argument.

commit 8c94ef made it possible to add extra arguments to stap_run_batch.
But we must make sure we don't accidentially add an extra empty argument.
Some testcases like parseok/fourteen.stp depend on @# being zero.

11 years agoparse.cxx: Handle EOF while expecting brackets after if keyword correctly.
Mark Wielaard [Sun, 30 Sep 2012 21:23:55 +0000 (23:23 +0200)]
parse.cxx: Handle EOF while expecting brackets after if keyword correctly.

See parseko/probepoint08.stp for an example.

11 years agomemory.stp: do_mmap was replaced by vm_mmap.
Mark Wielaard [Sun, 30 Sep 2012 16:12:19 +0000 (18:12 +0200)]
memory.stp: do_mmap was replaced by vm_mmap.

do_mmap was completely replaced by vm_mmap, so if either is a good match
for the vm.mmap probe alias. See kernel commits 6be5ceb and dc98250.
(Note, do_mmap2 is a special case just for powerpc.)

do_munmap was partially replaced by vm_munmap, but vm_munmap calls
though do_munmap, so for the vm.munmap probe alias do_munmap is the
best match. See kernel commits a46ef99 and 17d1587.

The same is true for do_brk and vm_brk, vm_brk calls through do_brk,
so for the vm.brk probe alias do_brk is the function to probe. See
kernel commit e4eb1ff.

11 years agonfsservctl syscall was removed in kernel 3.0/2.6.40.
Mark Wielaard [Sun, 30 Sep 2012 12:11:07 +0000 (14:11 +0200)]
nfsservctl syscall was removed in kernel 3.0/2.6.40.

See kernel commits 49b2868 and d4d7b2a.

This used to resolve partly before because when CONFIG_COMPAT = "y"
there would still be a compat_sys_nfsservctl. But that was slightly
bogus because without CONFIG_NFSD that would just be:

long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2)
{
       return sys_ni_syscall();
}

11 years agoparser::parse_global(): break after seeing a termination token.
Mark Wielaard [Sat, 29 Sep 2012 17:13:47 +0000 (19:13 +0200)]
parser::parse_global(): break after seeing a termination token.

The code would swallow the terminating token and then inspect whether it
was a ','. Which it obviously wasn't since we had just seen that it was
a ';'.

11 years agoAdd get_self_path() as workaround for running under valgrind.
Mark Wielaard [Fri, 28 Sep 2012 21:16:18 +0000 (23:16 +0200)]
Add get_self_path() as workaround for running under valgrind.

get_base_hash() wants to get some stats of the main binary. But when
running under valgind a stat call on /proc/self/exe actually gives
the stats of the valgrind process binary. Using readlink before calling
stat works around that (readlink is intercepted by valgrind, stat isn't).
Add get_self_path to util.cxx.

11 years agoPR14642 pfiles.stp: Use test_bit directly instead of FD_ISSET.
Mark Wielaard [Sat, 29 Sep 2012 08:24:38 +0000 (10:24 +0200)]
PR14642 pfiles.stp: Use test_bit directly instead of FD_ISSET.

FD_ISSET might not be defined on all kernels.

11 years agostapdyn: Clean up error/warning/log messages
Josh Stone [Sat, 29 Sep 2012 01:29:40 +0000 (18:29 -0700)]
stapdyn: Clean up error/warning/log messages

* stapdyn/stapdyn.cxx (staplog, stapwarn, staperror): New ostream
  functions that allow common prefixes, log levels, and suppressed
  warnings.  All appropriate clog's are updated to these.
* buildrun.cxx (make_dyninst_run_command): Set -v and -w options.

11 years agostapdyn: runtime build fixes following PR14364
Josh Stone [Sat, 29 Sep 2012 01:27:20 +0000 (18:27 -0700)]
stapdyn: runtime build fixes following PR14364

* runtime/dyninst/linux_defs.h: Add noinline.
* runtime/dyninst/runtime.h: Nullify get_fs/set_fs machinery.

11 years agoPR14364: fix s390 oversight
Frank Ch. Eigler [Fri, 28 Sep 2012 22:59:54 +0000 (18:59 -0400)]
PR14364: fix s390 oversight

* runtime/loc2c-runtime.h (s390: _stp_deref, _stp_store_deref):
  Add in missing lookup_bad_addr check.

Found-By-Mr.-Eagle-Eye: Josh Stone <jistone@redhat.com>

11 years agostapdyn: Use program_invocation_short_name
Josh Stone [Fri, 28 Sep 2012 21:46:48 +0000 (14:46 -0700)]
stapdyn: Use program_invocation_short_name

I had previously added a global "program" with basename(argv[0]), but
GNU already provides program_invocation_short_name with the same.

11 years agostapdyn: Make sure the module has a path component
Josh Stone [Fri, 28 Sep 2012 21:42:14 +0000 (14:42 -0700)]
stapdyn: Make sure the module has a path component

We don't ever want library-path searching for the probe module, but
that's what dlopen will do if there's no '/' in the filename.

* stapdyn/stapdyn.cxx (main): If the module has no path component, give
  it the minimum "./" leader.

11 years agostapdyn: Check and report the child exit status
Josh Stone [Fri, 28 Sep 2012 21:28:13 +0000 (14:28 -0700)]
stapdyn: Check and report the child exit status

* stapdyn/dynutil.cxx (check_dyninst_exit): New, check how the given
  BPatch_process exited, and report failures.
* stapdyn/stapdyn.cxx (main): Use check_dyninst_exit.
* stapdyn/dynsdt.cxx (main): Use check_dyninst_exit.

11 years agoPR14364, PR14630: Use set_fs and pagefault_disable/enable around more accesses
Frank Ch. Eigler [Fri, 28 Sep 2012 19:35:18 +0000 (15:35 -0400)]
PR14364, PR14630: Use set_fs and pagefault_disable/enable around more accesses

It turns out there are a bunch of conceptually overlapping
functions/macros throughout the runtime, each of which attempts to
dereference untrustworthy kernel- or user-space pointers, in slightly
different ways.

When deliberately invoked with bad pointer values, some lockdep
kernels (e.g. 2.6.32-279.9.1.el6.x86_64.debug) would emit errors about
page-fault handling paths being triggered in inappropriate contexts
for some of these lookup functions.  It turns out a more robust
control of address space checking and fault suppression is necessary.

* runtime/linux/autoconf-pagefault_disable.c: New test.
* buildrun.cxx (compile_pass): Run it.
* runtime/linux/copy.c (_stp_read_address): Add pagefault_{disable,enable}.
  Note duplication with loc2c-runtime.h
  (_stp_strncpy_from_user): Add set_fs & pagefault_{disable,enable}.
  Note duplication with loc2c-runtime.h
* runtime/stp_string.h (__stp_get_user): Wrap in pagefault_{disable,enable}.
  Note duplication with loc2c-runtime.h
* tapset/uconversions.stp (__STP_GET_USER): Instead of __stp_get_user,
  zap duplication with loc2c-runtime.h and just call loc2c-runtime.h.
* runtime/loc2c-runtime.h (STAPCONF_PAGEFAULT_DISABLE): Add dummy
  macros for pre-rhel5 kernels.
  (_stp_deref, _stp_store_deref): Revamped arch-specific macros, setting
  segments and disabling pagefaults.
  (uderef,ustore_deref,kderef,kstore_deref): Revamped macros to call the
  above.  These should become the standard throughout the runtime/tapset.

11 years agoruntime: fix uninitialized-variable warning
Frank Ch. Eigler [Fri, 28 Sep 2012 19:07:56 +0000 (15:07 -0400)]
runtime: fix uninitialized-variable warning

* runtime/stack.c (_stp_stack_kernel_get): Initialize pc = 0.
  (_stp_stack_user_get): Ditto.

11 years agoruntime: add noinline to *printf fns to limit frame-size errors
Frank Ch. Eigler [Fri, 28 Sep 2012 18:57:46 +0000 (14:57 -0400)]
runtime: add noinline to *printf fns to limit frame-size errors

During the debugging work for PR14630, it turned out to trigger these
warning->errors.  Some noinline's, and one or two static[]'s,
<south park>.... and it's gone!</>

11 years agoPR14630 part 1: make addr-map take irq-blocking locks
Frank Ch. Eigler [Fri, 28 Sep 2012 18:35:40 +0000 (14:35 -0400)]
PR14630 part 1: make addr-map take irq-blocking locks

Implicated by several OOPS messages, complaining about normal locks
being manipulated in atomic contexts.

* runtime/linux/addr-map.c (*): Lock addr_map_lock with
  irqsave/restore variant calls.

11 years agoPR13693 groundwork: document the %( systemtap_privilege ... %) conditional
Serguei Makarov [Fri, 28 Sep 2012 21:16:16 +0000 (17:16 -0400)]
PR13693 groundwork: document the %( systemtap_privilege ... %) conditional

11 years agoPR13693: correct behaviour for --privilege=stapsys.
Serguei Makarov [Fri, 28 Sep 2012 21:05:18 +0000 (17:05 -0400)]
PR13693: correct behaviour for --privilege=stapsys.

11 years agoPR13693: allow unprivileged use of probefunc().
Serguei Makarov [Fri, 28 Sep 2012 19:27:20 +0000 (15:27 -0400)]
PR13693: allow unprivileged use of probefunc().

11 years agocleanup in context-symbols.stp: get rid of redundant range check before the one in...
Serguei Makarov [Fri, 28 Sep 2012 19:26:04 +0000 (15:26 -0400)]
cleanup in context-symbols.stp: get rid of redundant range check before the one in __stack_raw().

11 years agoPR13693 groundwork: allow conditional compilation based on script privilege level.
Serguei Makarov [Fri, 28 Sep 2012 19:24:17 +0000 (15:24 -0400)]
PR13693 groundwork: allow conditional compilation based on script privilege level.

11 years agoPR14489: Revamp stapdyn probe metadata
Josh Stone [Fri, 28 Sep 2012 00:55:05 +0000 (17:55 -0700)]
PR14489: Revamp stapdyn probe metadata

Rather than having a fixed data structure for stapdyn to read from the
module, now stapdyn queries the module dynamically for its data.  Thus,
we dlopen the module within stapdyn, then dlsym a few query functions
and use those to enumerate all of the probe data.

* runtime/dyninst/stapdyn.h: Add functions for metadata.
* runtime/dyninst/uprobes.h: New, define module internal datastructures.
* runtime/dyninst/uprobes.c: Implement the metadata functions.
* tapsets.cxx: Generate probe metadat in the new datastructures.
* stapdyn/stapdyn.cxx: Query probes using the new functions.
* stapdyn/Makefile.am: No longer need -lelf for stapdyn.
* stapdyn/Makefile.in: Regenerate.

11 years agoPR14574: Let stapdyn run without a target command
Josh Stone [Thu, 27 Sep 2012 20:25:30 +0000 (13:25 -0700)]
PR14574: Let stapdyn run without a target command

For easier testing, let begin/end/error probes run directly in stapdyn
when there's no -c option given.

* runtime/dyninst/stapdyn.h: New, declare functions defined in the
  module and used by stapdyn.
* runtime/dyninst/runtime.h: Include stapdyn.h so definitions match.
* stapdyn/stapdyn.cxx: When no command is given, dlsym the init/exit
  functions and run them directly.
* (autoreconf...)

11 years agostapdyn: open /proc/self/mem with O_CLOEXEC
Josh Stone [Thu, 27 Sep 2012 19:23:18 +0000 (12:23 -0700)]
stapdyn: open /proc/self/mem with O_CLOEXEC

11 years agohash: Include several subdirectories of the runtime
Josh Stone [Thu, 27 Sep 2012 18:42:03 +0000 (11:42 -0700)]
hash: Include several subdirectories of the runtime

One advantage of having the runtime path in the hash is its mtime also
tells us when any files were modified (at least with most editors that
write a temp file then atomically rename).  For stap hackers like
myself, it would be nice to get this benefit for subdirectories of the
runtime too, so let's also add those to the hash.

* hash.cxx (get_base_hash): Add /transport, /unwind, and either /dyninst
  or /linux depending on the current runtime mode.
  (find_uprobes_hash): Update the uprobes paths since PR14179's move.

11 years agoPR13486: Always output a frame_base if needed
Josh Stone [Thu, 27 Sep 2012 16:19:39 +0000 (09:19 -0700)]
PR13486: Always output a frame_base if needed

Previously, loc2c only emitted code for frame_base if it was on the
first loc of the chain.  But in some cases, the first piece may not
reference the frame_base while later parts do.

In the cases found in the bug, the first piece was GNU_implicit_pointer,
which doesn't even emit code of its own.  But its target DIE did need
the frame_base to compute its value.  Since loc2c didn't realize that,
we ended up emitting code using frame_base without ever declaring it.

* loc2c.c (c_emit_location): Loop over the whole loc chain to determine
  if a frame_base is needed, and output the first one found.

11 years agostapdyn: Resolve the target executable from the PATH
Josh Stone [Wed, 26 Sep 2012 22:17:10 +0000 (15:17 -0700)]
stapdyn: Resolve the target executable from the PATH

BPatch::processCreate needs a full path for the process argument, so we
need to walk the PATH to figure that out.  We already did this in
dynsdt, but using a private function.  Now both use find_executable from
util.h, in a new form that doesn't care about sysroots.

* util.cxx (find_executable): Add a name-only version that just wraps
  the full sysroot version, for convenience.  Also let a few more things
  be const in the implementation.
* hash.cxx (get_base_hash): Use the wrapper function for finding gcc,
  instead of having a "dummy" sysenv itself.
* stapdyn/stapdyn.cxx (main): Resolve the target with find_executable.
* stapdyn/dynsdt.cxx (resolve_path): Removed.
  (main): Use find_executable instead.

11 years agoPR13693 yet more typo fix: more precise version check.
Serguei Makarov [Wed, 26 Sep 2012 21:27:41 +0000 (17:27 -0400)]
PR13693 yet more typo fix: more precise version check.

11 years agoPR13693 groundwork: appropriate pure/privileged pragmas for stack(), ustack().
Serguei Makarov [Wed, 26 Sep 2012 20:56:17 +0000 (16:56 -0400)]
PR13693 groundwork: appropriate pure/privileged pragmas for stack(), ustack().

11 years agoPR13693: typofix previous commit (yes, the change is tested).
Serguei Makarov [Wed, 26 Sep 2012 20:24:26 +0000 (16:24 -0400)]
PR13693: typofix previous commit (yes, the change is tested).

11 years agoPR13693 groundwork: rewrite probefunc() solely in terms of [u]symname([u]stack(0)).
Serguei Makarov [Wed, 26 Sep 2012 20:09:49 +0000 (16:09 -0400)]
PR13693 groundwork: rewrite probefunc() solely in terms of [u]symname([u]stack(0)).

11 years ago(PR14574 partial fix) Make the systemtap.pass1-4/*.exp tests use dyninst also.
David Smith [Wed, 26 Sep 2012 19:31:31 +0000 (14:31 -0500)]
(PR14574 partial fix) Make the systemtap.pass1-4/*.exp tests use dyninst also.

* testsuite/lib/systemtap.exp (print_systemtap_version): New function.
  (get_runtime_list): Ditto.
  (setup_systemtap_environment): Remember whether we've got dyninst
  support.
  (stap_run_batch): Allow passing args and the filename.
* testsuite/systemtap.pass1-4/buildok-dyninst.exp: New test.
* testsuite/systemtap.pass1-4/buildko.exp: Add dyninst support.
* testsuite/systemtap.pass1-4/parseko.exp: Ditto.
* testsuite/systemtap.pass1-4/parseok.exp: Ditto.
* testsuite/systemtap.pass1-4/semko.exp: Ditto.
* testsuite/systemtap.pass1-4/semok.exp: Ditto.
* testsuite/systemtap.pass1-4/transko.exp: Ditto.
* testsuite/systemtap.pass1-4/transok.exp: Ditto.
* testsuite/buildok/cmdline01.stp: Allow extra args to be passed in.
* testsuite/buildok/fortytwo.stp: Ditto.
* testsuite/buildok/oldlocals01.stp: Ditto.
* testsuite/buildok/scsi-detailed.stp: Ditto.
* testsuite/buildok/thirtythree.stp: Ditto.
* testsuite/buildok/thirtytwo.stp: Ditto.
* testsuite/parseko/bad_tapset.stp: Ditto.
* testsuite/parseko/cmdline02.stp: Ditto.
* testsuite/parseko/cmdline03.stp: Ditto.
* testsuite/parseko/cmdline04.stp: Ditto.
* testsuite/parseko/cmdline06.stp: Ditto.
* testsuite/parseko/cmdline07.stp: Ditto.
* testsuite/parseko/cmdline08.stp: Ditto.
* testsuite/parseko/cmdline15.stp: Ditto.
* testsuite/parseko/cmdline22.stp: Ditto.
* testsuite/parseko/deprecated01.stp: Ditto.
* testsuite/parseko/preprocess13.stp: Ditto.
* testsuite/parseko/preprocess16.stp: Ditto.
* testsuite/parseko/preprocess17.stp: Ditto.
* testsuite/parseko/twentyseven.stp: Ditto.
* testsuite/parseko/twentythree.stp: Ditto.
* testsuite/parseok/all_tapsets.stp: Ditto.
* testsuite/parseok/bad_tapset.stp: Ditto.
* testsuite/parseok/cmdline01.stp: Ditto.
* testsuite/parseok/cmdline02.stp: Ditto.
* testsuite/parseok/deprecated01.stp: Ditto.
* testsuite/parseok/fourteen.stp: Ditto.
* testsuite/parseok/macros05.stp: Ditto.
* testsuite/parseok/macros08.stp: Ditto.
* testsuite/parseok/nineteen.stp: Ditto.
* testsuite/parseok/semko.stp: Ditto.
* testsuite/parseok/unparser.stp: Ditto.
* testsuite/semko/fifty.stp: Ditto.
* testsuite/semko/nodwf01.stp: Ditto.
* testsuite/semko/nodwf02.stp: Ditto.
* testsuite/semko/nodwf03.stp: Ditto.
* testsuite/semko/nodwf04.stp: Ditto.
* testsuite/semko/nodwf05.stp: Ditto.
* testsuite/semko/nodwf06.stp: Ditto.
* testsuite/semko/nodwf07.stp: Ditto.
* testsuite/semko/nodwf08.stp: Ditto.
* testsuite/semko/nodwf09.stp: Ditto.
* testsuite/semko/plt2.stp: Ditto.
* testsuite/semko/target_lvalue.stp: Ditto.
* testsuite/semok/args.stp: Ditto.
* testsuite/semok/badvar.stp: Ditto.
* testsuite/semok/badvar_undefined.stp: Ditto.
* testsuite/semok/bz11911.stp: Ditto.
* testsuite/semok/defined_list_vars.stp: Ditto.
* testsuite/semok/eight.stp: Ditto.
* testsuite/semok/nine.stp: Ditto.
* testsuite/semok/nodwf01.stp: Ditto.
* testsuite/semok/nodwf02.stp: Ditto.
* testsuite/semok/nodwf03.stp: Ditto.
* testsuite/semok/nodwf04.stp: Ditto.
* testsuite/semok/nodwf05.stp: Ditto.
* testsuite/semok/nodwf06.stp: Ditto.
* testsuite/semok/nodwf07.stp: Ditto.
* testsuite/semok/plt2.stp: Ditto.
* testsuite/semok/pr11808.stp: Ditto.
* testsuite/semok/pr11809.stp: Ditto.
* testsuite/semok/syscall_return.stp: Ditto.
* testsuite/semok/transko.stp: Ditto.
* testsuite/semok/twenty.stp: Ditto.
* testsuite/semok/twentyfive.stp: Ditto.
* testsuite/transok/buildko.stp: Ditto.
* testsuite/transok/eleven.stp: Ditto.

11 years agoTypo fix for earlier probe_type enum commit (commit cda141c).
Serguei Makarov [Wed, 26 Sep 2012 19:24:25 +0000 (15:24 -0400)]
Typo fix for earlier probe_type enum commit (commit cda141c).

11 years agotestsuite: set $SYSTEMTAP_SYNC
Frank Ch. Eigler [Wed, 26 Sep 2012 17:41:54 +0000 (13:41 -0400)]
testsuite: set $SYSTEMTAP_SYNC

For helping diagnose crashes that may occur during a testsuite,
set $SYSTEMTAP_SYNC, which is handled by staprun, just before it
does the module-insertion.  This will make tests slower, sorry.

* testsuite/Makefile.am (RUNTEST): Add env SYSTEMTAP_SYNC=yes.
* testsuite/Makefile.in: Regenerated with love.

11 years agoPR6580: tweak psyms() et al output format to satisfy exelib.exp.
Serguei Makarov [Wed, 26 Sep 2012 16:36:02 +0000 (12:36 -0400)]
PR6580: tweak psyms() et al output format to satisfy exelib.exp.

11 years agoPR6580: detailed docstrings for updated tapset functions.
Serguei Makarov [Tue, 25 Sep 2012 15:29:36 +0000 (11:29 -0400)]
PR6580: detailed docstrings for updated tapset functions.

11 years agostapdyn: Enable end/error probes
Josh Stone [Mon, 24 Sep 2012 23:15:55 +0000 (16:15 -0700)]
stapdyn: Enable end/error probes

The dyninst exit hook runs too late for us to still call anything in the
mutatee, so the systemtap_module_exit() call which should run all of the
end/error probes wasn't happening.

Now we use a destructor function in the mutatee, so our exit path always
runs after main() returns or after an exit() call.  Functions like
_exit() are still problematic though.

This now also makes a distinction between initializing process-local vs.
session resources, so we are more ready for operating with multiple
mutatees at once.  See dyninst/runtime.h for design comments.

11 years agoPR14611: enable PR9740 workaround only for kernel 2.6.23 - 2.6.29ish
Frank Ch. Eigler [Mon, 24 Sep 2012 19:21:00 +0000 (15:21 -0400)]
PR14611: enable PR9740 workaround only for kernel 2.6.23 - 2.6.29ish

11 years agostaplog.c: Use tighter #if / #elif chain for crash/defs ARCH #defines
Frank Ch. Eigler [Mon, 24 Sep 2012 13:25:58 +0000 (09:25 -0400)]
staplog.c: Use tighter #if / #elif chain for crash/defs ARCH #defines

Just to make doubly triple-sure that no more than one of the macros gets set.

11 years agocommon_probe_context cleanup: make probe_type an enum
Serguei Makarov [Fri, 21 Sep 2012 20:05:23 +0000 (16:05 -0400)]
common_probe_context cleanup: make probe_type an enum

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); ...

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