]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agoPR16716 partial fix: Fix types for the flock syscall
Martin Cermak [Thu, 25 Sep 2014 07:24:36 +0000 (09:24 +0200)]
PR16716 partial fix: Fix types for the flock syscall

* tapset/linux/syscalls.stp: Fix types
* testsuite/systemtap.syscall/flock.c: New testcase

9 years agoPR16806: tweak test case to guarantee stoppage better
Frank Ch. Eigler [Thu, 25 Sep 2014 01:41:01 +0000 (21:41 -0400)]
PR16806: tweak test case to guarantee stoppage better

We run the "./loop" executable under /usr/bin/timeout control, but on
RHEL6, uprobes can take a while to sync up for some reason, leading to
a testsuite hang.  Switch to timeout -s KILL, moohahahaha, from orbit.

9 years agopo i18n regen
Frank Ch. Eigler [Wed, 24 Sep 2014 19:53:15 +0000 (15:53 -0400)]
po i18n regen

9 years agostp: rt: fix preemptible bug_on for STAT_GET_CPU
Santosh Shukla [Mon, 22 Sep 2014 07:27:02 +0000 (12:57 +0530)]
stp: rt: fix preemptible bug_on for STAT_GET_CPU

STAT_GET_CPU to use raw_smp_xxx api in -rt fixes below bug on

BUG: using smp_processor_id() in preemptible [00000000 00000000] code: rmmod/56155
caller is _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
CPU: 6 PID: 56155 Comm: rmmod Tainted: GF          O 3.14.12-rt-rt9+ #2
Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013
 ffff88040819ae80 ffff8803d86c7dc8 ffffffff81602b13 0000000000000006
 ffff8803d86c7de0 ffffffff812e5575 000000006426532c ffff8803d86c7e08
 ffffffffa0877c1d ffffffffa0883c00 ffffffffa0823118 00008fd170541a19
Call Trace:
 [<ffffffff81602b13>] dump_stack+0x4e/0x7a
 [<ffffffff812e5575>] debug_smp_processor_id+0x105/0x120
 [<ffffffffa0877c1d>] _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffffa087ad0f>] systemtap_module_refresh+0x10f/0x1d0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffffa087c8a1>] _stp_module_notifier+0x41/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffff8160d4ed>] ? kprobes_module_callback+0x12d/0x140
 [<ffffffff8160c75c>] notifier_call_chain+0x4c/0x70
 [<ffffffff8109805d>] __blocking_notifier_call_chain+0x4d/0x70
 [<ffffffff81098096>] blocking_notifier_call_chain+0x16/0x20
 [<ffffffff810eb006>] SyS_delete_module+0x146/0x1c0
 [<ffffffff81611166>] ? int_signal+0x12/0x17
 [<ffffffff81610ea9>] system_call_fastpath+0x16/0x1b

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace stp_print lock with stp style lock
Santosh Shukla [Mon, 22 Sep 2014 07:27:01 +0000 (12:57 +0530)]
stp: rt: replace stp_print lock with stp style lock

-rt mode preemptable spin lock lead to deadlock causes x86 box to freeze.
Replacing spin lock with stp type raw lock solves the problem. Observed
deadlock in make installcheck testsuite for sched_switch.stp test case.

Crash backtrace:
PID: 0      TASK: ffff880419f50000  CPU: 11  COMMAND: "swapper/11"
 #4 [ffff88042d963bc0] _raw_spin_lock at ffffffff81608c02
 #5 [ffff88042d963bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d963c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d963c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d963cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d963cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

PID: 0      TASK: ffff880419f36780  CPU: 10  COMMAND: "swapper/10"
 #4 [ffff88042d943bc0] _raw_spin_lock at ffffffff81608bf8
 #5 [ffff88042d943bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d943c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d943c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d943cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d943cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

PID: 0      TASK: ffff880419f35a90  CPU: 9   COMMAND: "swapper/9"
 #4 [ffff88042d923bc0] _raw_spin_lock at ffffffff81608bf8
 #5 [ffff88042d923bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d923c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d923c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d923cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d923cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace addr_map_lock rd/wr lock with stp type raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:27:00 +0000 (12:57 +0530)]
stp: rt: replace addr_map_lock rd/wr lock with stp type raw lock

Without this change, Noticed that make installcheck freezes x86_64 box, testing
done on IvyBridge v2 12 core (HT). With crash post mortem analysis observed
that multiple threads grabs rd lock and get preempted in rt mode which
shouldn't ideally be the expected flow. rd/wr lock is preemptible which is
causing this problem for -rt mode so replace them with stp style raw lock.
However I poited out in other patches that replacement of rd/wr with rcu lock
in general better approach, we'll revisit them later(todo).

Crash log:

PID: 795    TASK: ffff8804185b5a90  CPU: 9   COMMAND: "migration/9"
 #4 [ffff8804185fdc28] _raw_spin_lock at ffffffff81608c02
 #5 [ffff8804185fdc38] try_to_wake_up at ffffffff810a4c35
 #6 [ffff8804185fdc80] wake_up_lock_sleeper at ffffffff810a4ee8
 #7 [ffff8804185fdc90] wakeup_next_waiter at ffffffff810bc6fd
 #8 [ffff8804185fdcd0] __rt_spin_lock_slowunlock at ffffffff81607b49
 #9 [ffff8804185fdce8] rt_spin_lock_slowunlock at ffffffff81607b9a
 #6 [ffff88042d803c18] __rt_spin_lock at ffffffff81608df5
 #7 [ffff88042d803c28] rt_read_lock at ffffffff816090b0
 #8 [ffff88042d803c40] rt_read_lock_irqsave at ffffffff816090ce
 #9 [ffff88042d803c50] lookup_bad_addr at ffffffffa0818dc8 [stap_674aee0a10a6c961c424f3bb2537e01f_12442]
 #10 [ffff88042d803c70] function__dwarf_cast_get_cast_8 at ffffffffa08194ab

PID: 0      TASK: ffffffff8191a460  CPU: 0   COMMAND: "swapper/0"
 #4 [ffff88042d803b78] _raw_spin_lock at ffffffff81608c02
 #5 [ffff88042d803b88] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d803c18] __rt_spin_lock at ffffffff81608df5
 #7 [ffff88042d803c28] rt_read_lock at ffffffff816090b0
 #8 [ffff88042d803c40] rt_read_lock_irqsave at ffffffff816090ce
 #9 [ffff88042d803c50] lookup_bad_addr at ffffffffa0818dc8 [stap_674aee0a10a6c961c424f3bb2537e01f_12442]

PID: 12444  TASK: ffff880410920cf0  CPU: 10  COMMAND: "stapio"
 #11 [ffff88042d943e18] _raw_spin_lock at ffffffff81608bfb
 #12 [ffff88042d943e28] scheduler_tick at ffffffff810a2cbe
 #13 [ffff88042d943e58] update_process_times at ffffffff8107cc32
 #14 [ffff88042d943e80] tick_sched_handle at ffffffff810e1235
 #15 [ffff88042d943ea0] tick_sched_timer at ffffffff810e14b4
 #16 [ffff88042d943ec8] __run_hrtimer at ffffffff81096407
 #17 [ffff88042d943f08] hrtimer_interrupt at ffffffff81097110
 #18 [ffff88042d943f80] local_apic_timer_interrupt at ffffffff81047814
 #19 [ffff88042d943f98] smp_apic_timer_interrupt at ffffffff8161393f
 #20 [ffff88042d943fb0] apic_timer_interrupt at ffffffff816122dd

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_task_work_list_lock to stp raw
Santosh Shukla [Mon, 22 Sep 2014 07:26:59 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_task_work_list_lock to stp raw

Fixes this bug_on for -rt case :

[ 2184.284672]  [<ffffffff81602329>] dump_stack+0x4e/0x7a
[ 2184.284679]  [<ffffffff815fcaed>] __schedule_bug+0x9f/0xad
[ 2184.284686]  [<ffffffff816057f7>] __schedule+0x627/0x6a0
[ 2184.284694]  [<ffffffff810be5fb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[ 2184.284699]  [<ffffffff816058a0>] schedule+0x30/0xa0
[ 2184.284707]  [<ffffffff8160727d>] rt_spin_lock_slowlock+0xbd/0x1f0
[ 2184.284714]  [<ffffffff81607e25>] rt_spin_lock+0x25/0x30
[ 2184.284727]  [<ffffffffa08ae573>] __stp_tf_alloc_task_work+0x43/0x90 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284737]  [<ffffffffa08aff8b>] __stp_utrace_task_finder_target_syscall_exit+0xdb/0x350 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284747]  [<ffffffffa08a91d5>] utrace_report_syscall_exit+0xc5/0x110 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284753]  [<ffffffff81023ce0>] syscall_trace_leave+0x100/0x130
[ 2184.284758]  [<ffffffff8161090b>] int_check_syscall_exit_work+0x34/0x3d

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace utrace_struct lock to stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:58 +0000 (12:56 +0530)]
stp: rt: replace utrace_struct lock to stp style raw lock

Patch fixes below bug_on for -rt mode kernel:

[ 3375.430085]  [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430090]  [<ffffffff815da3a4>] dump_stack+0x19/0x1b
[ 3375.430094]  [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430098]  [<ffffffff815d49d7>] __schedule_bug+0xa0/0xae
[ 3375.430102]  [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430107]  [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430110]  [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430116]  [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430125]  [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430131]  [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430138]  [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430143]  [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430148]  [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430156]  [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430161]  [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430168]  [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430173]  [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d
[ 3375.430178]  [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430184]  [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430191]  [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace utrace->lock with stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:57 +0000 (12:56 +0530)]
stp: rt: replace utrace->lock with stp style raw lock

In preempt-rt kernel, At the time of launching stap script noticed below
bug_on. Replacing spinlock with Raw fixes this problem.

[  159.433464] Preemption disabled at:[<ffffffff810b74d6>] remove_wait_queue+0x36/0x40

[  159.433466] CPU: 8 PID: 6723 Comm: bash Tainted: GF       W  O 3.14.12-rt-rt9+ #1
[  159.433467] Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013
[  159.433471]  ffff88042d917d80 ffff88040f623d90 ffffffff81602b13 ffff8804121e3980
[  159.433474]  ffff88040f623da0 ffffffff815fd2fb ffff88040f623df8 ffffffff81606017
[  159.433478]  ffff88040f623fd8 0000000000017d80 0000000000017d80 ffffffff810bcbcb
[  159.433478] Call Trace:
[  159.433481]  [<ffffffff81602b13>] dump_stack+0x4e/0x7a
[  159.433484]  [<ffffffff815fd2fb>] __schedule_bug+0x9f/0xad
[  159.433486]  [<ffffffff81606017>] __schedule+0x627/0x6a0
[  159.433489]  [<ffffffff810bcbcb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[  159.433492]  [<ffffffff816060c0>] schedule+0x30/0xa0
[  159.433495]  [<ffffffff81607a9d>] rt_spin_lock_slowlock+0xbd/0x1f0
[  159.433498]  [<ffffffff81608645>] rt_spin_lock+0x25/0x30
[  159.433503]  [<ffffffffa076fbf5>] start_report+0x45/0xb0 [stap_c108d00c22143294d42db713b804dbb9_10325]
[  159.433508]  [<ffffffffa0773e38>] utrace_report_syscall_exit+0x88/0x110 [stap_c108d00c22143294d42db713b804dbb9_10325]
[  159.433511]  [<ffffffff81023d30>] syscall_trace_leave+0x100/0x130
[  159.433514]  [<ffffffff8161114b>] int_check_syscall_exit_work+0x34/0x3d

Note : This module afaiu is prime candidate to benifit rcu locking primitives
and same some cycle, should improve overall performance, more scallable.
[This is general desing improvement so keeping those changes out from this
patch. .todo]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:56 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock

To make it -rt aware. Description similar to previous patch
commit, RCU is better substitute for rd/wr lock [todo]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_map_lock rd/wr lock with stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:55 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_map_lock rd/wr lock with stp style raw lock

noticed that in rt mode - read and write_lock lead to several bug_on :

[ 1033.544821]  ffff880035463d38 ffffffff815fcaed ffff880035463d90 ffffffff816057f7
[ 1033.544826]  ffff880035463fd8 0000000000017e80 0000000000017e80 ffffffff810be5fb
[ 1033.544826] Call Trace:
[ 1033.544830]  [<ffffffff81602329>] dump_stack+0x4e/0x7a
[ 1033.544834]  [<ffffffff815fcaed>] __schedule_bug+0x9f/0xad
[ 1033.544838]  [<ffffffff816057f7>] __schedule+0x627/0x6a0
[ 1033.544842]  [<ffffffff810be5fb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[ 1033.544846]  [<ffffffff816058a0>] schedule+0x30/0xa0
[ 1033.544850]  [<ffffffff8160727d>] rt_spin_lock_slowlock+0xbd/0x1f0
[ 1033.544856]  [<ffffffff81607df5>] __rt_spin_lock+0x25/0x30
[ 1033.544858]  [<ffffffff816080b0>] rt_read_lock+0x30/0x40
[ 1033.544861]  [<ffffffff816080ce>] rt_read_lock_irqsave+0xe/0x20
[ 1033.544867]  [<ffffffffa08a9b89>] __stp_tf_get_map_entry+0x19/0xc0 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544873]  [<ffffffffa08afedd>] __stp_utrace_task_finder_target_syscall_exit+0x5d/0x350 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544889]  [<ffffffffa08a91c5>] utrace_report_syscall_exit+0xc5/0x110 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544893]  [<ffffffff81023ce0>] syscall_trace_leave+0x100/0x130
[ 1033.544896]  [<ffffffff8161090b>] int_check_syscall_exit_work+0x34/0x3d

Replacing rd/wr lock with raw lock supress these bug_on. However more suitable
fix is to replace read/write lock in general with RCU style lock, followed by
use of rcu variant hlist api but current module desing need to go through some
real desing chnages in order of adding and freeing entry to/from free list,
which i choose work upon as separate patch[todo.]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: locking helper api
Santosh Shukla [Mon, 22 Sep 2014 07:26:54 +0000 (12:56 +0530)]
stp: rt: locking helper api

Locking helper api used for replacing -rt and non-rt specific locks with common
helper lock starts with prefix stp_.  -rt version of locking api compatible to
kernel version 3.0 and greater. Older -rt version can be supported by adding
more kernel version checks, ifdefs in header file.. I haven't tested on
those(older) kernel version so not including code for now. Tested for
3.10.40-rt38 and 3.14.12-rt9.

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agoIgnore C declarations in .d file and use string pattern matching as a fallback mechanism.
Stan Cox [Tue, 23 Sep 2014 17:42:54 +0000 (13:42 -0400)]
Ignore C declarations in .d file and use string pattern matching as a fallback mechanism.

* dtrace.in (_PypProvider):  SkipTo the provider{...}
(main): If pyparsing fails, then fallback to pattern matching.

* dtrace.exp:  Add a fallback test.

9 years agoPR16716 partial fix: Fix types and compat support in timer syscalls family
Martin Cermak [Tue, 23 Sep 2014 07:03:02 +0000 (09:03 +0200)]
PR16716 partial fix: Fix types and compat support in timer syscalls family

* tapset/linux/syscalls2.stp:
  syscall.timer_{delete,getoverrun,gettime,settime}: Fix types
  syscall.timer_gettime: Add compat support
* tapset/linux/nd_syscalls2.stp (timer_gettime): Add compat support
* tapset/linux/aux_syscalls.stp: Print the pointer value
  when _stp_copy_from_user() fails instead of reporting "UNKNOWN"
* testsuite/systemtap.syscall/test.tcl: Link with -lrt to allow
  using glibc wrappers for timer syscalls family
* testsuite/systemtap.syscall/timer.c: Add more tests

9 years agoPR17413: add compat support for {nd_,}syscall.timer_create
Martin Cermak [Tue, 23 Sep 2014 06:46:30 +0000 (08:46 +0200)]
PR17413: add compat support for {nd_,}syscall.timer_create

9 years agostaplog.c: add some more per-arch macros w/ protection
Frank Ch. Eigler [Fri, 19 Sep 2014 19:58:00 +0000 (15:58 -0400)]
staplog.c: add some more per-arch macros w/ protection

Some platforms define PPC etc. before staplog.c, so we must
not conflict.  Some new platforms need to be listed.

9 years agouse strerror to generate error message in is_valid_pid
Abegail Jakop [Wed, 17 Sep 2014 20:42:58 +0000 (16:42 -0400)]
use strerror to generate error message in is_valid_pid

9 years agoPR16716 partial fix: Fix types in 'syscall.{[gs]etgroups,[gs]ethostname}'.
David Smith [Wed, 17 Sep 2014 18:37:35 +0000 (13:37 -0500)]
PR16716 partial fix: Fix types in 'syscall.{[gs]etgroups,[gs]ethostname}'.

* tapset/linux/syscalls.stp (syscall.getgroups): Fixed types.
  (syscall.gethostname): Ditto.
* tapset/linux/syscalls2.stp (syscall.setgroups): Fixed types.
  (syscall.sethostname): Ditto.
* tapset/linux/powerpc/syscalls.stp (syscall.ppc64_newuname): Now also
  probes the "ppc_newuname" kernel function.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/alarm.c: Added more tests.
* testsuite/systemtap.syscall/getgroups.c: New testcase.
* testsuite/systemtap.syscall/hostname.c: Ditto.
* testsuite/systemtap.syscall/setgroups.c: Ditto.

9 years agoPR17395: Add breaks to is_valid_pid error switch
Josh Stone [Mon, 15 Sep 2014 19:35:22 +0000 (12:35 -0700)]
PR17395: Add breaks to is_valid_pid error switch

9 years agostapdyn: use process_vm_readv/writev when possible
Josh Stone [Fri, 12 Sep 2014 22:51:10 +0000 (15:51 -0700)]
stapdyn: use process_vm_readv/writev when possible

For script deref uses, we were using pread/pwrite on /proc/self/mem.
But thanks to CVE-2012-0056, some kernels have completely disabled
mem_write, so stapdyn guru scripts can't write memory at all.  Our
testsuite failed on at_var_lvalue.exp and deref.exp in this case.

When the process_vm_readv/writev syscalls are available, we can
accomplish the same thing, and don't even need an open fd for it.

9 years agostap.1: document --save-uprobes
Jonathan Lebon [Fri, 12 Sep 2014 20:58:09 +0000 (16:58 -0400)]
stap.1: document --save-uprobes

9 years agoinitscript: also delete uprobes.ko during cleanup
Jonathan Lebon [Fri, 12 Sep 2014 20:53:42 +0000 (16:53 -0400)]
initscript: also delete uprobes.ko during cleanup

If after cleanup we've removed all the scripts that require uprobes.ko,
then we should also delete uprobes.ko itself. It will be copied back in
the cache directory the next time a uprobes.ko dependent script is
compiled.

9 years agoinitscript: automatically detect uprobes dependency
Stefan Hajnoczi [Tue, 9 Sep 2014 15:23:46 +0000 (16:23 +0100)]
initscript: automatically detect uprobes dependency

systemtap-initscript scripts that rely on uprobes must be configured
with the --save-uprobes option.  This option saves the generated
uprobes.ko module and loads it when running the script.

The uprobes dependency information is actually available at compile time
so we can autodetect as follows:
1. Check if uprobes.ko was generated during compile
2. When uprobes.ko was generated, touch <name>.uprobes in the cache
   directory.
3. Add the staprun -u option if <name>.uprobes exists

It is no longer necessary to specify the --save-uprobes option in the
initscript configuration file, although doing so allowed.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9 years agoPR16716 partial fix: Fix types in 'syscall.{mlock,mlockall,msync,munmap}'.
David Smith [Fri, 12 Sep 2014 21:36:47 +0000 (16:36 -0500)]
PR16716 partial fix: Fix types in 'syscall.{mlock,mlockall,msync,munmap}'.

* tapset/linux/syscalls.stp (syscall.mlock): Fix types.
  (syscall.mlockall): Ditto.
  (syscall.msync): Ditto.
  (syscall.munmap): Ditto.
* tapset/linux/nd_syscalls.stp (nd_syscall.mlock): Fix types.
  (nd_syscall.msync): Ditto.
  (nd_syscall.munmap): Ditto.
* tapset/linux/aux_syscalls.stp: Updated and improved _msync_flag_str()
  and _mlockall_flags_str().
* testsuite/systemtap.syscall/mmap.c: Added tests.

9 years agoPR17190: accept functions given with their decl_line
Jonathan Lebon [Fri, 12 Sep 2014 18:06:08 +0000 (14:06 -0400)]
PR17190: accept functions given with their decl_line

If the user gives a probe for a specific function, e.g.

kernel.function("vfs_read@fs/read_write.c:393")

where the vfs_read() function is declared at lineno 393, we don't
actually want to probe lineno 393 (most likely there's nothing there
anyway). We simply need to probe the function's entry point.

9 years agolisting_mode.exp: test nearest
Jonathan Lebon [Mon, 8 Sep 2014 21:50:36 +0000 (17:50 -0400)]
listing_mode.exp: test nearest

Purposely use wrong linenos and check that the resulting line listing is
the same as what the user entered both for ABSOLUTE and RELATIVE linenos.

9 years agonearest probes: preserve user-entered lineno in chain
Jonathan Lebon [Mon, 8 Sep 2014 21:17:59 +0000 (17:17 -0400)]
nearest probes: preserve user-entered lineno in chain

This patch adds an earlier well-formed probe point in the derivation
chain of .nearest probes so that the original lineno entered is
retained during stap -l.

Before:

$ stap -l 'kernel.statement("vfs_read@fs/read_write.c:396").nearest'
kernel.statement("vfs_read@fs/read_write.c:397").nearest

Now:

$ stap -l 'kernel.statement("vfs_read@fs/read_write.c:396").nearest'
kernel.statement("vfs_read@fs/read_write.c:396").nearest

9 years agodwflpp.cxx: refactor nearest code
Jonathan Lebon [Tue, 2 Sep 2014 17:22:19 +0000 (13:22 -0400)]
dwflpp.cxx: refactor nearest code

Some code refactoring to eliminate a bit of duplication and make control
flow more linear.

9 years agonearest probes: restrict to ABSOLUTE and RELATIVE
Jonathan Lebon [Tue, 2 Sep 2014 16:00:42 +0000 (12:00 -0400)]
nearest probes: restrict to ABSOLUTE and RELATIVE

9 years agoPR16716 partial fix: Fix types/nesting in 'syscall.{setfs[gu]id,set[gu]id}'.
David Smith [Fri, 12 Sep 2014 16:53:05 +0000 (11:53 -0500)]
PR16716 partial fix: Fix types/nesting in 'syscall.{setfs[gu]id,set[gu]id}'.

* tapset/linux/syscalls2.stp (syscall.setfsgid): Fix gid/uid type.
  (syscall.setfsuid): Ditto.
  (syscall.setgid): Ditto.
  (syscall.setuid): Ditto.
* tapset/linux/nd_syscalls2.stp (nd_syscall.setfsgid): Fix gid/uid type.
  (nd_syscall.setfsuid): Ditto.
  (nd_syscall.setgid): Ditto.
  (nd_syscall.setuid): Ditto.
* testsuite/systemtap.syscall/uid.c: Corrected/added more tests.

9 years agopfaults: index call/return arrays by tid, not pid
Josh Stone [Fri, 12 Sep 2014 00:37:34 +0000 (17:37 -0700)]
pfaults: index call/return arrays by tid, not pid

9 years agoPR16716 partial fix: Fix types/nesting in 'syscall.{sigprocmask,tgkill}'.
David Smith [Thu, 11 Sep 2014 20:25:57 +0000 (15:25 -0500)]
PR16716 partial fix: Fix types/nesting in 'syscall.{sigprocmask,tgkill}'.

* tapset/linux/syscalls2.stp (syscall.sigprocmask): Fix nesting.
  (syscall.tgkill): Fix types.
* tapset/linux/nd_syscalls2.stp (nd_syscall.sigprocmask): Fix nesting.
* runtime/linux/compat_unistd.h: Add fake __NR_sigprocmask.
* testsuite/systemtap.syscall/signal.c: Add more tests.
* testsuite/systemtap.syscall/uid.c: Ditto.

9 years agoserver.exp: fix condition affecting avahi related subtests
Martin Cermak [Wed, 10 Sep 2014 18:21:16 +0000 (20:21 +0200)]
server.exp: fix condition affecting avahi related subtests

On systemd based systems, /usr/sbin/service calls /bin/systemctl.
Unlike rhel6's /sbin/service, systemctl logs to stderr even in case
of successful service restart. Tcl's exec(), called from the as_root(),
is by default sensitive to stderr, and produced false failure.

Additionally the condition logic was inverted.

9 years agoFix compile problem (new in 2.6) in nd_syscall.clock_nanosleep.
David Smith [Wed, 10 Sep 2014 15:07:12 +0000 (10:07 -0500)]
Fix compile problem (new in 2.6) in nd_syscall.clock_nanosleep.

* tapset/linux/nd_syscalls.stp (nd_syscall.clock_nanosleep): Fix compile
  problem by using 'flags_str' instead of 'flag_str'.

9 years agoAdd -fpic -fPIC to the list of accepted but ignored dtrace options.
Stan Cox [Tue, 9 Sep 2014 19:07:44 +0000 (15:07 -0400)]
Add -fpic -fPIC to the list of accepted but ignored dtrace options.

* dtrace.in (main):  Add ignore_options.

9 years agoIgnore symtab descriptors and undefined symbols
Josh Stone [Tue, 9 Sep 2014 18:54:47 +0000 (11:54 -0700)]
Ignore symtab descriptors and undefined symbols

These were already ignored for direct matches (commit 2867a2a13d186),
but we should also skip them in the wildcard-matching loop.

Noted in PR17360 by the a.out+0 warning for "__libc_start_main".

9 years agobump versions to 2.7 and autoreconf
Josh Stone [Fri, 5 Sep 2014 22:03:46 +0000 (15:03 -0700)]
bump versions to 2.7 and autoreconf

9 years agoAdd a 2.6 %changelog to the spec release-2.6
Josh Stone [Fri, 5 Sep 2014 21:33:21 +0000 (14:33 -0700)]
Add a 2.6 %changelog to the spec

9 years agoDate release 2.6 in NEWS
Josh Stone [Fri, 5 Sep 2014 21:05:47 +0000 (14:05 -0700)]
Date release 2.6 in NEWS

9 years agoupdate-po
Josh Stone [Fri, 5 Sep 2014 18:45:00 +0000 (11:45 -0700)]
update-po

9 years agostap: allow command line arguments in listing mode
Josh Stone [Thu, 4 Sep 2014 23:25:39 +0000 (16:25 -0700)]
stap: allow command line arguments in listing mode

9 years agotestsuite: When testing .nearest listing, be sure to say it
Josh Stone [Thu, 4 Sep 2014 22:58:41 +0000 (15:58 -0700)]
testsuite: When testing .nearest listing, be sure to say it

9 years agostapdyn: publicize the -V (version) option in the usage text
Frank Ch. Eigler [Fri, 5 Sep 2014 14:07:58 +0000 (10:07 -0400)]
stapdyn: publicize the -V (version) option in the usage text

9 years agoexamples: regen indexes
Frank Ch. Eigler [Thu, 4 Sep 2014 18:32:40 +0000 (14:32 -0400)]
examples: regen indexes

9 years agoAUTHORS bump
Josh Stone [Thu, 4 Sep 2014 16:31:22 +0000 (09:31 -0700)]
AUTHORS bump

9 years agoRemove systemtap_session::built_uprobes
Josh Stone [Wed, 3 Sep 2014 23:37:06 +0000 (16:37 -0700)]
Remove systemtap_session::built_uprobes

For the purpose of save_uprobes, it doesn't actually matter whether
uprobes.ko was just built or was pulled from the cache.  If we have the
uprobes_path at all, go ahead and save it.

9 years agoinitscript: use --save-uprobes instead of -u
Jonathan Lebon [Wed, 3 Sep 2014 21:45:33 +0000 (17:45 -0400)]
initscript: use --save-uprobes instead of -u

Rather than masking the -u option of stap (unoptimized mode), use the
actual option which we use with stap (--save-uprobes). This will allow
us to remain backwards-compatible if we later on automate the uprobes
saving by always turning on --save-uprobes.

So now, users have to do the following if they require userspace
probing:

  # cat /etc/systemtap/conf.d/example.conf
  example_OPT=--save-uprobes

9 years agoinitscript: allow scripts to load uprobes
Stefan Hajnoczi [Wed, 3 Sep 2014 21:40:52 +0000 (17:40 -0400)]
initscript: allow scripts to load uprobes

Scripts that rely on userspace probing must include the -u option in
their conf file:

  # cat /etc/systemtap/conf.d/example.conf
    example_OPT=-u

The uprobe kernel module will be loaded when the script runs.

9 years agoinitscript: copy uprobes.ko to cache directory
Stefan Hajnoczi [Wed, 3 Sep 2014 21:40:11 +0000 (17:40 -0400)]
initscript: copy uprobes.ko to cache directory

If the uprobes.ko module was built then it will be needed at staprun
time.  Copy the module into the cache directory alongside compiled
scripts.

9 years agostap: add --save-uprobes
Stefan Hajnoczi [Wed, 3 Sep 2014 21:38:30 +0000 (17:38 -0400)]
stap: add --save-uprobes

The stap -m <name> option saves the script module.  For scripts that
rely on uprobes it may also be necessary to get the uprobes module (if
it was built by stap).

The new stap --save-uprobes option saves uprobes/uprobes.ko into the
current directory.

9 years agofix issues related to -E scripts
Jonathan Lebon [Wed, 3 Sep 2014 16:52:34 +0000 (12:52 -0400)]
fix issues related to -E scripts

Fix stap exiting successfully in listing mode even when no probes were
found in the primary script. E.g. the following should return nonzero:

stap -l junk -E 'probe timer.s(1) { next }'

Similarly, fix stap running with no issues even when no probes are
present in the primary script. E.g. the following should error out:

stap -e 'global x' -E 'probe timer.s(1) { next }'

9 years agoenospc.stp: rename warn() function to avoid conflict
Jonathan Lebon [Wed, 3 Sep 2014 18:39:05 +0000 (14:39 -0400)]
enospc.stp: rename warn() function to avoid conflict

Otherwise, we get a conflict with the warn() located in logging.stp.

9 years agolisting_mode_sanity.exp: clarify FAIL messages
Jonathan Lebon [Wed, 3 Sep 2014 16:52:18 +0000 (12:52 -0400)]
listing_mode_sanity.exp: clarify FAIL messages

Use different FAIL messages to know which one failed.

9 years agoupdate AUTHORS list
Jonathan Lebon [Tue, 2 Sep 2014 21:51:09 +0000 (17:51 -0400)]
update AUTHORS list

9 years agoclient_args.exp: avoid propagating PR17301
Martin Cermak [Wed, 3 Sep 2014 12:48:59 +0000 (14:48 +0200)]
client_args.exp: avoid propagating PR17301

9 years agoPR12333: testsuite hashbang "#!stap" -> "#! stap" fix
Frank Ch. Eigler [Wed, 3 Sep 2014 07:22:58 +0000 (03:22 -0400)]
PR12333: testsuite hashbang "#!stap" -> "#! stap" fix

The former confuses the test driver dejagnu code.

9 years agoAdd a NEWS blurb about the autocast type propagation
Josh Stone [Tue, 2 Sep 2014 23:27:45 +0000 (16:27 -0700)]
Add a NEWS blurb about the autocast type propagation

9 years agoUse is_valid_pid in more places
Josh Stone [Tue, 2 Sep 2014 22:06:04 +0000 (15:06 -0700)]
Use is_valid_pid in more places

Several places were duplicating the "kill(pid,0); switch(errno)...", and
can all be replaced by is_valid_pid calls.

9 years agoPR16603 followup: unbreak on rhel4
Frank Ch. Eigler [Tue, 2 Sep 2014 22:29:11 +0000 (18:29 -0400)]
PR16603 followup: unbreak on rhel4

jistone noted that the smp_call_function_single() function call
introduced in commit 590a9ae1acc47 didn't exist on 2.6.9-era kernels.
We de-optimize to plain smp_call_function() on such dinosaurs.

9 years agostap-report: generate fewer incidental errors on unusual platforms
Frank Ch. Eigler [Tue, 2 Sep 2014 15:17:19 +0000 (11:17 -0400)]
stap-report: generate fewer incidental errors on unusual platforms

9 years agoman/stap.1: add portion on array slicing
Abegail Jakop [Tue, 2 Sep 2014 22:03:04 +0000 (18:03 -0400)]
man/stap.1: add portion on array slicing

9 years agoNEWS: added a piece about array slicing (PR12333)
Abegail Jakop [Tue, 2 Sep 2014 20:26:25 +0000 (16:26 -0400)]
NEWS: added a piece about array slicing (PR12333)

9 years agotestsuite: Reduce global timeout to 15 minutes
Josh Stone [Tue, 2 Sep 2014 19:20:31 +0000 (12:20 -0700)]
testsuite: Reduce global timeout to 15 minutes

Very old kernels used jiffies for timer.s, and limit that to 1000000ms
to avoid overflows.  The testsuite rc's timer.s(3100) exceeded that.

A 15 minute timeout, timer.s(900), fits the limit and should suffice.

9 years agofix process_by_pid.exp failing to hit all probes point
Abegail Jakop [Tue, 2 Sep 2014 17:52:13 +0000 (13:52 -0400)]
fix process_by_pid.exp failing to hit all probes point

process_by_pid.stp: more information is printed if the test case fails
process_by_pid.c: add sleep() so it has a plt that can be reached easily

9 years agotapsets.cxx: throw error for invalid PID, not valid PID
Abegail Jakop [Tue, 2 Sep 2014 17:14:26 +0000 (13:14 -0400)]
tapsets.cxx: throw error for invalid PID, not valid PID

9 years agoMerge branch 'ajakop/12333'
Abegail Jakop [Tue, 2 Sep 2014 15:06:47 +0000 (11:06 -0400)]
Merge branch 'ajakop/12333'

9 years agoPR12333: added another pmaps membership test case
Abegail Jakop [Tue, 2 Sep 2014 14:56:34 +0000 (10:56 -0400)]
PR12333: added another pmaps membership test case

9 years agoPR12333: cleanup and membership test with pmaps
Abegail Jakop [Tue, 2 Sep 2014 14:27:16 +0000 (10:27 -0400)]
PR12333: cleanup and membership test with pmaps

9 years agoPR12333: Aggregate pmaps for sliced array_in
Josh Stone [Fri, 29 Aug 2014 22:37:05 +0000 (15:37 -0700)]
PR12333: Aggregate pmaps for sliced array_in

Since sliced array_in iterates over the aggregate for pmaps, it needs to
actually build that aggregate first, unless we're already in foreach.

9 years agoPR12333: Use 1/0 conditions instead of true/false in C
Josh Stone [Fri, 29 Aug 2014 22:15:47 +0000 (15:15 -0700)]
PR12333: Use 1/0 conditions instead of true/false in C

The kernel happens to declare true/false values for C to use, at least
since commit 6e21828743247 (in 2.6.19), but stapdyn's normal C runtime
doesn't have that.  Use boring old 1/0 instead.

9 years agoDrop passing the last parameter to determin_java_type
Lukas Berk [Fri, 29 Aug 2014 19:35:49 +0000 (15:35 -0400)]
Drop passing the last parameter to determin_java_type

*java/HelperSDT.c - drop passing the lsat parameter to determin_java_type
    and simply return the casted value instead of assigning
    and then returning

9 years agoFix ppc64 value issue by changing how java vars are passed from jni
Lukas Berk [Fri, 29 Aug 2014 14:13:05 +0000 (10:13 -0400)]
Fix ppc64 value issue by changing how java vars are passed from jni

Instead of using a _staparg struct, we now just use a int64_t var
and cast to that, instead of making assumptions on how the struct is
packed.

*java/HelperSDT.c - use int64_t as the arg type instead of _staparg union

9 years agoPR12333: updated and added tests, and removed comment
Abegail Jakop [Thu, 28 Aug 2014 19:49:09 +0000 (15:49 -0400)]
PR12333: updated and added tests, and removed comment

9 years agoPR12333: added minor tests, updated main test case
Abegail Jakop [Thu, 28 Aug 2014 19:18:16 +0000 (15:18 -0400)]
PR12333: added minor tests, updated main test case

9 years agoPR12333: deleting pmap specified by array slice
Abegail Jakop [Thu, 28 Aug 2014 19:08:59 +0000 (15:08 -0400)]
PR12333: deleting pmap specified by array slice

runtime/map.c: have iterdel() use pre-existing functions
translate.cxx: generate code to delete elements from a pmap, based on
an array slice given. rename next() that called iterdel to del_next()
staptree.cxx: cleanup of an unnecessary condition

9 years agoAdd helper that can handle wildcards within arrayindexes
Abegail Jakop [Thu, 28 Aug 2014 19:00:13 +0000 (15:00 -0400)]
Add helper that can handle wildcards within arrayindexes

9 years agoFix runtime-java triggers for ppc64le
Yaakov Selkowitz [Wed, 27 Aug 2014 17:28:51 +0000 (12:28 -0500)]
Fix runtime-java triggers for ppc64le

Signed-off-by: Lukas Berk <lberk@redhat.com>
9 years agostore given pid for process probe for use by task_finder
Abegail Jakop [Tue, 26 Aug 2014 19:53:22 +0000 (15:53 -0400)]
store given pid for process probe for use by task_finder

session.cxx: replace readlink(), which did the pid validation,
with is_valid_pid()
tapsets.cxx: if given, within dwarf_builder::build store the pid
for use by uprobe_derived_probe so that task_finder associates
the probe with the pid
util.*: new function that checks if the given pid is valid. if
not, it generates an error message that can be used.

9 years agotranslate.cxx: declaring tmpvars for array slices
Abegail Jakop [Mon, 25 Aug 2014 14:49:15 +0000 (10:49 -0400)]
translate.cxx: declaring tmpvars for array slices

9 years agoPR12333: store wildcards in array slices as NULL
Abegail Jakop [Fri, 22 Aug 2014 20:52:33 +0000 (16:52 -0400)]
PR12333: store wildcards in array slices as NULL

parse.cxx: set the index for array slices as NULL if it's a wildcard
elaborate.cxx: account for NULL indexes. added error message in
symresolution_info::visit_arrayindex if it encounters a NULL index,
since all expressions that support wildcards dealt with separately
staptree.cxx: when printing out foreach, delete and array_in, replace
NULL indexes with "*"
translate.cxx: account for NULL indexes. don't generate a tmpvar
for a wildcard array index

9 years agoPR12333: use parent for symresolution in delete array index
Abegail Jakop [Fri, 22 Aug 2014 15:28:28 +0000 (11:28 -0400)]
PR12333: use parent for symresolution in delete array index

9 years agooptim_arridx.exp: avoid propagating PR17301
Martin Cermak [Fri, 22 Aug 2014 12:55:28 +0000 (14:55 +0200)]
optim_arridx.exp: avoid propagating PR17301

9 years agoalias_tapset.exp: avoid unwanted interference with the "timeout feature" (commit...
Martin Cermak [Fri, 22 Aug 2014 08:52:37 +0000 (10:52 +0200)]
alias_tapset.exp: avoid unwanted interference with the "timeout feature" (commit d13c9b7)

9 years agoPR12333: test file for array slicing
Abegail Jakop [Thu, 21 Aug 2014 17:25:41 +0000 (13:25 -0400)]
PR12333: test file for array slicing

9 years agoPR12333" array slicing for membership test
Abegail Jakop [Thu, 21 Aug 2014 16:17:40 +0000 (12:17 -0400)]
PR12333" array slicing for membership test

parse.cxx: accept wildcards in the arrayindex for array_in
elaborate.cxx: new function symresolution_info::visit_array_in
that skips processing wildcards that are present in the arrayindex
translate.cxx: generate code to iterate over the array until a
match is found or until the end of the array

9 years agoPR12333: don't store array slice indexes as lrvalues
Abegail Jakop [Wed, 20 Aug 2014 21:11:05 +0000 (17:11 -0400)]
PR12333: don't store array slice indexes as lrvalues

9 years agoPR12333: treat array slice indexes as rvalues
Abegail Jakop [Wed, 20 Aug 2014 20:12:14 +0000 (16:12 -0400)]
PR12333: treat array slice indexes as rvalues

10 years agoPR12333: array slicing for delete statements
Abegail Jakop [Tue, 19 Aug 2014 18:12:52 +0000 (14:12 -0400)]
PR12333: array slicing for delete statements

parse.cxx: accept wildcards (*) within array indexes
elaborate.cxx: skip processing wildcards in array indexes for delete
staptree.cxx: for the varuse_collecting_visitor, don't throw an error
about no referent if the symbol is a wildcard
translate.cxx: generate code for deleting variables if the indexes match
the array slice given. Also generate code to initialize tmpvars used to
store indexes in the array slice.
runtime/map.c: new function _stp_map_iterdel that deletes the node given,
and returns the next node in the map.

10 years agoruntime: improve robustness of shutdown phase via flush_scheduled_work()
Frank Ch. Eigler [Sun, 17 Aug 2014 14:55:35 +0000 (10:55 -0400)]
runtime: improve robustness of shutdown phase via flush_scheduled_work()

It has been observed that schedule_work() artifacts have the potential
to overstay their welcome during shutdown, triggering some time after
their operand data structures have been deallocated.  This has shown
up most recently on 3.17-rc0 during the on-the-fly stress-testing, but
also can be observed with plain pseudo-utrace callbacks.  We now add a
flush_scheduled_work() into our cargo-cult stp_synchronize_sched(),
which we now call during the on-the-fly shutdown phase too.

10 years agotranslator: in -u (unoptimized) mode, don't merge identical probe handler bodies
Frank Ch. Eigler [Sun, 17 Aug 2014 14:50:52 +0000 (10:50 -0400)]
translator: in -u (unoptimized) mode, don't merge identical probe handler bodies

Normal optimized mode can make it difficult to see which stap probe
was being invoked for which C probe handler body, as identical probe
handlers are reused.  This is inconvenient if one just has a kernel
crash backtrace to start from from.

* translate.cxx (emit_common_header, emit_probe): In -u mode,
  eschew duplicate probe handler body elision.

10 years agoPR12333: printscript() prints array slice in foreach loops
Abegail Jakop [Fri, 15 Aug 2014 20:42:48 +0000 (16:42 -0400)]
PR12333: printscript() prints array slice in foreach loops

10 years agoPR12333: evaluating the indexes before the loop body
Abegail Jakop [Fri, 15 Aug 2014 20:33:33 +0000 (16:33 -0400)]
PR12333: evaluating the indexes before the loop body

translate.cxx: evaluate the expressions that make up the array slice
index for foreach loops. updated c_tmpcounter::visit_foreach_loop to
account for the additional tmpvars used to store array slice indexes

10 years agoFix PR17275 by fixing testcase problems on s390x.
David Smith [Fri, 15 Aug 2014 20:07:52 +0000 (15:07 -0500)]
Fix PR17275 by fixing testcase problems on s390x.

* testsuite/buildok/memory-all-probes.stp: Tweak test to avoid overly
  broad wildcards, which can cause the test to fail on systems without
  uprobes (like s390x).
* testsuite/buildok/tcp-all-probes.stp: Ditto.

10 years agoPR16716 partial fix: Fix types in 'syscall.{mmap[2],[p]poll}'.
David Smith [Fri, 15 Aug 2014 16:07:28 +0000 (11:07 -0500)]
PR16716 partial fix: Fix types in 'syscall.{mmap[2],[p]poll}'.

* tapset/linux/syscalls.stp (syscall.mmap2): Fixed type.
* tapset/linux/nd_syscalls.stp (nd_syscall.mmap2): Ditto.
* tapset/linux/syscalls2.stp: Fixed types in syscall.poll, syscall.ppoll,
  and syscall.compat_ppoll.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_mremap_flags): Updated and improved.
  (get_mmap_args): Fixed type.
* tapset/linux/i386/syscalls.stp: Fixed types in syscall.mmap2.
* tapset/linux/i386/nd_syscalls.stp: Ditto.

* tapset/linux/ia64/syscalls.stp: Fixed types in syscall.mmap and
  syscall.mmap2.
* tapset/linux/ia64/nd_syscalls.stp: Ditto.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp (get_32mmap_args): Updated and fixed
  types.
* testsuite/buildok/syscalls2-detailed.stp: Made syscall.uselib tests
  optional, since rawhide kernels have dropped the syscall.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/mmap.c: Added more tests.
* testsuite/systemtap.syscall/poll.c: Ditto.
* testsuite/systemtap.syscall/recv.c: Ignore error code.

10 years agostap_run.exp: avoid propagating PR17274
Martin Cermak [Fri, 15 Aug 2014 15:37:25 +0000 (17:37 +0200)]
stap_run.exp: avoid propagating PR17274

10 years agohrtimer/kprobes_onthefly.exp: use process.function only if supported
Jonathan Lebon [Thu, 14 Aug 2014 19:07:15 +0000 (15:07 -0400)]
hrtimer/kprobes_onthefly.exp: use process.function only if supported

We should test for uprobes support before testing with the
process("echo").function probe.

10 years agoImprove on-the-fly initialization code.
David Smith [Thu, 14 Aug 2014 18:49:44 +0000 (13:49 -0500)]
Improve on-the-fly initialization code.

* translate.cxx (c_unparser::emit_probe_condition_initialize): Only output
  'cond_enabled' field initialization if the probe isn't always enabled.
  (translate_pass): Always initialize 'cond_enabled' to 1. This can get
  overridden by the output of
  c_unparser::emit_probe_condition_initialize().

10 years agoPR17242 extra: Remove _stp_register_regs() from x86_gs test
Josh Stone [Thu, 14 Aug 2014 15:52:11 +0000 (08:52 -0700)]
PR17242 extra: Remove _stp_register_regs() from x86_gs test

10 years agoPR17242 extra: Change dangling _stp_register_regs() function to init probes.
David Smith [Thu, 14 Aug 2014 14:56:39 +0000 (09:56 -0500)]
PR17242 extra: Change dangling _stp_register_regs() function to init probes.

* tapset/i386/registers.stp: Convert the _stp_register_regs() function to
  an init probe.
* tapset/powerpc/registers.stp: Ditto.

10 years agoAdd perf.return functionality to ltrace.stp.
Stan Cox [Wed, 13 Aug 2014 18:41:00 +0000 (14:41 -0400)]
Add perf.return functionality to ltrace.stp.

* ltrace.stp (filter_p, arg, report, begin, end):  New
(process.plt, process.plt.return): Handle return value.
(end): Display summary statistics.

* perf.sh (poly): Add guard for negative and too large values.

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