]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years agoruntime: Use single allocation for stapdyn maps again
Josh Stone [Sat, 8 Dec 2012 01:06:40 +0000 (17:06 -0800)]
runtime: Use single allocation for stapdyn maps again

The kernel maps are left as-is, but I remembered a good reason why I
wanted large allocations for stapdyn.  As explained in _stp_pmap_new:

    The reason for this is that we're allocating in the shared memory
    mmap, which may have to move locations in order to grow.  If some
    smaller unit of the pmap allocation were to cause the whole thing to
    move, then we'd lose track of the prior allocations.

    Once returned from here, we'll always access the pmap via the global
    shared memory base.  So if other map/pmap/stat/etc. allocations
    cause it to move later, that's ok.

We're not *actually* using a shared memory mmap quite yet, but we're
almost there, I promise...

11 years agoPR14929: add a reference from stap.1 to error::reporting.7stap
Frank Ch. Eigler [Sat, 8 Dec 2012 07:35:14 +0000 (02:35 -0500)]
PR14929: add a reference from stap.1 to error::reporting.7stap

11 years agoNEWS: add some blurbage
Frank Ch. Eigler [Sat, 8 Dec 2012 07:31:33 +0000 (02:31 -0500)]
NEWS: add some blurbage

11 years agoPR14929: tweak error->man page reference blurb, add a few starters
Frank Ch. Eigler [Sat, 8 Dec 2012 07:21:33 +0000 (02:21 -0500)]
PR14929: tweak error->man page reference blurb, add a few starters

* man/error::*: new man pages.
* man/Makefile.am: Install them.
* main.cxx, parse.cxx, session.cxx: Tweak message wording.  Add message
  for pass-4 (build) failure.

11 years agostap-report: add dyninst & avahi to RPM version query
Frank Ch. Eigler [Sat, 8 Dec 2012 07:21:00 +0000 (02:21 -0500)]
stap-report: add dyninst & avahi to RPM version query

11 years agoPR12443/testsuite: unset XDG_DATA_DIRS before invoking testsuite
Frank Ch. Eigler [Sat, 8 Dec 2012 06:25:05 +0000 (01:25 -0500)]
PR12443/testsuite: unset XDG_DATA_DIRS before invoking testsuite

11 years agoruntime: clean up obsolete map declarations
Josh Stone [Sat, 8 Dec 2012 00:00:17 +0000 (16:00 -0800)]
runtime: clean up obsolete map declarations

11 years agoruntime: Make a pointer-free Stat for stapdyn
Josh Stone [Fri, 7 Dec 2012 23:27:40 +0000 (15:27 -0800)]
runtime: Make a pointer-free Stat for stapdyn

Similar to what was done for maps, add offptr_t indirection in
struct _Stat to make these suitable for shared memory.

11 years agoPR14929: move man pages under man/
Frank Ch. Eigler [Fri, 7 Dec 2012 19:48:58 +0000 (14:48 -0500)]
PR14929: move man pages under man/

Just a plain file move, plus necessary configury changes.
Plus a bonus mini-canonicalization of some stappaths.7 items.

11 years agoPR14929: groundwork for letting stap refer the user to man staperrors.
Serguei Makarov [Fri, 7 Dec 2012 18:00:47 +0000 (13:00 -0500)]
PR14929: groundwork for letting stap refer the user to man staperrors.

To tag an error with a specific manpage, replace
semantic_error (...)
--> semantic_error_manpage ("name_of_manpage", ...)
or
parse_error (...)
--> parse_error_manpage ("name_of_manpage", ...)

Then both errors will output messages instructing the user to refer
to man 3stap error::name_of_manpage.

11 years agoruntime: remove the map_node data_offset
Josh Stone [Fri, 7 Dec 2012 02:29:32 +0000 (18:29 -0800)]
runtime: remove the map_node data_offset

The value in the map_node is now an honest member of the struct.  Here
are your papers, congratulations, now get to work!

* runtime/map-gen.c (KEYSYM(map_node)): Add the value.
  (MAP_COPY_VAL): New macro to assist in pmap aggregation.
* runtime/pmap-gen.c (KEYSYM(pmap_update_node)): New callback for
  aggregation node updates, copying the keys and values as needed.
* runtime/map-stat.c (_stp_map_new_hstat, _stp_pmap_new_hstat): New
  constructors to take responsibility for setting HIST_NONE.
  (_stp_[p]map_new_hstat_{log,linear}): Only need to augment the size
  with the histogram buckets now; the stat_data is already there.
* runtime/map.c (_stp_map_new, _stp_pmap_new): No longer need the value
  type, not the separate key/data sizes; a simple node_size is enough.

11 years agoruntime: remove the 'type' metadata from map_node
Josh Stone [Thu, 6 Dec 2012 22:53:52 +0000 (14:53 -0800)]
runtime: remove the 'type' metadata from map_node

We always know what the type should be, so pass that info around.

* runtime/map-gen.c (map_get_key): This returns value "keys" now too,
  for simpler use by _stp_map_sort[n] and _stp_cmp.
  (MAP_GET_VAL): Use more direct access to the value.
  (_stp_map_get_VALNAME): New, provide a single typed value getter.
* runtime/map.c (_stp_get_TYPE): Remove these type-generic getters.
  (_stp_cmp): Let get_key sort out the type and where to get it.
  (_stp_map_sort[n]): This needs no type knowledge now.
  (_stp_new_agg, _stp_add_agg, _stp_pmap_agg, _new_map_clear_node): Pass
  the type as a parameter from map-gen code that knows it statically.
* translate.cxx (itervar::get_value): Use _stp_map_get_VALNAME.

11 years agoArm doesn't have support for dyninst at the moment, so disable it for arm.
William Cohen [Thu, 6 Dec 2012 21:52:30 +0000 (16:52 -0500)]
Arm doesn't have support for dyninst at the moment, so disable it for arm.

11 years agoruntime: Remove dupes between map-gen and pmap-gen
Josh Stone [Thu, 6 Dec 2012 19:21:47 +0000 (11:21 -0800)]
runtime: Remove dupes between map-gen and pmap-gen

Most of pmap-gen was a rehash of map-gen, just named pmap instead.  Only
a few of the pmap functions were actually unique to that situation, so
the rest have been terminated with extreme prejudice.

This also addresses a FIXME note I added in commit 57eedf945 about the
way map-gen and pmap-gen are included.  Made it in before the seventh
anniversary of that FIXME -- whew!

* translate.cxx (c_unparser::emit_map_type_instantiations): Set
  MAP_DO_PMAP to trigger the pmap-gen from within map-gen.
* runtime/map-gen.c (KEY_EQ_P): New, consolidate testing of all keys.
  (MAP_DO_PMAP): Use to include pmap-gen while the #defines are hot.
* runtime/pmap-gen.c: I love the smell of napalm in the morning...

11 years agoAvoid using probefunc() in the syscall tapsets
William Cohen [Wed, 5 Dec 2012 22:43:28 +0000 (17:43 -0500)]
Avoid using probefunc() in the syscall tapsets

Some of the tapsets still used probefunc(). Unfortunately probefunc
may trigger the use of taskfinder support on machines that do not yet
support taskfinder.  To work around issue kernel-space tapset probes
can use symname(addr()).

11 years agoruntime: Break up map allocs again
Josh Stone [Wed, 5 Dec 2012 21:31:56 +0000 (13:31 -0800)]
runtime: Break up map allocs again

I ran into trouble with a few tests inconsistently failing to allocate
their maps.  I believe this is because the new allocation scheme I made
in commit db45dfde was just to big for fragmented memory.  This commit
goes back to allocating each node separately, but keeps the rest of the
cleanups made before.

* runtime/map.c (_stp_map_new): Allocate the map_root on its own.
  (_stp_map_init): Then allocate each map_node separately too.
  (_stp_map_del): Delete the map_nodes too.

11 years agoruntime: Remove the map_node pointer to its root
Josh Stone [Wed, 5 Dec 2012 01:27:44 +0000 (17:27 -0800)]
runtime: Remove the map_node pointer to its root

The only thing this helped anymore was getting the type and data_offset,
which we can embed directly instead.  Those might actually be better in
the future as KEYSYM-specialized functions anyway.  With this change,
all map stuctures are now pointer-free!

11 years agoruntime: Remove function pointers from struct map_root
Josh Stone [Wed, 5 Dec 2012 00:27:51 +0000 (16:27 -0800)]
runtime: Remove function pointers from struct map_root

More work on the way to shared-memory stapdyn, this patch removes the
function pointers from struct map_root.  The functions which used those
pointers now take them as parameters, and the translator calls through
[p]map-gen intermediaries to figure those out.

* runtime/map.h (struct map_root): Remove the function pointers, as well
  as ancient unused fields "list" and "key".  Declare typedefs for those
  function pointers, and add them as parameters to needed functions.
* runtime/map-gen.c: No more initializing those function pointers, and
  add new KEYSYM wrapper functions to pass those as parameters.
* runtime/pmap-gen.c: Ditto.
* runtime/map.c: Use the parameterized function pointers as needed.
* translate.cxx (mapvar::function_keysym): New generic name-generator
  for KEYSYM-wrapped functions.  Use it as-needed.

11 years agoruntime: Allocate maps in fewer chunks
Josh Stone [Tue, 27 Nov 2012 21:44:26 +0000 (13:44 -0800)]
runtime: Allocate maps in fewer chunks

This makes map allocations as more unified chunks, basically just one
big allocation for each map_root.  For pmaps, there's one base
allocation, then the separate map_roots for each cpu and the aggregate.
Fewer chunks means fewer pointers to keep track of, which contributes to
the pointer-free goals of shared-memory stapdyn.

* runtime/*/alloc.c: Add kzalloc_node variants.
* runtime/*/map_runtime.h (struct pmap): Abstract the map_roots with
  plain pointers in kernel or offptr_t in stapdyn.
* runtime/map.h (struct map_root): Make "hashes" a fixed array.
* runtime/map.c (_stp_map_init): No more allocation, just initialize
  fields and insert the nodes into the free pool.
  (_stp_map_normalize_key_size, _stp_map_normalize_data_size): Setup the
  key and data sizes in a uniform way.
  (_stp_map_new): Allocate the map_nodes along with the map_root.
  (_stp_pmap_new): Allocate the base pmap, then _stp_map_new the bits.
  (_stp_map_del, _stp_pmap_del): Deletion is now simpler to match.
* runtime/map-gen.c: Update callers to new abstractions.
* runtime/map-stat.c: Ditto.
* runtime/pmap-gen.c: Ditto.

11 years agoAdjust output checks for arm stat.c syscall.exp test
William Cohen [Mon, 3 Dec 2012 22:33:03 +0000 (17:33 -0500)]
Adjust output checks for arm stat.c syscall.exp test

The output check for the arm tests needs to be adjusted to match the
syscalls being used on the arm.  Arm has output that looks like the
ia64 process and needs a similar conditional check.

11 years agoCorrect the syscall test alarm.c to properly match for arm.
William Cohen [Mon, 3 Dec 2012 22:16:08 +0000 (17:16 -0500)]
Correct the syscall test alarm.c to properly match for arm.

The output of syscalls is slightly different for arm machines.  This caused
the alarm test to fail.  The conditionals tests for arm allow this test to
properly pass on the arm.

11 years agoPR14900: fix collisions between context tapset locals and user globals
Frank Ch. Eigler [Fri, 30 Nov 2012 20:34:51 +0000 (15:34 -0500)]
PR14900: fix collisions between context tapset locals and user globals

* tapset/linux/*context*.stp: Prefix script locals with __.
* testsuite/semok/context-globals: New test.

11 years agotestsuite: fix buildok/oldlocals02.stp permissions
Frank Ch. Eigler [Fri, 30 Nov 2012 20:02:05 +0000 (15:02 -0500)]
testsuite: fix buildok/oldlocals02.stp permissions

11 years agoPR14804: tolerate !STAPCONF_KALLSYMS without an early _stp_error
Frank Ch. Eigler [Fri, 30 Nov 2012 03:24:32 +0000 (22:24 -0500)]
PR14804: tolerate !STAPCONF_KALLSYMS without an early _stp_error

A _stp_error call from that early in initialization leads to
badness.

* runtime/sym.c (kallsyms_lookup_name): In the !STAPCONF_KALLSYMS
  case, return NULL quietly, not tickling the error dragons.
* runtime/mempool.c (_stp_mempool_alloc): As a belt & suspenders
  kind of thing, if invoked so early that the incoming pool is not
  even initialized yet (= NULL), return NULL instead of crashing.

11 years agoHold System.map failures until both attempts fail
Josh Stone [Wed, 28 Nov 2012 21:59:35 +0000 (13:59 -0800)]
Hold System.map failures until both attempts fail

On RHEL4, System.map only exists in /boot/, so the first attempt under
/lib/modules/ was always spamming about its failure.  Now that error
message is delayed and printed iff /boot/ fails too.

Reported-by: William Cohen <wcohen@redhat.com>
11 years agoMake pthreadprobes.exp test script readable.
David Smith [Tue, 27 Nov 2012 22:27:07 +0000 (16:27 -0600)]
Make pthreadprobes.exp test script readable.

11 years agotracepoints: with -vvv, match kernel tracepoint headers with tracequery kmods
Frank Ch. Eigler [Tue, 27 Nov 2012 20:03:28 +0000 (15:03 -0500)]
tracepoints: with -vvv, match kernel tracepoint headers with tracequery kmods

11 years agokernel tracepoints: locate xfs's under $src/fs/xfs/xfs_trace.h
Frank Ch. Eigler [Tue, 27 Nov 2012 20:03:05 +0000 (15:03 -0500)]
kernel tracepoints: locate xfs's under $src/fs/xfs/xfs_trace.h

11 years agoPR12642: Update comments and remove unused labels.
David Smith [Tue, 27 Nov 2012 16:30:52 +0000 (10:30 -0600)]
PR12642: Update comments and remove unused labels.

* runtime/linux/task_finder2.c (stap_start_task_finder): Clarified comment.
  (stap_task_finder_post_init):  Clarified comment and removed unused label.
* runtime/linux/task_finder.c (stap_task_finder_post_init): Clarified
  comment and removed unused label.

11 years agoPR12642: tweak a comment to clarify behavior without stap -c/-x
Frank Ch. Eigler [Tue, 27 Nov 2012 15:55:54 +0000 (10:55 -0500)]
PR12642: tweak a comment to clarify behavior without stap -c/-x

11 years agoFixed PR12642 by interrupting the target task.
David Smith [Tue, 27 Nov 2012 15:29:02 +0000 (09:29 -0600)]
Fixed PR12642 by interrupting the target task.

* runtime/stp_utrace.c (utrace_init): If 'signal_wake_up' and/or
  '__lock_task_sighand' aren't exported, look up their addresses.
  (utrace_control): Add UTRACE_INTERRUPT functionality, which involves
  setting up a task_work handler, then sending the target a signal.
* runtime/linux/task_finder.c (__stp_utrace_attach_flags): Use the
  caller's specified action instead of hardcoding UTRACE_STOP, to allow
  UTRACE_INTERRUPT to go through.
  (stap_task_finder_post_init): New function.
* runtime/linux/task_finder2.c: Ditto.
* runtime/stp_utrace.h: Added UTRACE_INTERRUPT.
* runtime/utrace_compatibility.h: Ditto.
* runtime/linux/runtime.h: Add kallsyms variables for 'signal_wake_up' and
  '__lock_task_sighand'.
* translate.cxx (c_unparser::emit_module_init): Runs all
  emit_module_post_init() functions.
* task_finder.cxx (task_finder_derived_probe_group::emit_module_post_init):
  Emit call to 'stap_task_finder_post_init()'.
* elaborate.h (struct derived_probe_group): Add virtual function
  'emit_module_post_init' which gets called once session_state is set to
  running.
* buildrun.cxx (compile_pass): Added 'exportconf' tests for
  "signal_wake_up" and "__lock_task_sighand".
* testsuite/systemtap.clone/main_quiesce.exp: New test.
* testsuite/systemtap.clone/main_quiesce.c: New test C source.

11 years agoAlways report System.map failures, not just verbosely
Josh Stone [Mon, 26 Nov 2012 23:38:39 +0000 (15:38 -0800)]
Always report System.map failures, not just verbosely

Since we are treating System.map as mandatory (also debatable), we need
to inform the user about the failure, instead of a silent exit.

Reported-by: Yichun Zhang <agentzh@gmail.com>
11 years agoruntime: More static, fewer exported symbols
Josh Stone [Wed, 21 Nov 2012 21:55:04 +0000 (13:55 -0800)]
runtime: More static, fewer exported symbols

Does it hurt to have unnecessarily exported symbols?  Probably not, but
making them static may give the compiler more chances to optimize.

11 years agostapdyn: Add an offptr debug mode for direct pointers
Josh Stone [Wed, 21 Nov 2012 20:26:51 +0000 (12:26 -0800)]
stapdyn: Add an offptr debug mode for direct pointers

Useful for validation, and also to compare how the offset computations
affect code generation.

11 years agostapdyn: Kill the lists copied from the kernel
Josh Stone [Wed, 21 Nov 2012 02:58:43 +0000 (18:58 -0800)]
stapdyn: Kill the lists copied from the kernel

These list definitions were only in use to support systemtap maps, but
they're now using offset lists, so these plain lists aren't needed.

11 years agoruntime: Abstract the list type, and use olist for stapdyn
Josh Stone [Wed, 21 Nov 2012 02:32:02 +0000 (18:32 -0800)]
runtime: Abstract the list type, and use olist for stapdyn

This is the first step toward making systemtap maps usable in shared
memory, which we'll use for multiprocess stapdyn support.

The runtimes each have a map_list.h file which defines mlist names for
either normal lists in kernel mode or offset lists in dyninst mode.

There's no significant functionality change in the maps here, mostly
just renamed to mlist_* across the board.

11 years agostapdyn: Define offset pointers and list implementations
Josh Stone [Wed, 7 Nov 2012 21:57:56 +0000 (13:57 -0800)]
stapdyn: Define offset pointers and list implementations

Offset pointers are an abstraction of pointers into relative offsets,
here chosen as relative to the offptr_t object itself.  This allows
objects to reference each other within a memory block that may not be at
a fixed virtual address, such as with shared memory or reallocs.

The olist and ohlist types are based on the Linux list and hlist types,
but purely using offset pointers.

11 years agoBZ878926: further parametrize /etc paths
Frank Ch. Eigler [Wed, 21 Nov 2012 15:18:00 +0000 (10:18 -0500)]
BZ878926: further parametrize /etc paths

commit 29fe12e41f1 left two items behind, where /etc/systemtap
was not properly replaced with @sysconfdir@/systemtap.

11 years agoAdd a "-O" to the "-D_FORTIFY_SOURCE=2" setjump.exp test
William Cohen [Tue, 20 Nov 2012 19:26:33 +0000 (14:26 -0500)]
Add a "-O" to the "-D_FORTIFY_SOURCE=2" setjump.exp test

When building code with -D_FORTIFIY_SOURCE=2 need to turn on
optimizations.  Without the "-O" the compile of code triggers warning
that will cause the build to fail and some parts of the portion of the
test is untested.

11 years agoRun probefunc inline testcase with --compatible=1.8.
Mark Wielaard [Mon, 19 Nov 2012 20:43:40 +0000 (21:43 +0100)]
Run probefunc inline testcase with --compatible=1.8.

In the new implementation we will observe the name of the function where
this gets inlined, not the inlined function name itself. With the old
implementation of probefunc() it would get the name from the actual
probe string. Test the old behavior explicitly.

11 years agostapdyn: loadLibrary now returns BPatch_object
Josh Stone [Thu, 8 Nov 2012 01:07:15 +0000 (17:07 -0800)]
stapdyn: loadLibrary now returns BPatch_object

BPatch_addressSpace::loadLibrary changed its return value before Dyninst
8.0 final.  We wanted the BPatch_object anyway, so now we don't have to
get it indirectly through BPatch_module::getObject.

Also, bump the rpm spec to require the actual Dyninst 8.0.

11 years agoFix _stp_get_arg32_by_number() for RHEL5.
David Smith [Mon, 19 Nov 2012 20:08:43 +0000 (14:08 -0600)]
Fix _stp_get_arg32_by_number() for RHEL5.

* runtime/regs.c (_stp_get_arg32_by_number): Handle i386/x86_64
  differences better for systems without x86 register unification, like
  RHEL5.
 Please enter the commit message for your changes. Lines starting

11 years agoFix RHEL5 x86_64 register printing.
David Smith [Mon, 19 Nov 2012 19:21:02 +0000 (13:21 -0600)]
Fix RHEL5 x86_64 register printing.

* runtime/linux/regs.c (_stp_print_regs): Correctly print the 'flags'
  register on systems before x86 register unification, such as RHEL5.

11 years agotestsuite/systemtap.base/partial-class-type.exp: Explictly use g++ compiler.
Mark Wielaard [Sun, 18 Nov 2012 21:48:33 +0000 (22:48 +0100)]
testsuite/systemtap.base/partial-class-type.exp: Explictly use g++ compiler.

partial-class-type.cxx is a C++ program, compiling with plain gcc might
result in undefined reference to `__gxx_personality_v0'.

11 years agoprobefunc(): Use [u]addr() instead of [u]stack(0).
Mark Wielaard [Sun, 18 Nov 2012 21:29:49 +0000 (22:29 +0100)]
probefunc(): Use [u]addr() instead of [u]stack(0).

The result is the same, but the use of [u]stack(0) triggers the inclusion
of unwind tables (even though there is literally zero unwinding going on).

11 years agotestsuite/systemtap.base/utf_pretty.exp: Explictly use g++ compiler.
Mark Wielaard [Sun, 18 Nov 2012 20:04:32 +0000 (21:04 +0100)]
testsuite/systemtap.base/utf_pretty.exp: Explictly use g++ compiler.

utf_pretty.cxx is a C++ program, compiling with plain gcc might result in
undefined reference to `__gxx_personality_v0'.

11 years agoPR10272 Warn if we will be unable to generate user backtrace for 32-on-64.
Mark Wielaard [Sat, 17 Nov 2012 21:34:04 +0000 (22:34 +0100)]
PR10272 Warn if we will be unable to generate user backtrace for 32-on-64.

Deduce the kernel ELF class from the kernel normalized machine architecture
and warn if it is different from the module ELF class (except for 32-bit
vdso). Don't generate unwind tables for "wrong class" modules.

11 years agoMark pt_user_mode.exp as untested if we're not root.
David Smith [Thu, 15 Nov 2012 22:37:05 +0000 (16:37 -0600)]
Mark pt_user_mode.exp as untested if we're not root.

* testsuite/systemtap.base/pt_user_mode.exp: Mark as "untested" if we're
  not root (since perf probes require root).

11 years agoUpdate the ptrace.exp test to work on RHEL6.
David Smith [Thu, 15 Nov 2012 22:10:02 +0000 (16:10 -0600)]
Update the ptrace.exp test to work on RHEL6.

* testsuite/systemtap.base/ptrace.exp: Handle more versions of strace
  output. Require uprobes, since the test scripts use uprobes.

11 years agoTweak the probe_by_pid.exp testcase to avoid zombie processes.
David Smith [Thu, 15 Nov 2012 20:25:08 +0000 (14:25 -0600)]
Tweak the probe_by_pid.exp testcase to avoid zombie processes.

11 years agoMake debugtypes.exp "untested" if we've got an older gcc.
David Smith [Wed, 14 Nov 2012 22:53:03 +0000 (16:53 -0600)]
Make debugtypes.exp "untested" if we've got an older gcc.

* testsuite/systemtap.pass1-4/debugtypes.exp: Mark as 'untested' if the
  system's gcc doesn't support the '-gdwarf-4 -fdebug-types-section'
  options.

11 years agoFix PR14842 by removing old "--kelf" and "--ignore-dwarf" options.
David Smith [Wed, 14 Nov 2012 21:13:00 +0000 (15:13 -0600)]
Fix PR14842 by removing old "--kelf" and "--ignore-dwarf" options.

* cmdline.cxx: Remove "--kelf" and "--ignore-dwarf" options.
* cmdline.h: Ditto.
* hash.cxx (find_script_hash): Ditto.
* session.cxx: Ditto.
* session.h: Ditto.
* stap.1: Ditto.
* initscript/systemtap.in: Ditto.
* po/en.po: Ditto.
* po/fr.po: Ditto.
* po/pl.po: Ditto.
* po/systemtap.pot: Ditto.
* testsuite/semok/nodwf04.stp: Removed test for --kelf/--ignore-dwarf.
* testsuite/semok/nodwf05.stp: Ditto.
* testsuite/semok/nodwf06.stp: Ditto.
* testsuite/semok/nodwf07.stp: Ditto.
* testsuite/systemtap.context/num_args.tcl: Removed test pass for "--kelf
  --ignore-dwarf".

11 years agoFix PR14820 by removing old "--kmap" and "--ignore-vmlinx" options.
David Smith [Tue, 13 Nov 2012 21:59:07 +0000 (15:59 -0600)]
Fix PR14820 by removing old "--kmap" and "--ignore-vmlinx" options.

* cmdline.cxx: Removed "--kmap" and "--ignore-vmlinux" option support.
* cmdline.h: Ditto.
* hash.cxx (find_script_hash): Ditto.
* session.cxx: Ditto.
* session.h: Ditto.
* stap.1: Ditto.
* tapsets.cxx: Ditto.
* initscript/systemtap.in: Ditto.
* po/systemtap.pot: Ditto.
* testsuite/semok/nodwf01.stp: Removed test for --kmap/--ignore-vmlinux.
* testsuite/semok/nodwf02.stp: Ditto.
* testsuite/semok/nodwf03.stp: Ditto.

11 years agoRemove manual pointer casts from map-gen and pmap-gen
Josh Stone [Wed, 7 Nov 2012 21:46:37 +0000 (13:46 -0800)]
Remove manual pointer casts from map-gen and pmap-gen

There were a lot of manual conversions from generic map_node* to the
KEYSYM variants (which had a duplicate of map_node at their heads).

Now there's a genuine map_node in each KEYSYM node, and we use the
trustworthy container_of and hlist_for_each_entry to go back and forth.

11 years agostapdyn: Workaround for an i686 Dyninst bug in argument passing
Josh Stone [Wed, 7 Nov 2012 19:41:16 +0000 (11:41 -0800)]
stapdyn: Workaround for an i686 Dyninst bug in argument passing

Dyninst appears to be filling only 32-bits for the index to
enter_dyninst_uprobe_regs, which makes the following arguments shift
badly too.  This is reported upstream, but we can detect and work around
it ourselves too.

11 years agostapdyn: Add tapset function print_regs
Josh Stone [Tue, 6 Nov 2012 22:07:36 +0000 (14:07 -0800)]
stapdyn: Add tapset function print_regs

The underlying _stp_print_regs is more limited than the kernel version,
as some registers are not available, but this is still useful to see all
the information available to the probe.

Note: this makes it obvious that i686 actually doesn't have register
values right now.  Dyninst has documented that only POWER and AMD64
implement getRegisters, unfortunately.  This might be expanded by them
in a future release.

* runtime/regs.c: Split into linux/ and dyninst/ versions.
* tapset/context.stp (print_regs): Moved from linux/; now it's generic.
* stapdyn/mutatee.cxx (get_dwarf_registers): Add verbose logging, which
  also shows that i686 doesn't have registers. :(

11 years agoInclude --runtime=dyninst in error message for unprivileged user
Lukas Berk [Wed, 7 Nov 2012 18:38:24 +0000 (13:38 -0500)]
Include --runtime=dyninst in error message for unprivileged user

* session.cxx : mention that --runtime=dyninst may be used in the case
 of an unprivileged user, when trying to probe userspace

11 years agostapdyn: Add support for return probes
Josh Stone [Tue, 6 Nov 2012 00:21:50 +0000 (16:21 -0800)]
stapdyn: Add support for return probes

Each address is converted to the BPatch_locExit of the function which
contains it.  Even $return is working fine from here!

* runtime/dyninst/uprobes.c (stp_dyninst_probe_flags): New, return the
  flags describing this probe, notably STAPDYN_PROBE_FLAG_RETURN.
* stapdyn/dynprobe.cxx (find_dynprobes): Read the flags from the module.
  (dynprobe_location::dynprobe_location): Parse return_p from the flags.
* stapdyn/mutatee.cxx (mutatee::instrument_dynprobe_target): For probes
  with return_p set, transform into BPatch_locExit points.
* tapsets.cxx (dwarf_builder::build): Let stapdyn return probes through.
  (uprobe_derived_probe_group::emit_module_dyninst_decls): Emit
  .flags=STAPDYN_PROBE_FLAG_RETURN for return probes.

11 years agostapdyn: Reduce LDADD to only those directly used
Josh Stone [Mon, 5 Nov 2012 21:58:44 +0000 (13:58 -0800)]
stapdyn: Reduce LDADD to only those directly used

The only part of Dyninst that we actually use and need to link is
libdyninstAPI.  The rest of those libraries I had in dyninst_LIBS were
those needed indirectly by that one.  But trying to enumerate someone
else's dependencies is a recipe for failure -- e.g. it was already
broken by not including the new libdynElf too.

The reason I had this was to allow successful linking when using
--with-dyninst=/not/a/lib/searched/path without requiring also to set
LD_LIBRARY_PATH.  Since the enumeration is prone to break, and you'd
have to set LD_LIBRARY_PATH anyway to be able to run, I've decided it's
not worth trying to be fancy here.

11 years agoconfigure: treat any positive --with-dyninst as a hard req
Josh Stone [Mon, 5 Nov 2012 21:50:13 +0000 (13:50 -0800)]
configure: treat any positive --with-dyninst as a hard req

If the user gave --with-dyninst[=yes] or --with-dyninst=/path, treat a
failure in that feature test as a hard error.  If the user left dyninst
implicit, then don't make it an error.  And of course if the user gave
--without-dyninst, then don't test it at all.

11 years agoUse the new kernel_functions to query inode-uretprobes
Josh Stone [Mon, 5 Nov 2012 20:42:52 +0000 (12:42 -0800)]
Use the new kernel_functions to query inode-uretprobes

This gives a clean way to determine if this is a kernel with the new
uretprobe_register function yet.

11 years agoAdd System.map kernel functions to systemtap_session
Josh Stone [Mon, 5 Nov 2012 20:20:46 +0000 (12:20 -0800)]
Add System.map kernel functions to systemtap_session

The code to parse System.map was already in place for kprobe.function
validation; now it's generalized and the result made available in
systemtap_session::kernel_functions.

11 years agoMove parse_kernel_config/exports into systemtap_session
Josh Stone [Mon, 5 Nov 2012 20:14:05 +0000 (12:14 -0800)]
Move parse_kernel_config/exports into systemtap_session

These are operating on the session, with purely session-internal data,
so they might as well be member functions.

11 years agoPrototype support for inode-uretprobes
Josh Stone [Fri, 2 Nov 2012 23:23:43 +0000 (16:23 -0700)]
Prototype support for inode-uretprobes

Anton Arapov sent a test kernel build with new support for uretprobes,
and this patch adds stap support.  I've confirmed that it works on
x86_64, but i686 is crashing the target processes with SIGSEGV.

We need to find a dynamic (pass-2) way to detect the presence of
uretprobes in the kernel.  For now, I've just hacked it enabled, and it
will fail registration at runtime.

* buildrun.cxx (compile_pass): Autoconf uretprobes and its exports.
* runtime/linux/autoconf-inode-uretprobes.c: New, check for uretprobes.
* runtime/linux/runtime.h: Add function pointers for uretprobes.
* runtime/transport/transport.c (_stp_transport_init): Set the uretprobe
  function pointers if not exported.  (Anton's kernel does have exports,
  but we're prepared in case upstream doesn't accept those.)
* runtime/linux/uprobes-inode.c (stapiu_consumer): Let this double as
  either a uprobe_consumer or a uretprobe_consumer, chosen by return_p.
  (stapiu_probe_handler): Add a new generic function signature.
  (stapiu_uprobe_handler, stapiu_uretprobe_handler): New specific
  callbacks that mux into stapiu_probe_handler.
  (stapiu_register, stapiu_unregister): New functions to perform the
  appropriate kind of registration for a probe.
* tapsets.cxx (dwarf_builder::build): Hack the uretprobes check.
  (uprobe_derived_probe_group::emit_module_inode_decls): Use the new
  signature for the probe handler, and emit .return_p.

11 years ago spin-rawhide date command and correct ^Source regex
Lukas Berk [Mon, 5 Nov 2012 18:43:04 +0000 (13:43 -0500)]
 spin-rawhide date command and correct ^Source regex

* scripts/spin-rawhide : adjust date to use +"%a..." syntax instead
 of cutting fields and remove backslash before ^Source sed regex

11 years agoPR14707: Pass -x from stap to stapdyn
Josh Stone [Sat, 3 Nov 2012 16:48:53 +0000 (09:48 -0700)]
PR14707: Pass -x from stap to stapdyn

Commit 18e3d52a added -x to stapdyn, and I tested that it worked
directly, but I forgot to make stap pass its option along.  D'oh!

* buildrun.cxx (make_dyninst_run_command): Add -x s.target_pid.

11 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Lukas Berk [Fri, 2 Nov 2012 01:54:01 +0000 (21:54 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

11 years agoInclude stapgames in the testsuite
Masami Hiramatsu [Fri, 2 Nov 2012 01:41:55 +0000 (21:41 -0400)]
Include stapgames in the testsuite

New systemtap.examples/stapgames directory added with the supporting
tapsets located in the 'tapset' subdirectory.  All tests run with -p4
specified.

* testsuite/systemtap.examples/stapgames/block.meta : block meta data
* testsuite/systemtap.examples/stapgames/block.stp : break a ceiling of
  blocks
* testsuite/systemtap.examples/stapgames/eater.meta : eater meta data
* testsuite/systemtap.examples/stapgames/eater.stp : eat the .'s before
  being eaten
* testsuite/systemtap.examples/stapgames/lifegame.meta : life meta data
* testsuite/systemtap.examples/stapgames/lifegame.stp : watch a
  'lifeform' morph and evolve
* testsuite/systemtap.examples/stapgames/pingpong.meta : ping pong meta
  data
* testsuite/systemtap.examples/stapgames/pingpong.stp : cursor bounces
  around terminal reflecting off edges
* testsuite/systemtap.examples/stapgames/tapset/audio.stp : audio
  functionality
* testsuite/systemtap.examples/stapgames/tapset/cursor.stp : cursor
  functionality and tracking
* testsuite/systemtap.examples/stapgames/tapset/game.stp : seed values
* testsuite/systemtap.examples/stapgames/tapset/gmtty.stp : tty functionality
* testsuite/systemtap.examples/stapgames/tapset/input.stp : controlling
  game input

11 years agoPR14794: Only error if '--with-dyninst' can't find dyninst.
David Smith [Thu, 1 Nov 2012 20:48:22 +0000 (15:48 -0500)]
PR14794: Only error if '--with-dyninst' can't find dyninst.

* configure.ac: Only error when dyninst can't be found and '--with-dyninst'
  was specified.
* configure (ac_compiler_gnu): Regenerated.

11 years agoPR14794: enable --with-dyninst by default, if libraries/headers exist
Frank Ch. Eigler [Thu, 1 Nov 2012 01:27:50 +0000 (21:27 -0400)]
PR14794: enable --with-dyninst by default, if libraries/headers exist

* configure.ac (--with-dyninst): Search for headers/libraries, unless
  --without-dyninst.

11 years agoreleng: improve 'make gcov'
Frank Ch. Eigler [Wed, 31 Oct 2012 17:34:23 +0000 (13:34 -0400)]
releng: improve 'make gcov'

* Makefile.am (gcov): Rewrite to compile all the stap tools with the proper
  *FLAGS.  Iterate to run gcov in $SUBDIRS.
  (lcov): Zap.

11 years ago(PR14574 partial fix) Make several systemtap.printf/*.exp tests use dyninst.
David Smith [Wed, 31 Oct 2012 15:51:55 +0000 (10:51 -0500)]
(PR14574 partial fix) Make several systemtap.printf/*.exp tests use dyninst.

* testsuite/lib/stap_run_binary.exp (stap_run_binary): Added optional
  argument support.
* testsuite/systemtap.printf/basic1.exp: Added dyninst support.
* testsuite/systemtap.printf/basic2.exp: Ditto.
* testsuite/systemtap.printf/basic3.exp: Ditto.
* testsuite/systemtap.printf/basic4.exp: Ditto.
* testsuite/systemtap.printf/basic5.exp: Ditto.
* testsuite/systemtap.printf/basic6.exp: Ditto.
* testsuite/systemtap.printf/bin1.exp: Ditto.
* testsuite/systemtap.printf/bin2.exp: Ditto.
* testsuite/systemtap.printf/bin3.exp: Ditto.
* testsuite/systemtap.printf/bin4.exp: Ditto.
* testsuite/systemtap.printf/bin5.exp: Ditto.
* testsuite/systemtap.printf/bin6.exp: Ditto.
* testsuite/systemtap.printf/char1.exp: Ditto.
* testsuite/systemtap.printf/char2.exp: Ditto.
* testsuite/systemtap.printf/int1.exp: Ditto.
* testsuite/systemtap.printf/memory1.exp: Ditto.
* testsuite/systemtap.printf/oct.exp: Ditto.
* testsuite/systemtap.printf/pretty-bits.exp: Ditto.
* testsuite/systemtap.printf/pretty-char.exp: Ditto.
* testsuite/systemtap.printf/print.exp: Ditto.
* testsuite/systemtap.printf/print_char.exp: Ditto.
* testsuite/systemtap.printf/printd.exp: Ditto.
* testsuite/systemtap.printf/println.exp: Ditto.
* testsuite/systemtap.printf/ptr-1.2.exp: Ditto.
* testsuite/systemtap.printf/ptr-1.3.exp: Ditto.
* testsuite/systemtap.printf/string1.exp: Ditto.
* testsuite/systemtap.printf/string2.exp: Ditto.

11 years ago(PR14571 partial fix) Improve dyninst multithreading.
David Smith [Wed, 31 Oct 2012 15:45:41 +0000 (10:45 -0500)]
(PR14571 partial fix) Improve dyninst multithreading.

* translate.cxx (c_unparser::emit_common_header): Don't declare contexts,
  let the runtime handle it.
  (c_unparser::emit_module_init): Instead of allocating/freeing contexts
  directly, call the runtime functions
  _stp_runtime_contexts_alloc()/_stp_runtime_contexts/free().
  (c_unparser::emit_module_exit): Instead of waiting on contexts directly,
  call the runtime function _stp_runtime_context_wait().
* tapsets.cxx (common_probe_entryfn_prologue): Updated with new method of
  getting context in probe prologues. For dyninst, handle a NULL context.
  (common_probe_entryfn_epilogue): Call _stp_runtime_entryfn_put_context()
  in probe epilogue.
* runtime/dyninst/runtime_context.h: New file.
* runtime/linux/runtime_context.h: Ditto.
* runtime/common_probe_context.h: Added dyninst fields.
* runtime/dyninst/map_runtime.h: Make map locking optional.
* runtime/dyninst/print.c (_stp_print_init): Added multithreading support.
* runtime/dyninst/runtime.h: Remove the stapdyn_big_dumb_lock.
  (stp_dyninst_session_init): Call _stp_runtime_contexts_init() and
  _stp_print_init().
  (stp_dyninst_session_exit): Call _stp_print_cleanup().
* runtime/dyninst/stat_runtime.h: Make stat locking optional.
* runtime/stat.h: Ditto.
* runtime/linux/map_runtime.h (_stp_map_for_each_cpu): Remove unneeded macro.
* runtime/linux/runtime.h: Removed unused macros.
* runtime/linux/stat_runtime.h (_stp_stat_initialize_locks): Switched back
  to standard lkm macros.
* runtime/map-stat.c: Ditto.
* runtime/map.c: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat.c: Ditto.
* runtime/map.h: Make locking optional.
* runtime/runtime.h: Added forward declarations for runtime_context.h.
* runtime/runtime_context.h: Include the correct runtime's
  runtime_context.h.
* runtime/vsprintf.c: Update method of getting context.

11 years agoAllow spin-rawhide to be run from any directory
Lukas Berk [Wed, 31 Oct 2012 14:41:47 +0000 (10:41 -0400)]
Allow spin-rawhide to be run from any directory

* scripts/spin-rawhide: replace HASH suffix with mktemp function
reposition constant/variable definitions to draw
  from newly cloned systemtap.git vs pwd
make STAP_MAJOR_VERSION grep more specific
make Source grep more specific

11 years agoPR14707: Support stapdyn -x PID
Josh Stone [Tue, 30 Oct 2012 22:28:41 +0000 (15:28 -0700)]
PR14707: Support stapdyn -x PID

* stapdyn/stapdyn.cxx (main): Parse -x and use attach_process for it.
* stapdyn/mutator.cxx (mutator::attach_process): Implement it.

11 years agoPR14665: Start handling signals in stapdyn
Josh Stone [Tue, 30 Oct 2012 22:03:38 +0000 (15:03 -0700)]
PR14665: Start handling signals in stapdyn

This works somewhat to receives signals and kill the target process, but
sometimes it hangs.  I think it may work better when the notification FD
is resolved.

11 years agostapdyn: Detach the process in the mutatee dtor
Josh Stone [Tue, 30 Oct 2012 20:06:53 +0000 (13:06 -0700)]
stapdyn: Detach the process in the mutatee dtor

This doesn't really matter for now, since we're only tracking a single
process that we created, but we'll need if for -x attaching.

11 years agostapdyn: Sketch out support for polling on Dyninst
Josh Stone [Tue, 30 Oct 2012 19:14:53 +0000 (12:14 -0700)]
stapdyn: Sketch out support for polling on Dyninst

By polling instead of waitForStatusChange, we can let signals break us
out of the run loop too.  However, the notification FD currently appears
broken in Dyninst, so this is "#if 0" for now.

* util.cxx (ppoll): Move the fallback ppoll() to a general location.
* remote.cxx (ppoll): Moved ppoll() from here.
* stapdyn/mutator.cxx: Add the #if 0 stub of notification FD support.

11 years agoAdded small fix for testsuite/systemtap.base/hash_add_buildid.exp.
David Smith [Tue, 30 Oct 2012 14:54:53 +0000 (09:54 -0500)]
Added small fix for testsuite/systemtap.base/hash_add_buildid.exp.

* testsuite/systemtap.base/hash_add_buildid.exp: Wait for eu-readelf to
  finish to avoid a zombie process.

11 years ago(PR14574 partial) Add dyninst to the systemtap.exelib/pthreadprobes.exp test.
David Smith [Tue, 30 Oct 2012 14:52:32 +0000 (09:52 -0500)]
(PR14574 partial) Add dyninst to the systemtap.exelib/pthreadprobes.exp test.

* testsuite/systemtap.exelib/pthreadprobes.exp: Add dyninst testing.

11 years agostapdyn: Add some support for removing instrumentation
Josh Stone [Tue, 30 Oct 2012 02:06:30 +0000 (19:06 -0700)]
stapdyn: Add some support for removing instrumentation

We'll need this for signal-handling cleanup, and for detaching from
-x PID target processes.

* stapdyn/mutatee.h (mutatee::snippets): New vector for all the handles
  to code that we've added with Dyninst insertSnippet.
* stapdyn/mutatee.cxx (mutatee::instrument_dynprobe_target): Save the
  insertSnippet handle in snippets.
  (mutatee::remove_instrumentation): New, remove all the snippets.
  (mutatee::unload_stap_dso): New placeholder for unloading our module
  from the target process.  Dyninst can't do this yet...
  (mutatee::~mutatee): Call remove_instrumentation and unload_stap_dso.

11 years agostapdyn: Manage mutatee lifetimes better
Josh Stone [Tue, 30 Oct 2012 01:58:58 +0000 (18:58 -0700)]
stapdyn: Manage mutatee lifetimes better

It will be more convenient to manage mutatee resources if there's one
clear owner of the process, so stop allowing implicit copies.

* stapdyn/mutatee.h (mutatee::mutatee): Don't implement copy ctors.
* stapdyn/mutator.h (mutator::mutatees): Use shared_ptr for this list.
* stapdyn/mutator.cxx (mutator::create_process): Save a shared_ptr.
  (mutator::run): Use pointer indirection for mutatees.
  (mutator::dynamic_library_callback): Ditto.

11 years agostapdyn: Manage mutator lifetime better
Josh Stone [Tue, 30 Oct 2012 01:53:59 +0000 (18:53 -0700)]
stapdyn: Manage mutator lifetime better

We need to have a global record of mutators in order for dyninst
callbacks to work, since they have no context attached.  But rather than
some singleton factory style, just keep a global list of all mutators
we've seen.

* stapdyn/mutator.cxx (g_mutators): New vector for all mutators.
  (g_dynamic_library_callback): Iterate callbacks for all g_mutators.
  (mutator::dynamic_library_callback): Do the individual work.
  (mutator::mutator): Add this to g_mutators.
  (mutator::~mutator): Remove this from g_mutators.
  (mutator::create, mutator::g_mutator): Removed.
* stapdyn/stapdyn.cxx (main): Use mutator new and auto_ptr delete.

11 years agostapdyn: Remove the 8-arg register workaround
Josh Stone [Tue, 30 Oct 2012 01:03:20 +0000 (18:03 -0700)]
stapdyn: Remove the 8-arg register workaround

This was only to work around an assertion failure in Dyninst, which has
been fixed by their commit f307d8e1c5d7bd6a20dc105c3e233b788f57d33b.

11 years agotestsuite: for pretty-* test cases, use fixed /tmp/ file names
Frank Ch. Eigler [Mon, 29 Oct 2012 14:36:59 +0000 (10:36 -0400)]
testsuite: for pretty-* test cases, use fixed /tmp/ file names

... so that systemtap.sum files from run to run contain the same string

11 years agotestsuite: for stapsh-unix.stp test case, use fixed path name for tmp socket
Frank Ch. Eigler [Mon, 29 Oct 2012 14:22:22 +0000 (10:22 -0400)]
testsuite: for stapsh-unix.stp test case, use fixed path name for tmp socket

... so that systemtap.sum files from run to run contain the same string

11 years agoPR14774: fix multiply-wildcarded statement probes
Daniel Tschan [Mon, 29 Oct 2012 14:12:20 +0000 (10:12 -0400)]
PR14774: fix multiply-wildcarded statement probes

* dwflpp.cxx (iterate_over_srcfile_lines): Fix handling of case where
  both function name and line number subfields are wildcards.

11 years agotestsuite: make stap_run[23] more verbose when failing
Frank Ch. Eigler [Mon, 29 Oct 2012 02:39:36 +0000 (22:39 -0400)]
testsuite: make stap_run[23] more verbose when failing

If a stap_run[23] test case fails, in that the actual output varies
from the expected output, all remaining actual output lines were
neither compared nor reported in systemtap.log.

* testsuite/lib/stap_run2.exp (stap_run3): In case of a line mismatch,
  report any remaining actual lines.

11 years agoPR14781: use kmem_cache_create with unique name
Frank Ch. Eigler [Mon, 29 Oct 2012 00:53:11 +0000 (20:53 -0400)]
PR14781: use kmem_cache_create with unique name

* runtime/stp_utrace.c (utrace_init): Instead of using the KMEM_CACHE macro,
  invoke kmem_cache_create directly, with cache names that are going to be
  unique across concurrent systemtap sessions.

11 years agoPR14781 part 1: don't panic
Frank Ch. Eigler [Mon, 29 Oct 2012 00:16:55 +0000 (20:16 -0400)]
PR14781 part 1: don't panic

* runtime/stp_utrace.stp (utrace_init): Don't SLAB_PANIC on duplicate
  kmem_cache names, as is sadly likely for concurrent inode-uprobes
  scripts running on CONFIG_DEBUG_VM kernels.
* runtime/linux/task_finder2.c (stap_start_task_finder): Deign to check
  the utrace_init return code, and fail with a touch of grey grace.

11 years agoUpdated locking comments in _stp_stat_get().
David Smith [Wed, 24 Oct 2012 18:02:50 +0000 (13:02 -0500)]
Updated locking comments in _stp_stat_get().

11 years agoAdd spin-rawhide script for automated rawhide releases
Lukas Berk [Wed, 24 Oct 2012 16:08:22 +0000 (12:08 -0400)]
Add spin-rawhide script for automated rawhide releases

* scripts/spin-rawhide: freshly clones systemtap.git and fedpkg git
  repositories, update the .spec file accordingly and submit new build to
  bodhi

11 years agoLog the command being executed in testsuite/lib/stap_run_exact.exp.
David Smith [Tue, 23 Oct 2012 21:29:26 +0000 (16:29 -0500)]
Log the command being executed in testsuite/lib/stap_run_exact.exp.

11 years ago(PR14571 partial fix) Rework dyninst stat/map data storage.
David Smith [Tue, 23 Oct 2012 21:21:10 +0000 (16:21 -0500)]
(PR14571 partial fix) Rework dyninst stat/map data storage.

* runtime/map.c: Switched from TLS to just an array of map data for
  dyninst mode. Pushed most of the kernel vs. dyninst code down to
  runtime/{linux,dyninst}/map_runtime.h.
* runtime/map-stat.c (_stp_map_new_hstat_log): Ditto.
* runtime/map.h: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat.c (_stp_stat_add): Switched from TLS to just an array of
  stat data for dyninst mode. Pushed most of the kernel vs. dyninst code
  down to runtime/{linux,dyninst}/stat_runtime.h.
* runtime/stat-common.c: Ditto.
* runtime/stat.h: Ditto.
* runtime/dyninst/map_runtime.h: New file.
* runtime/dyninst/stat_runtime.h: New file.
* runtime/linux/map_runtime.h: New file.
* runtime/linux/stat_runtime.h: New file.
* runtime/dyninst/tls_data.c: Deleted file.

11 years agoruntime: fix timers for old kernels
Josh Stone [Mon, 22 Oct 2012 23:35:19 +0000 (16:35 -0700)]
runtime: fix timers for old kernels

This is a regression from commit 2b5ecaf, which split the hrtimer code
into the runtime.  The kernel portion needs to vary the return type of
the callback function for old kernels, using int instead of the enum.
This patch defines hrtimer_return_t to abstract the difference.

11 years agotapset: Add the macro @choose_defined and use it
Josh Stone [Mon, 22 Oct 2012 20:55:49 +0000 (13:55 -0700)]
tapset: Add the macro @choose_defined and use it

This returns the first parameter if it's @defined, otherwise it returns
the second parameter, replacing the common @defined(x)?x:y pattern.

I only updated the tapsets to use this, as I feel that's where we should
show off good code practice.  There are opportunities in the testsuite
that could use it too, but it's not necessary, and probably better to
leave existing tests undisturbed when possible.

11 years agoNEWS: retroactively note previous probefunc() is available as --compatible=1.8
Frank Ch. Eigler [Mon, 22 Oct 2012 13:22:13 +0000 (09:22 -0400)]
NEWS: retroactively note previous probefunc() is available as --compatible=1.8

11 years agofix i18n whitespace nit
Frank Ch. Eigler [Mon, 22 Oct 2012 13:12:52 +0000 (09:12 -0400)]
fix i18n whitespace nit

* main.cxx (passes_0_4): Drop extra space inside " foo " in listings
  of files parsed within tapset directories.

11 years agoAdjust buildok/xtime.stp for kernel commit 1e75f.
Mark Wielaard [Sun, 21 Oct 2012 23:37:51 +0000 (01:37 +0200)]
Adjust buildok/xtime.stp for kernel commit 1e75f.

time: Condense timekeeper.xtime into xtime_sec.

11 years agoPR14742 - more complete dwz / DW_TAG_partial_unit support
Mark Wielaard [Sun, 21 Oct 2012 23:00:40 +0000 (01:00 +0200)]
PR14742 - more complete dwz / DW_TAG_partial_unit support

Don't use DW_TAG_partial_units directly in dwflpp::iterate_over_cus
and dwarf_var_expanding_visitor::getcuscope. Descent into imported_units
in has_only_decl_members, dwflpp::iterate_over_globals,
dwflpp::iterate_over_types, dwflpp::iterate_over_labels
dwflpp::inner_die_containing_pc, dwflpp::print_locals,
dwflpp::print_members, dwflpp::find_struct_member and
dwarf_pretty_print::recurse_struct_members.

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