]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agouprobes_onthefly.exp: new testcase
Jonathan Lebon [Fri, 27 Jun 2014 18:57:02 +0000 (14:57 -0400)]
uprobes_onthefly.exp: new testcase

9 years agokprobes_onthefly.exp: new testcase
Jonathan Lebon [Fri, 27 Jun 2014 14:00:53 +0000 (10:00 -0400)]
kprobes_onthefly.exp: new testcase

9 years agohrtimer_onthefly.exp: new testcase
Jonathan Lebon [Tue, 24 Jun 2014 19:59:06 +0000 (15:59 -0400)]
hrtimer_onthefly.exp: new testcase

9 years agoonthefly_common.tcl: new file for on-the-fly testing
Jonathan Lebon [Thu, 10 Jul 2014 21:35:00 +0000 (17:35 -0400)]
onthefly_common.tcl: new file for on-the-fly testing

This Tcl file contains a library of common procs for on-the-fly testing.
Other testcases will source it.

9 years agoaffection.exp: new testcase
Jonathan Lebon [Tue, 24 Jun 2014 13:38:41 +0000 (09:38 -0400)]
affection.exp: new testcase

9 years agokprobes.c: add DEBUG_KPROBES to monitor kprobe [un]registration
Jonathan Lebon [Mon, 11 Aug 2014 15:23:21 +0000 (11:23 -0400)]
kprobes.c: add DEBUG_KPROBES to monitor kprobe [un]registration

This re-implements the functionality added by the the initially reverted
commit 9108b75 (revert commit fd777b5).

9 years agokprobes.c: link stap_dwarf_probe to stap_dwarf_kprobe
Jonathan Lebon [Wed, 16 Jul 2014 14:52:32 +0000 (10:52 -0400)]
kprobes.c: link stap_dwarf_probe to stap_dwarf_kprobe

Prior to PR5673, the stap_dwarf_kprobe struct was embedded in the
stap_dwarf_probe struct. It was then moved out due to issues mentioned
in PR5673.

In this patch we simply add back a pointer member in stap_dwarf_probe to
its own stap_dwarf_kprobe so that they may never be mistakenly shared.
This also greatly simplifies many of the function signatures which
previously took in the stap_dwarf_probe and the stap_dwarf_kprobe as
separate parameters.

9 years agokprobes.c: memset also after batch unregistration
Jonathan Lebon [Wed, 16 Jul 2014 15:16:29 +0000 (11:16 -0400)]
kprobes.c: memset also after batch unregistration

We should not only clear the kprobe struct after a single
unregistration, but also when batch unregistration is used. (Even though
batch unregistration is normally only done when exiting, but better safe
than sorry!).

9 years agokprobes.c: add misses before resetting struct
Jonathan Lebon [Wed, 16 Jul 2014 14:44:20 +0000 (10:44 -0400)]
kprobes.c: add misses before resetting struct

If we memset before, then all the missed counts will be reset as well.

9 years agokprobes.c: remove enabled_p from stap_dwarf_probe
Jonathan Lebon [Wed, 16 Jul 2014 14:27:37 +0000 (10:27 -0400)]
kprobes.c: remove enabled_p from stap_dwarf_probe

Using the kernel function kprobe_disabled(), we can directly query
whether a kprobe is enabled or not. This makes the enabled_p field
redundant. We replace its use with a stapkp_enabled() function which
simply call kprobe_disabled().

9 years agoruntime: remove STP_ON_THE_FLY
Jonathan Lebon [Tue, 15 Jul 2014 20:17:31 +0000 (16:17 -0400)]
runtime: remove STP_ON_THE_FLY

This patch removes the use of the STP_ON_THE_FLY macro so that
on-the-fly related code is always emitted/executed. When no probes use
conditions, the overhead is quite small: the cond_enabled field of each
stap_probe is set to 1 at start-up.

In general, blocks that were previously incompatible with dyninst and
were behind an STP_ON_THE_FLY guard are now emitted only if !usermode.

The tests were adjusted to not test STP_ON_THE_FLY_DISABLED, which no
longer exists.

9 years agoon-the-fly: handle non-0/1 probe condition expressions
Frank Ch. Eigler [Tue, 15 Jul 2014 22:03:06 +0000 (18:03 -0400)]
on-the-fly: handle non-0/1 probe condition expressions

It is necessary to evaluate a given if(FOO) expression with a !!
prefix in order to turn it into a 0/1 boolean for probe.cond_enabled
matching purposes.  With that done, a 1-bit field for cond_enabled is
sufficient.

9 years agokprobes.c: check for kernel version
Jonathan Lebon [Tue, 15 Jul 2014 13:34:55 +0000 (09:34 -0400)]
kprobes.c: check for kernel version

Support for kprobes enabling/disabling was added in v2.6.30 (kernel
commit de5bd88d). Guard arming related code with this check as well.

bla

9 years agokprobes.c: register as disabled instead of post disabling
Jonathan Lebon [Fri, 20 Jun 2014 19:10:53 +0000 (15:10 -0400)]
kprobes.c: register as disabled instead of post disabling

The register_kprobe() function supports settings the kprobe struct
flags member to KPROBE_FLAG_DISABLED to indicate that we want it
registered but disabled (see also Documentation/kprobes.txt).

This patch takes advantage of this by setting the flags member
accordingly during registration, rather than calling disable_kprobe()
after a successful registration.

9 years agoPR16861: reset kprobe struct and improve refresh
Jonathan Lebon [Thu, 19 Jun 2014 20:41:17 +0000 (16:41 -0400)]
PR16861: reset kprobe struct and improve refresh

We need to ensure that the stap_dwarf_kprobe struct is completely
zero'ed out after each unregistration so as not to affect future
registrations which will use the same struct.

We also modify the signature of systemtap_module_refresh so that the
name of the module is passed. This allows us to only update the kprobes
related to that module, rather than checking all of them.

Finally, we also set the priority of the module notifier to 0 to
indicate we don't care in which order we are called (i.e. it shouldn't
matter whether we're called before or after the kprobes callback).

9 years agokprobes.c: split stapkp_refresh_probe()
Jonathan Lebon [Tue, 17 Jun 2014 21:42:10 +0000 (17:42 -0400)]
kprobes.c: split stapkp_refresh_probe()

We break down stapkp_refresh_probe() into stapkp_enable_probe() and
stapkp_disable_probe(). We also introduce predicate functions
stapkp_should_enable_probe() and stapkp_should_disable_probe() to
improve clarity.

9 years agokprobes.c: refactor stapkp_register_probe()
Jonathan Lebon [Tue, 17 Jun 2014 20:54:47 +0000 (16:54 -0400)]
kprobes.c: refactor stapkp_register_probe()

Here, we split the general stapkp_register_probe into a kprobe and
kretprobe variant, and then further split the work into preparing the
kprobe for registration and actually registering it.

9 years agokprobes.c: factor out stapkp_refresh_probe()
Jonathan Lebon [Tue, 17 Jun 2014 20:08:35 +0000 (16:08 -0400)]
kprobes.c: factor out stapkp_refresh_probe()

We take out everything from stapkp_refresh() related to actual
enable/disable and move it to stapkp_refresh_probe().

9 years agokprobes.c: factor out stapkp_unregister_probes()
Jonathan Lebon [Tue, 17 Jun 2014 19:07:12 +0000 (15:07 -0400)]
kprobes.c: factor out stapkp_unregister_probes()

In this commit, we do a few things:
1. We separate the kprobe nmissed accounting from actual unregistration.
   The stapkp_add_missed() function now solely takes care of this.
2. We abstract away support for bulk unregistration behind one main
   stapkp_unregister_probes() function. This function uses the bulk
   method if supported, falling back on manual one-by-one unregistration
   if not.

9 years agokprobes.c: factor out stapkp_unregister_probe()
Jonathan Lebon [Tue, 17 Jun 2014 18:03:22 +0000 (14:03 -0400)]
kprobes.c: factor out stapkp_unregister_probe()

Factor out the unregistration part of the code in stapkp_refresh() into
the new function stapkp_unregister_probe().

9 years agokprobes.c: factor out stapkp_register_probe() [2/2]
Jonathan Lebon [Tue, 17 Jun 2014 17:31:38 +0000 (13:31 -0400)]
kprobes.c: factor out stapkp_register_probe() [2/2]

This commit and the previous were split in two to make the diff more
legible.

In this commit, we actually replace the code we factored out in
stapkp_init() and stapkp_refresh() by a simple call to
stapkp_register_probe().

9 years agokprobes.c: factor out stapkp_register_probe() [1/2]
Jonathan Lebon [Wed, 18 Jun 2014 14:46:04 +0000 (10:46 -0400)]
kprobes.c: factor out stapkp_register_probe() [1/2]

This commit and the next were split in two to make the diff more
legible.

In this commit, we add a stapkp_register_probe() function which is
directly taken from stapkp_init() (also found in stapkp_refresh()).

9 years agokprobes.c: add stapkp_exit()
Jonathan Lebon [Tue, 17 Jun 2014 14:38:08 +0000 (10:38 -0400)]
kprobes.c: add stapkp_exit()

We move off everything from emit_module_exit() and into a new
stapkp_exit() function.

9 years agokprobes.c: add stapkp_refresh()
Jonathan Lebon [Tue, 17 Jun 2014 14:22:13 +0000 (10:22 -0400)]
kprobes.c: add stapkp_refresh()

We move off everything from emit_module_refresh() and into a new
stapkp_refresh() function.

9 years agokprobes.c: add stapkp_init()
Jonathan Lebon [Wed, 18 Jun 2014 14:39:50 +0000 (10:39 -0400)]
kprobes.c: add stapkp_init()

We move off everything from emit_module_init() and into a new
stapkp_init() function.

9 years agokprobes.c: new file for dwarf kprobes handling
Jonathan Lebon [Tue, 17 Jun 2014 13:50:38 +0000 (09:50 -0400)]
kprobes.c: new file for dwarf kprobes handling

This is the first in a series of patches to move off as much of the
static code previously emitted by dwarf_derived_probe_group into a new
runtime/linux/kprobes.c file. This should greatly help legibility and
maintainability. No refactoring will be performed until everything has
been moved over.

In this first patch, we simply move off as much as possible from
emit_module_decls() into kprobes.c.

The one tricky bit is whether the 'module' and 'section' members of the
stap_dwarf_probe struct is a char* or a char[]. This is determined
dynamically, but we use macros to allow us to still declare the struct
in kprobes.c.

9 years agouprobes-inode: add stapiu_consumer_[un]register()
Jonathan Lebon [Mon, 16 Jun 2014 19:14:39 +0000 (15:14 -0400)]
uprobes-inode: add stapiu_consumer_[un]register()

To ensure the 'registered' member of the stapiu_consumer struct is
always valid, only make assignments to it in stapiu_[un]register() which
does the actual uprobe_[un]register() call.

9 years agouprobes-inode: support on-the-fly [dis]arming
Jonathan Lebon [Mon, 16 Jun 2014 15:10:55 +0000 (11:10 -0400)]
uprobes-inode: support on-the-fly [dis]arming

We add support for uprobes arming/disarming:

- Upon finding new target processes, we skip uprobe registration if the
  associated probe handler's condition is not enabled.
- We add new functions stapiu_refresh() and stapiu_target_refresh(),
  which check if any of the uprobes need to be registered or
  unregistered according to the probe handler condition.
- We add the infrastructure needed for the stapiu_refresh() call to be
  emitted if using inode uprobes.

9 years agoruntime: add spaces in generated source
Jonathan Lebon [Mon, 16 Jun 2014 13:46:56 +0000 (09:46 -0400)]
runtime: add spaces in generated source

9 years agouprobes-inode: override on_the_fly_supported()
Jonathan Lebon [Fri, 13 Jun 2014 19:22:06 +0000 (15:22 -0400)]
uprobes-inode: override on_the_fly_supported()

As the first step towards adding on-the-fly support to uprobes, we
override the on_the_fly_supported() method to determine if inode-uprobes
is supported. This requires us to change the signature of the method to
also pass the systemtap_session object.

9 years agouprobes-inode.c: only mark as registered if successful
Jonathan Lebon [Fri, 13 Jun 2014 18:52:07 +0000 (14:52 -0400)]
uprobes-inode.c: only mark as registered if successful

After calling stapiu_register(), we would mark the consumer as
registered even if stapiu_register() failed.

Note that this isn't that dangerous since trying to unregister a
non-registered uprobe does nothing.

9 years agoruntime: print refresh report when -t given
Jonathan Lebon [Thu, 12 Jun 2014 20:59:22 +0000 (16:59 -0400)]
runtime: print refresh report when -t given

In addition to printing probe timings, when the -t option is given, info
about systemtap_module_refresh is also given if STP_ON_THE_FLY was
enabled. This gives an idea of the number of times refresh was called,
and the min/avg/max time it took to perform the refresh.

9 years agokprobes: support on-the-fly [dis]arming
Jonathan Lebon [Wed, 11 Jun 2014 20:18:08 +0000 (16:18 -0400)]
kprobes: support on-the-fly [dis]arming

Using the newly added on-the-fly infrastructure, we turn on support for
kprobes. This entails the following steps:

1. Override derived_probe::on_the_fly_supported() to return true to
   signal that on-the-lfy arming/disarming is supported.
2. Add an enabled_p field to the stap_dwarf_probe struct.
3. Inside systemtap_module_init(), after registering the k[ret]probe,
   disable it right away if the probe handler condition is not met.
4. Inside systemtap_module_refresh():
   - If a new module was inserted, then after registering the
     k[ret]probe, disable it right away if the probe handler condition
     is not met.
   - If the module was removed, then unset the enabled_p field.
   - If the kprobe is currently disabled, but the probe handler
     condition is now true, enable it.
   - If the kprobe is currently enabled, but the probe handler condition
     is now false, disable it.

9 years agodwarf_derived_probe_group: improve formatting
Jonathan Lebon [Fri, 6 Jun 2014 19:01:25 +0000 (15:01 -0400)]
dwarf_derived_probe_group: improve formatting

No modifications, only formatting of the code for better legibility.

9 years agohrtimer probes: support on-the-fly [dis]arming
Jonathan Lebon [Mon, 2 Jun 2014 21:22:52 +0000 (17:22 -0400)]
hrtimer probes: support on-the-fly [dis]arming

This patch adds support for on-the-fly arming/disarming of hrtimer
probes. Although it is only supported for non-usermode, there were a few
changes required in dyninst/timer.c so that the same interface is
exposed for both usermode and kernel mode.

runtime/dyninst/timer.c

   - Decouple timer creation from timer starting by factoring out
     _stp_hrtimer_start() from _stp_hrtimer_create().
   - Make _stp_hrtimer_cancel() actually just cancel the timer, and not
     completely delete it.
   - Add new _stp_hrtimer_delete() to delete the timer.

runtime/linux/timer.c

   - Similarly, factor out _stp_hrtimer_start() from
     _stp_hrtimer_create().
   - Add new _stp_hrtimer_delete(), which also does a cancel.

tapset-timers.cxx

   - Declare hrtimer_derived_probe as a probe that supports on-the-fly
     operations.
   - In emit_module_init(): unconditionally create the timer, but if in
     STP_ON_THE_FLY mode, only bother to start it if its condition is
     met.
   - In emit_module_refresh(): check for which timers to start/cancel.

9 years agoruntime: lock module_refresh with mutex
Jonathan Lebon [Fri, 6 Jun 2014 17:52:39 +0000 (13:52 -0400)]
runtime: lock module_refresh with mutex

If STP_ON_THE_FLY is enabled, then we need to ensure that
systemtap_module_refresh() is never run concurrently. Since we use a
workqueue, no concurrency can occur from arm/disarm refreshes alone.
However, the module notifier could fire at any time.

9 years agoruntime: use workqueue to schedule systemtap_module_refresh()
Jonathan Lebon [Mon, 2 Jun 2014 15:51:38 +0000 (11:51 -0400)]
runtime: use workqueue to schedule systemtap_module_refresh()

In this patch, we check in the probe handler common epilogue whether a
module refresh is needed as determined by the probe handlers. If so, we
schedule_work() so that systemtap_module_refresh() is eventually called
to update the necessary probes.

9 years agoruntime: add DEBUG_STP_ON_THE_FLY and dbug_otf()
Jonathan Lebon [Tue, 3 Jun 2014 20:36:42 +0000 (16:36 -0400)]
runtime: add DEBUG_STP_ON_THE_FLY and dbug_otf()

9 years agotranslate.cxx: evaluate conditions in module_init and handlers
Jonathan Lebon [Mon, 2 Jun 2014 15:22:17 +0000 (11:22 -0400)]
translate.cxx: evaluate conditions in module_init and handlers

This patch ensures that the stap_probes[] cond_enabled field is updated
as required: once during systemtap_module_init(), and as needed in probe
handlers that may affect the result of condition evaluation (using the
derived_probe::affected_probe set populated in
semantic_pass_conditions()).

If the new evaluated value of the condition is different from its
previous value, then need_module_refresh is set (if this type of probe
supports on-the-fly arming/disarming), which will be acted upon in a
future patch.

9 years agoderived_probe: add on_the_fly_supported()
Jonathan Lebon [Mon, 2 Jun 2014 19:15:51 +0000 (15:15 -0400)]
derived_probe: add on_the_fly_supported()

We add a new function derived_probe::on_the_fly_supported(), which
defaults to false. As we add on-the-fly arming/disarming to various
probe types, we simply need to override this function to notify the
runtime that the operation is supported (and thus e.g. to refresh the
module when necessary).

In semantic_pass_conditions(), we now only turn on STP_ON_THE_FLY if one
of the probes with a condition supports it.

9 years agoruntime: split stap_probe struct definition from stap_probes
Jonathan Lebon [Fri, 6 Jun 2014 17:50:39 +0000 (13:50 -0400)]
runtime: split stap_probe struct definition from stap_probes

Because probe handlers will need to refer to the stap_probes[]
cond_enabled field, we need to define the stap_probe struct prior to the
probe handlers.

This patch achieves this by moving probe emitting in between the
stap_probe struct definition and the actual stap_probes[] array
declaration.

9 years agostap_probe struct: add cond_enabled field
Jonathan Lebon [Fri, 6 Jun 2014 17:56:36 +0000 (13:56 -0400)]
stap_probe struct: add cond_enabled field

The new cond_enabled field represents whether the condition of the
associated probe handler currently evaluates to true or false. This
field will be re-evaluated in probe handlers. This is why we also need
to unconst the stap_probes[] array.

9 years agosemantic_pass_conditions(): collect affected probes
Jonathan Lebon [Mon, 2 Jun 2014 14:49:04 +0000 (10:49 -0400)]
semantic_pass_conditions(): collect affected probes

In anticipation for on-the-fly probe arming/disarming, we change
semantic_pass_conditions() to not only inline the probe condition into
its body, but also to collect, for each probe, the set of probes whose
conditions may change after the probe's handler is run. That set is
stored in the new derived_probe::probes_with_affected_conditions.

These sets will be used by the translator to emit code that will check
whether affected probes should be armed/disarmed after a handler is run.

We also introduce the STP_ON_THE_FLY define which will gate all
on-the-fly related code and will be emitted only if required. Finally,
we have STP_ON_THE_FLY_DISABLED which can be used to disable all
on-the-fly arming/disarming.

9 years agoemit_module_refresh: print newline in error msg
Jonathan Lebon [Wed, 25 Jun 2014 18:42:39 +0000 (14:42 -0400)]
emit_module_refresh: print newline in error msg

9 years agoman/stapprobes.3stap: fix "an an" typo
Jonathan Lebon [Wed, 21 May 2014 21:10:18 +0000 (17:10 -0400)]
man/stapprobes.3stap: fix "an an" typo

9 years agojava probes: remove probe group
Jonathan Lebon [Wed, 21 May 2014 18:51:34 +0000 (14:51 -0400)]
java probes: remove probe group

Java probes decay to SDT marker probes. There is no Java-specific code
that needs to be emitted during C unparsing and thus no
java_derived_probe_group needed. We remove forward decls to a
non-existent java_derived_probe_group struct and the
java_derived_probes reference in systemtap_session.

9 years agoRevert "tapsets.cxx: add -DDEBUG_KPROBES tracing option for k*probe [un]registration"
Jonathan Lebon [Mon, 11 Aug 2014 15:32:39 +0000 (11:32 -0400)]
Revert "tapsets.cxx: add -DDEBUG_KPROBES tracing option for k*probe [un]registration"

This reverts commit 9108b75e1dcaf8f6b4aa3b961cfabeda4d1d1948.

This functionality will be added back very shortly.

9 years agoRemove a stowaway debug statement
Josh Stone [Mon, 11 Aug 2014 18:08:54 +0000 (11:08 -0700)]
Remove a stowaway debug statement

9 years agotranslate.cxx: use function in place of comparison
Abegail Jakop [Mon, 11 Aug 2014 15:17:10 +0000 (11:17 -0400)]
translate.cxx: use function in place of comparison

9 years agotranslate.cxx: reduce actionremaining after function calls
Abegail Jakop [Mon, 11 Aug 2014 14:31:47 +0000 (10:31 -0400)]
translate.cxx: reduce actionremaining after function calls

9 years agotestsuite: assuage worries of MCE/memory-failure dmesg during syscall tests
Frank Ch. Eigler [Sun, 10 Aug 2014 01:45:39 +0000 (21:45 -0400)]
testsuite: assuage worries of MCE/memory-failure dmesg during syscall tests

9 years agoPR17249: tolerate early module notifier calls with null mod->sect_attrs
Frank Ch. Eigler [Sun, 10 Aug 2014 01:16:32 +0000 (21:16 -0400)]
PR17249: tolerate early module notifier calls with null mod->sect_attrs

In the case of MODULE_STATE_COMING, we may encounter NULL sect_attrs,
and we must not crash.  Sadly, that case can mean the loss of ability
to probe module-init functions - i.e., breaking the bz6503 test case.

* runtime/transport/symbols.c (_stp_module_notifier): Don't assume
  that mod->sect_attrs is valid.  Treat COMING|LIVE notifications
  similarly, except LIVE should assume init.* gone gone gone,
  she been gone so long, she been gone gone gone so long.

9 years agoPR17232 take #3: mutex the control messages
Frank Ch. Eigler [Sun, 10 Aug 2014 01:31:34 +0000 (21:31 -0400)]
PR17232 take #3: mutex the control messages

As per jistone's advice, simplify control message control by imposing
a mutex over the whole receive-side handling of a ctl message.  That
precludes concurrent or reentrant messages (independent of /ctl
open-time limits or threading assumptions).  It lets the start and
exit handling functions keep track with fewer state variables.

In a way, this elaborates upon a reversion of commit #262f7598.

* runtime/transport/control.c (_stp_ctl_write_cmd): Use a new static
  cmd_mutex for ctl message handling.  Don't bother with counters and
  flags for startedness etc; let the lower level functions handle
  that.  Handle error exits via goto out instead of return to assure
  mutex unlocks.
* runtime/transport/transport.c (_stp_handle_start,
  _stp_cleanup_and_exit): Drop the stp_transport_mutex control,
  explain why unnecessary.  Be more paranoid during module-notifier
  cleanup.

9 years agoPR17232 variant #2: in runtime, let STP_EXIT nest within STP_START
Frank Ch. Eigler [Sat, 9 Aug 2014 00:31:01 +0000 (20:31 -0400)]
PR17232 variant #2: in runtime, let STP_EXIT nest within STP_START

Uncommitted variant #1 consisted of using module refcounts in the
generated systemtap_module_init/exit function pair to ensure that an
uncleaned module cannot be unloaded.  That precluded cleanup via
rmmod(8), so a robust but inconvenient solution.

This variant #2 consists of a surgical fix, wherein an STP_EXIT
message comes in during an STP_START is used to set an atomic flag for
deferred _stp_cleanup_and_exit() handling.

A variant #3 is coming soon, using a protocol-wide command-message
mutex, like we did back before commit #262f7598.

9 years agotapsets.cxx: add -DDEBUG_KPROBES tracing option for k*probe [un]registration
Frank Ch. Eigler [Fri, 8 Aug 2014 20:58:37 +0000 (16:58 -0400)]
tapsets.cxx: add -DDEBUG_KPROBES tracing option for k*probe [un]registration

9 years agoruntime: let _stp_print_flush() talk less on -DDEBUG_TRANS
Frank Ch. Eigler [Fri, 8 Aug 2014 20:56:32 +0000 (16:56 -0400)]
runtime: let _stp_print_flush() talk less on -DDEBUG_TRANS

A 0-length call is very common and uninformative.

9 years agoregenerate examples index
Josh Stone [Fri, 8 Aug 2014 23:34:15 +0000 (16:34 -0700)]
regenerate examples index

9 years agotapset: explicitly mark probing_32bit_app() long
Josh Stone [Fri, 8 Aug 2014 22:11:45 +0000 (15:11 -0700)]
tapset: explicitly mark probing_32bit_app() long

9 years agoPR17242: Initialize tapset global arrays early on
Josh Stone [Fri, 8 Aug 2014 20:46:56 +0000 (13:46 -0700)]
PR17242: Initialize tapset global arrays early on

Some of the tapset arrays were lazy-initialized on their function's
first call, but that requires the caller to always take a write lock,
and also makes those functions impure.

Now there is a "probe init" alias for the earliest possible begin probe,
and all of these arrays use that alias to initialize their contents.
None of these are big enough to expect noticeable overhead from having
to always initialize them.

9 years agoKeep perf counters in a vector instead of an unordered map.
Stan Cox [Fri, 8 Aug 2014 18:31:23 +0000 (14:31 -0400)]
Keep perf counters in a vector instead of an unordered map.

* session.h (perf_counters): Use a vector instead of unordered map so
  iteration is in a predictable order.
* tapsets.cxx (visit_perf_op): Use it.
  (dwarf_derived_probe): Likewise
  (emit_probe_local_init): Likewise
  (emit_module_utrace_decls): Likewise
  (emit_module_inode_decls): Likewise
* tapset-perfmon.cxx (perf_builder::build): Likewise
* elaborate.h (perf_counter_refs): Make a set of strings.
* perf.sh:  New test.
* perf.exp: Use it.

9 years agostap.1: mention sysrq-x secureboot-disabling keystroke on some kernels
Frank Ch. Eigler [Wed, 6 Aug 2014 23:27:18 +0000 (19:27 -0400)]
stap.1: mention sysrq-x secureboot-disabling keystroke on some kernels

9 years agoAdd Secure Boot blurb to man/stap.1.
David Smith [Tue, 5 Aug 2014 21:12:33 +0000 (16:12 -0500)]
Add Secure Boot blurb to man/stap.1.

9 years agoPR16716 partial fix: Fix types in 'syscall.{ftruncate,[l]lseek,truncate}'.
David Smith [Tue, 5 Aug 2014 18:24:59 +0000 (13:24 -0500)]
PR16716 partial fix: Fix types in 'syscall.{ftruncate,[l]lseek,truncate}'.

* tapset/linux/syscalls.stp: Fix syscall.ftruncate[64], syscall.llseek,
  and syscall.lseek types and nesting.
* tapset/linux/syscalls2.stp: Fix syscall.truncate types, nesting, and
  formatting.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/nd_syscalls.stp: Fix nd_syscall.ftruncate nesting and
  formatting.
* tapset/linux/aux_syscalls.stp (_seek_whence_str): Update.
* runtime/linux/compat_unistd.h: Add '__NR_[gs]etsockopt' defines.
* testsuite/systemtap.syscall/readwrite.c: Add more tests.
* testsuite/systemtap.syscall/trunc.c: Ditto.

9 years agoNEWS: retroactively add secureboot wiki link
Frank Ch. Eigler [Mon, 4 Aug 2014 21:23:43 +0000 (17:23 -0400)]
NEWS: retroactively add secureboot wiki link

9 years agoKeep list of perf counters in an unordered list.
Stan Cox [Fri, 1 Aug 2014 20:22:36 +0000 (16:22 -0400)]
Keep list of perf counters in an unordered list.

* session.h (perf_counters):  Use unordered_map instead of map.
* tapsets.cxx:  Likewise for all perf_counters iterators.

9 years agoAdd scripts to test systemtap probes on a set of kernel functions.
David Smith [Fri, 1 Aug 2014 15:53:18 +0000 (10:53 -0500)]
Add scripts to test systemtap probes on a set of kernel functions.

* scripts/kprobes_test/stap_probes_test.py: New script. While debugging
  PR17140, I needed a script to bisect a list of kernel functions to put
  systemtap probes on.
* scripts/kprobes_test/stap_gen_code.py: Ditto.
* scripts/kprobes_test/stap_run_module.py: Ditto.
* scripts/kprobes_test/README: Update with better instructions.
* scripts/kprobes_test/config_opts.py: Update comments.
* scripts/kprobes_test/monitor_system.py: Add beaker system monitoring
  instructions.

9 years agoRemove dtrace --types sdt_misc test.
Stan Cox [Wed, 30 Jul 2014 20:24:44 +0000 (16:24 -0400)]
Remove dtrace --types sdt_misc test.

* (sdt_misc.exp, sdt_misc_.d):  Remove test for dtrace --types.
* listing_mode.exp: Fix typo.

9 years agosystemtap.exp: add timer probe to testsuite rc file
Abegail Jakop [Tue, 29 Jul 2014 18:49:15 +0000 (14:49 -0400)]
systemtap.exp: add timer probe to testsuite rc file

9 years agoAdd plt.return probes.
Stan Cox [Tue, 29 Jul 2014 01:07:39 +0000 (21:07 -0400)]
Add plt.return probes.

* tapsets.cxx (query_one_plt):  iterate_over_modules instead of
  derive_probes to reduce plt.statement visibility.
  (register_plt_variants): Remove plt.statement  Add plt.return
* plt.exp:  Add test for plt.return
* plt.stp:  Likewise
* list.exp (test_plt_list):  Likewise.
* listing_mode.exp: Remove plt.statement tests  Add plt.return tests
* unprivileged_myproc.exp Likewise.
* unprivileged_probes.exp Likewise.

9 years agoPR17101: tweak NEWS
Frank Ch. Eigler [Fri, 25 Jul 2014 19:35:09 +0000 (15:35 -0400)]
PR17101: tweak NEWS

Make another -E suggestion.

9 years agoPR17101: updated docs and added a test case
Abegail Jakop [Fri, 25 Jul 2014 18:41:55 +0000 (14:41 -0400)]
PR17101: updated docs and added a test case

9 years agoPR17101: allow additional scripts using -E SCRIPT
Abegail Jakop [Fri, 25 Jul 2014 18:34:29 +0000 (14:34 -0400)]
PR17101: allow additional scripts using -E SCRIPT

cmdline: added "E" to the short options
elaborate: adapted to be able to perform the semantic pass on the
multiple inputs from user_files
main: parse and store the inputs in user_files, and give the additional
scripts new source "file" names (<input##>).
parse: parse function now has a parameter for the source "file" name
session: accept and store additional scripts for parsing, separate from
the cmdline_script. an additional script won't set have_script to true.

9 years agolatencytap.stp: explain another delay
Frank Ch. Eigler [Fri, 25 Jul 2014 17:18:04 +0000 (13:18 -0400)]
latencytap.stp: explain another delay

9 years agolatencytap sample: update, compress
Frank Ch. Eigler [Fri, 25 Jul 2014 17:08:55 +0000 (13:08 -0400)]
latencytap sample: update, compress

Added a few more unexplained backtraces (as visible with -Gdebug=1
runs), automated explanation-width calculations, and compressed the
initialization of the explanation/priority lookup tables.

10 years agosystemtap-service.exp: use catch with exec, increase timeouts
Martin Cermak [Wed, 23 Jul 2014 17:39:35 +0000 (19:39 +0200)]
systemtap-service.exp: use catch with exec, increase timeouts

10 years agoFixed PR17178 by updating syscall.[gs]etsockopt probes.
David Smith [Tue, 22 Jul 2014 20:55:48 +0000 (15:55 -0500)]
Fixed PR17178 by updating syscall.[gs]etsockopt probes.

* tapset/linux/syscalls.stp (syscall.getsockopt): Fixed to handle inlined
  calls to compat_sys_getsockopt() by decoding
  socketcall()/compat_sys_socketcall() calls instead.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp (syscall.compat_select): Fixed sign handling
  of 'n' argument.
  (syscall.setsockopt): Fixed to handle inlined calls to
  compat_sys_setsockopt() by decoding socketcall()/compat_sys_socketcall()
  instead.
* tapset/linux/nd_syscalls2.stp (nd_syscall.setsockopt): Fixed to handle
  inlined calls to compat_sys_setsockopt() by decoding
  socketcall()/compat_sys_socketcall() instead.

10 years agotranslator: propagate DWARF types through function returns
Josh Stone [Tue, 22 Jul 2014 19:51:15 +0000 (12:51 -0700)]
translator: propagate DWARF types through function returns

When all return statements are in agreement, their type_details are
copied to the functiondecl, and functioncalls may pick up the type.

10 years agotranslator: propagate types to .return saved vars
Josh Stone [Tue, 22 Jul 2014 17:22:12 +0000 (10:22 -0700)]
translator: propagate types to .return saved vars

10 years agoPR17191: redefine %license within each %files block
Frank Ch. Eigler [Tue, 22 Jul 2014 11:39:46 +0000 (07:39 -0400)]
PR17191: redefine %license within each %files block

10 years agoinitscript: check final initramfs for systemtap files
Jonathan Lebon [Mon, 21 Jul 2014 14:58:27 +0000 (10:58 -0400)]
initscript: check final initramfs for systemtap files

As a sanity-check for a successful initramfs creation, we check using
lsinitrd that if a script was inserted then the initramfs contains the
staprun executable. This would indicate that dracut properly picked up
the stap dracut module and included it in the initramfs.

10 years agoFix nd_syscalls use in syscalls_by_pid.stp
Josh Stone [Fri, 18 Jul 2014 22:51:47 +0000 (15:51 -0700)]
Fix nd_syscalls use in syscalls_by_pid.stp

10 years agoExempt from buildok/netfilter-glob.stp
Josh Stone [Fri, 18 Jul 2014 22:49:55 +0000 (15:49 -0700)]
Exempt from buildok/netfilter-glob.stp

10 years agoAdd a #! to transok/direct_rec_func.stp
Josh Stone [Fri, 18 Jul 2014 22:49:14 +0000 (15:49 -0700)]
Add a #! to transok/direct_rec_func.stp

10 years agoMerge remote-tracking branch 'origin/master' into autocast
Josh Stone [Fri, 18 Jul 2014 22:24:43 +0000 (15:24 -0700)]
Merge remote-tracking branch 'origin/master' into autocast

10 years agoFixed PR17181 by making utrace handle interrupting processes better.
David Smith [Fri, 18 Jul 2014 20:49:39 +0000 (15:49 -0500)]
Fixed PR17181 by making utrace handle interrupting processes better.

* runtime/stp_utrace.c (utrace_init): Use kallsyms_lookup_name() to lookup
  "wake_up_state" if needed.
  (stp_task_notify_resume): New function to handle the details of adding a
  resume handler.
  (utrace_cleanup): Only output debug printk's if STP_TF_DEBUG is defined.
  (utrace_set_events): Improve check.
  (utrace_do_stop): Call stp_task_notify_resume() instead of inline code.
  (utrace_wakeup): Call stp_wake_up_state() instead of wake_up_process()
  to avoid a WARN(). Call stp_task_notify_resume() instead of inline
  code.
  (utrace_control): Call stp_task_notify_resume() instead of inline code.
  (finish_report): Ditto.
  (finish_resume_report): Add UTRACE_INTERRUPT support.
  (utrace_resume): Handle UTRACE_INTERRUPT.
* runtime/linux/task_finder2.c (stap_task_finder_post_init): Go back to
  sending UTRACE_INTERRUPT to all tasks.
* buildrun.cxx (compile_pass): Add export tests for 'wake_up_state' and
  'try_to_wake_up'.
* runtime/linux/runtime.h: Added 'kallsyms_wake_up_state' declaration when
  necessary.
* testsuite/systemtap.base/process_resume.c: New file.
* testsuite/systemtap.base/process_resume.exp: New file.

10 years agozanata: turn of another crank
Frank Ch. Eigler [Wed, 16 Jul 2014 00:50:17 +0000 (20:50 -0400)]
zanata: turn of another crank

10 years agozanata: fine-tune zanata instructions, run through a regen cycle
Frank Ch. Eigler [Wed, 16 Jul 2014 00:04:56 +0000 (20:04 -0400)]
zanata: fine-tune zanata instructions, run through a regen cycle

10 years agoAdd get_number_param that accepts 'long long' parameter
William Cohen [Tue, 15 Jul 2014 23:58:45 +0000 (19:58 -0400)]
Add get_number_param that accepts 'long long' parameter

On 32-bit machines such as arm need to have version of get_number_param method
that takes 'long long' (64-bit) values.

10 years agodocument usage of zanata as online translation tool
Frank Ch. Eigler [Tue, 15 Jul 2014 23:46:12 +0000 (19:46 -0400)]
document usage of zanata as online translation tool

10 years agoMerge branch 'ajakop/17131'
Abegail Jakop [Tue, 15 Jul 2014 19:24:15 +0000 (15:24 -0400)]
Merge branch 'ajakop/17131'

10 years agoprocess_by_pid*: remove unnecessary sleep and ifs
Abegail Jakop [Tue, 15 Jul 2014 19:22:40 +0000 (15:22 -0400)]
process_by_pid*: remove unnecessary sleep and ifs

10 years agotapsets.cxx: moved ctor to fix issue with prev commit
Abegail Jakop [Tue, 15 Jul 2014 18:54:33 +0000 (14:54 -0400)]
tapsets.cxx: moved ctor to fix issue with prev commit

10 years agotapsets.cxx: rearranged code to reflect original order
Abegail Jakop [Tue, 15 Jul 2014 18:38:35 +0000 (14:38 -0400)]
tapsets.cxx: rearranged code to reflect original order

10 years agoNEWS: added blurbs about PID-based process probes
Abegail Jakop [Tue, 15 Jul 2014 16:00:34 +0000 (12:00 -0400)]
NEWS: added blurbs about PID-based process probes

10 years agoprocess_by_pid.* : test case for PR17131
Abegail Jakop [Tue, 15 Jul 2014 15:47:40 +0000 (11:47 -0400)]
process_by_pid.* : test case for PR17131

10 years agotestsuite kill proc: log failed kills
Jonathan Lebon [Mon, 14 Jul 2014 20:35:29 +0000 (16:35 -0400)]
testsuite kill proc: log failed kills

If kill doesn't terminate nicely, also log what it outputs.

10 years agotapsets.cxx: follow naming conventions and set pid_val
Abegail Jakop [Mon, 14 Jul 2014 21:28:46 +0000 (17:28 -0400)]
tapsets.cxx: follow naming conventions and set pid_val

10 years agoutrace_p4.exp: fixed probes to probe valid PIDs
Abegail Jakop [Mon, 14 Jul 2014 20:40:33 +0000 (16:40 -0400)]
utrace_p4.exp: fixed probes to probe valid PIDs

10 years agomax_action_info: don't emit if --suppress-time-limits given
Jonathan Lebon [Mon, 14 Jul 2014 19:15:28 +0000 (15:15 -0400)]
max_action_info: don't emit if --suppress-time-limits given

We don't want any action accounting when --suppress-time-limits is
given.

10 years agotapsets.cxx: limit dwarf process(PID) probes to PID
Abegail Jakop [Mon, 14 Jul 2014 15:13:12 +0000 (11:13 -0400)]
tapsets.cxx: limit dwarf process(PID) probes to PID

tapsets: for dwarf process(PID) probes restrict the probing to
that specific process instead of to the processes that run the
same program.

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