]> sourceware.org Git - systemtap.git/log
systemtap.git
12 years agoPR13489: comment on task_user_regset_view usage
Frank Ch. Eigler [Sat, 17 Dec 2011 15:19:24 +0000 (10:19 -0500)]
PR13489: comment on task_user_regset_view usage

12 years agoPR13513: undo PR11759 PREEMPT_RT hack
Frank Ch. Eigler [Sat, 17 Dec 2011 14:56:03 +0000 (09:56 -0500)]
PR13513: undo PR11759 PREEMPT_RT hack

Just go back to using plain spinlock_t etc. throughout the runtime:

-#if CONFIG_PREEMPT_RT
-static raw_spinlock_t itrace_lock;
-#else
 static spinlock_t itrace_lock;
-#endif

* runtime/*, translate.cxx: Just use plain spin/other locks.

12 years agoPR13489: Look up kallsyms_task_user_regset_view if needed, even without any uprobes
Frank Ch. Eigler [Sat, 17 Dec 2011 14:54:51 +0000 (09:54 -0500)]
PR13489: Look up kallsyms_task_user_regset_view if needed, even without any uprobes

This is needed to compile loc2c-runtime.h on zero-uprobes kernels.

* runtime/runtime.h: Unwrap it from if CONFIG_UPROBES.
* runtime/transport/transport.c: Look it up.

12 years agoPR13499: grapher: remove systemtap-runtime=V-R dependency
Frank Ch. Eigler [Wed, 14 Dec 2011 18:47:27 +0000 (13:47 -0500)]
PR13499: grapher: remove systemtap-runtime=V-R dependency

This should make it easier for an old systemtap-grapher rpm
to remain installed as other parts of the package move forward.

* NEWS: mention grapher deprecation

12 years agoscheduler.ctxswitch: arm has context_switch(), not __switch_to().
Mark Wielaard [Sat, 17 Dec 2011 01:32:57 +0000 (02:32 +0100)]
scheduler.ctxswitch: arm has context_switch(), not __switch_to().

12 years agoRename tapset/rpc.stp variable to indicate its internal-only nature.
David Smith [Fri, 16 Dec 2011 20:32:20 +0000 (14:32 -0600)]
Rename tapset/rpc.stp variable to indicate its internal-only nature.

* tapset/rpc.stp (_sunrpc.clnt.create_client.rpc_new_client_inline):
  Rename 'args' to '__args' to indicate that '__args' is an internal-only
  variable.  Deprecate old name.
* NEWS: Mention 'args' variable deprecation.
* stap.1: Ditto.

12 years agotask_finder_vma.c (__stp_tf_vma_new_entry): No unnecessary atomic allocs.
Mark Wielaard [Fri, 16 Dec 2011 18:25:32 +0000 (19:25 +0100)]
task_finder_vma.c (__stp_tf_vma_new_entry): No unnecessary atomic allocs.

We can be a little nicer when allocating kernel memory under the
traditional task_finder which uses utrace. See
http://sourceware.org/ml/systemtap/2011-q4/msg00357.html

12 years agoCheck that unset CONFIG options compare equal the empty string and/or zero.
Mark Wielaard [Fri, 16 Dec 2011 18:14:40 +0000 (19:14 +0100)]
Check that unset CONFIG options compare equal the empty string and/or zero.

12 years agoFix PR13501 (partial) by making 'stap -L __scheduler.process_exit.kp' work.
David Smith [Fri, 16 Dec 2011 17:41:02 +0000 (11:41 -0600)]
Fix PR13501 (partial) by making 'stap -L __scheduler.process_exit.kp' work.

* tapset/scheduler.stp (__scheduler.process_exit.kp): Added value for
  '__tsk' so that 'stap -L' doesn't complain about an unknown type.

12 years agoperiodic.stp example truncate fname to 50 chars to keep table readable.
Mark Wielaard [Fri, 16 Dec 2011 16:11:00 +0000 (17:11 +0100)]
periodic.stp example truncate fname to 50 chars to keep table readable.

12 years agomodname/symdata: Try harder to retrieve module name when requested.
Mark Wielaard [Fri, 16 Dec 2011 15:59:00 +0000 (16:59 +0100)]
modname/symdata: Try harder to retrieve module name when requested.

When the user really wants a kernel module name with an address and
we are unable to map it to any existing one then fall back on using
__module_text_address() with appropriate locking.

12 years ago_stp_vma_mmap_cb: Also extend mapping that don't overlap but are connected.
Mark Wielaard [Fri, 16 Dec 2011 15:43:04 +0000 (16:43 +0100)]
_stp_vma_mmap_cb: Also extend mapping that don't overlap but are connected.

If a vma mapping for a module already exist but a new mapping for the module
is added that is connected right at the end of it, then just extend the
existing vma mapping. This fixes the exelib.exp testcase on s390x for PIE
executables.

12 years agoFix gcc warning in uprobes2/uprobes.c.
David Smith [Fri, 16 Dec 2011 15:52:30 +0000 (09:52 -0600)]
Fix gcc warning in uprobes2/uprobes.c.

* runtime/uprobes2/uprobes.c (uprobe_free_task): Fix "ISO C90 forbids
  mixed declarations and code" warning by rearranging some code.

12 years agoFix 13501 (partial) by making 'stap -L scheduler.ctxswitch' work.
David Smith [Fri, 16 Dec 2011 15:33:38 +0000 (09:33 -0600)]
Fix 13501 (partial) by making 'stap -L scheduler.ctxswitch' work.

* tapset/scheduler.stp (scheduler.ctxswitch): Merge the probe aliases for
  '__scheduler.ctxswitch.tp' and '__scheduler.ctxswitch.kp'.
* testsuite/buildok/scheduler-ctxswitch.stp: Remove
  '__scheduler.ctxswitch.kp' testing.

12 years agoImproved __rpc_create_args global handling for sunrpc.clnt.create_client probe.
David Smith [Thu, 15 Dec 2011 19:18:10 +0000 (13:18 -0600)]
Improved __rpc_create_args global handling for sunrpc.clnt.create_client probe.

* tapset/rpc.stp: Ensure better matching with the .return probe by putting
  .call on the probes that handle the __rpc_create_args global variable.

12 years agoFix PR13501 (partial) by making 'stap -L sunrpc.clnt.create_client' work.
David Smith [Thu, 15 Dec 2011 19:12:47 +0000 (13:12 -0600)]
Fix PR13501 (partial) by making 'stap -L sunrpc.clnt.create_client' work.

* tapset/rpc.stp: Fix unresolved type error by providing a value for the
  'args' variable even in the branch where we don't use it.

12 years agoAdjust periodic.stp example to run on kernels without struct delayed_work
William Cohen [Thu, 15 Dec 2011 16:27:45 +0000 (11:27 -0500)]
Adjust periodic.stp example to run on kernels without struct delayed_work

RHEL-5 kernels have the timer_expire_entry tracepoint, but do not have
struct delayed_work.  Some @defined magic is used to select the
fallback if struct delayed_work is not around.

12 years agoFix PR12413 by fixing 'kprocess.release' variable problems.
David Smith [Thu, 15 Dec 2011 15:49:13 +0000 (09:49 -0600)]
Fix PR12413 by fixing 'kprocess.release' variable problems.

* tapset/kprocess.stp: Deprecate 'pid' variable and fix 'released_pid' and
  'released_tid' variables in the kprocess.release probe.
* testsuite/buildok/kprocess-detailed.stp: Update kprocess.release test.
* NEWS: Mention kprocess.release 'pid' variable deprecation.
* stap.1: Ditto.

12 years agoAdd the periodic.stp example to the index
William Cohen [Wed, 14 Dec 2011 20:46:38 +0000 (15:46 -0500)]
Add the periodic.stp example to the index

12 years agoAdd the periodic.stp example
William Cohen [Wed, 14 Dec 2011 20:45:12 +0000 (15:45 -0500)]
Add the periodic.stp example

12 years agoRemove the possibililty of sleeping from __stp_call_mmap_callbacks_*().
David Smith [Wed, 14 Dec 2011 17:05:42 +0000 (11:05 -0600)]
Remove the possibililty of sleeping from __stp_call_mmap_callbacks_*().

* runtime/task_finder.c (__stp_call_mmap_callbacks_with_addr): Change
  down_read() to down_read_trylock() instead, which won't sleep.
  (__stp_call_mmap_callbacks_for_task): Ditto.

12 years agoPR13489/PR11671: more lockdep antihistamines
Frank Ch. Eigler [Tue, 13 Dec 2011 22:27:38 +0000 (17:27 -0500)]
PR13489/PR11671: more lockdep antihistamines

* runtime/task_finder_vma.c (__stp_tf_vma_new_entry): Use
  STP_ALLOC_FLAGS for new vma entry memory allocation needs.

12 years agoPR13386: move _stp_kill_time out of preemption-disabled interval at shutdown
Frank Ch. Eigler [Tue, 13 Dec 2011 21:02:33 +0000 (16:02 -0500)]
PR13386: move _stp_kill_time out of preemption-disabled interval at shutdown

Without this change, it was possible to get this warning:

[ 2083.250059] stap_76e60190a026972913d9501600bceb0a_767363: systemtap: 1.7/0.152, base: fffffff
fa066f000, memory: 4269data/40text/62ctx/2058net/377alloc kb, probes: 5474
[ 2085.743714] BUG: sleeping function called from invalid context at kernel/mutex.c:271
[ 2085.747088] in_atomic(): 1, irqs_disabled(): 0, pid: 31536, name: stapio
[ 2085.749797] no locks held by stapio/31536.
[ 2085.751520] Pid: 31536, comm: stapio Tainted: G           O 3.2.0-rc5-next-20111213 #1
[ 2085.754634] Call Trace:
[ 2085.756109]  [<ffffffff81094f35>] __might_sleep+0x135/0x1f0
[ 2085.758339]  [<ffffffff81670c5f>] mutex_lock_nested+0x2f/0x3a0
[ 2085.760624]  [<ffffffff810c14ed>] ? trace_hardirqs_on+0xd/0x10
[ 2085.763117]  [<ffffffff81072482>] ? try_to_del_timer_sync+0xb2/0x1a0
[ 2085.765854]  [<ffffffff8108ff6f>] srcu_notifier_chain_unregister+0x2f/0xf0
[ 2085.771204]  [<ffffffff81072570>] ? try_to_del_timer_sync+0x1a0/0x1a0
[ 2085.774824]  [<ffffffff814f462c>] cpufreq_unregister_notifier+0x1c/0x40
[ 2085.780119]  [<ffffffffa06717ce>] _stp_kill_time+0x9e/0xa0 [stap_76e60190a026972913d9501600bceb0a_767363]
[ 2085.785254]  [<ffffffffa0677a15>] _stp_cleanup_and_exit+0x375/0x430 [stap_76e60190a026972913d9501600bceb0a_767363]
[ 2085.790342]  [<ffffffffa0677d82>] _stp_ctl_write_cmd+0x272/0xbb5 [stap_76e60190a026972913d9501600bceb0a_767363]
[ 2085.794189]  [<ffffffff811ac4a6>] vfs_write+0xb6/0x180
[ 2085.796239]  [<ffffffff81677579>] kretprobe_trampoline_holder+0x9/0x9
[ 2085.798521]  [<ffffffff81677579>] kretprobe_trampoline_holder+0x9/0x9

* translate.cxx (c_unparser::emit_module_exit): Move _stp_kill_time up a wee.

12 years agoDistinguish tests run using different privilege levels.
Dave Brolley [Tue, 13 Dec 2011 22:30:01 +0000 (17:30 -0500)]
Distinguish tests run using different privilege levels.

12 years agoPR 13496: stap could show some progress of the communication with the server
Dave Brolley [Tue, 13 Dec 2011 21:08:38 +0000 (16:08 -0500)]
PR 13496: stap could show some progress of the communication with the server

- Moved "Using a compile server" message to -v level
- Moved details of automatic server detection to -vv level
- Moved reasons for server acceptance/rejection to -vvv level
- Moved details of clent/server request/response packaging to -vvvv level.

12 years agoPR 13318: Add -D option to stap-server and stap-serverd.
Dave Brolley [Tue, 13 Dec 2011 19:25:46 +0000 (14:25 -0500)]
PR 13318: Add -D option to stap-server and stap-serverd.

Now supported on the command line as -D macro[=value] and
in the stap-server config files as DEFINE=macro[=value].

12 years agoAdd HAVE_TASK_FINDER define to simplify some code.
David Smith [Tue, 13 Dec 2011 17:33:38 +0000 (11:33 -0600)]
Add HAVE_TASK_FINDER define to simplify some code.

* runtime/runtime.h: Add HAVE_TASK_FINDER define if we've got any form of
  utrace.
* runtime/task_finder.c: Use HAVE_TASK_FINDER to know whether to define
  dummy functions.
* runtime/vma.c (_stp_vma_init): Use HAVE_TASK_FINDER define.

12 years agomodinfo.exp testcase needs modinfo from /sbin, which might not be in PATH.
Mark Wielaard [Tue, 13 Dec 2011 14:24:18 +0000 (15:24 +0100)]
modinfo.exp testcase needs modinfo from /sbin, which might not be in PATH.

12 years agoOlder glibc elf.h don't know about new STB_GNU_UNIQUE constant.
Mark Wielaard [Tue, 13 Dec 2011 13:58:19 +0000 (14:58 +0100)]
Older glibc elf.h don't know about new STB_GNU_UNIQUE constant.

12 years agoconfigury: fix make -j all install
Frank Ch. Eigler [Mon, 12 Dec 2011 22:50:59 +0000 (17:50 -0500)]
configury: fix make -j all install

Due to an autoconf weirdness, make -j all install would run make
all-recursive and make install-recursive in parallel, and let the two
builds step on each others' toes.

* Makefile.am (install): Explicitly require all.  Recurse by hand.
* Makefile.in: Regenerated.

12 years agoPR13467 Provide alternative testcase for pointer_array.exp.
Mark Wielaard [Mon, 12 Dec 2011 21:52:18 +0000 (22:52 +0100)]
PR13467 Provide alternative testcase for pointer_array.exp.

pointer_array.exp depends on indexing an array from a user pointer in
kernel context. This doesn't work on s390x, which has separate user and
kernel space addresses. kallsyms_expand_symbol.exp decodes the kallsyms
table from kernel space using various array pointer manipulations.

12 years agoRevert accidental "work in progress" commit
Stan Cox [Mon, 12 Dec 2011 21:30:11 +0000 (16:30 -0500)]
Revert accidental "work in progress" commit

This reverts commit 658ebe79050b8e5574464a63c15d1c5dfabaf545.

12 years agoAlso consider STB_GNU_UNIQUE symbols to be exported.
Stan Cox [Mon, 12 Dec 2011 21:16:35 +0000 (16:16 -0500)]
Also consider STB_GNU_UNIQUE symbols to be exported.

* dwflpp.cxx (dwflpp::func_is_exported): Consider STB_GNU_UNIQUE.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Mon, 12 Dec 2011 20:04:21 +0000 (15:04 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

Conflicts:
NEWS

12 years agoPR 13460: Expose stap-serverd options to stap-server.
Dave Brolley [Mon, 12 Dec 2011 20:02:24 +0000 (15:02 -0500)]
PR 13460: Expose stap-serverd options to stap-server.

The --log, --port and --ssl options of stap-serverd are now
exposed to stap-server.

12 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Mark Wielaard [Mon, 12 Dec 2011 14:59:28 +0000 (15:59 +0100)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

12 years agoProtect just the transport state with _stp_transport_mutex.
Mark Wielaard [Mon, 12 Dec 2011 14:54:59 +0000 (15:54 +0100)]
Protect just the transport state with _stp_transport_mutex.

_stp_transport_mutex was held over the whole of _stp_handle_start()
and _stp_cleanup_and_exit(). This is unnecessary and dangerous since
some functions that get called could sleep. Add a new state variable
_stp_start_called and protect just that together with _stp_exit_called
to make sure _stp_handle_start() and _stp_cleanup_and_exit() are only
executed once.

12 years agouprobes.c add rcu_read_lock for pid_task(), rcu_dereference and utrace.
Mark Wielaard [Mon, 12 Dec 2011 12:46:28 +0000 (13:46 +0100)]
uprobes.c add rcu_read_lock for pid_task(), rcu_dereference and utrace.

pid_task(), rcu_dereference() and the utrace functions that convert a
given pid to a task need to be protected by the rcu_read_lock().

12 years agoPR13489: support inode-uprobes without EXPORT_SYMBOL*'s
Frank Ch. Eigler [Mon, 12 Dec 2011 14:28:23 +0000 (09:28 -0500)]
PR13489: support inode-uprobes without EXPORT_SYMBOL*'s

Until lkml sees fit to EXPORT_SYMBOL* various inode-uprobes related
symbols, we must kludge around this.

* buildrun.cxx (compile_pass): Track export status for
  register_uprobe, unregister_uprobe, task_user_regset_view.
* runtime/runtime.h: Declare void* versions if needed.
* runtime/transport/transport.c: kallsyms_lookup_name them if needed.
* runtime/loc2c-runtime.h, runtime/uprobes-inode.c: Use them.

12 years agoPR13076: fix -timeout tcl error
Frank Ch. Eigler [Sun, 11 Dec 2011 20:42:50 +0000 (15:42 -0500)]
PR13076: fix -timeout tcl error

* testsuite/systemtap.base/cache_clean.exp: Use
  expect { -timeout N } instead of expect { timeout N }

12 years agoinode-uprobes: recognize it even without exported symbols
Frank Ch. Eigler [Fri, 9 Dec 2011 23:06:51 +0000 (18:06 -0500)]
inode-uprobes: recognize it even without exported symbols

12 years agoAdd process, kernel and module function.exported probes to unprivileged tests.
Mark Wielaard [Sat, 10 Dec 2011 11:13:22 +0000 (12:13 +0100)]
Add process, kernel and module function.exported probes to unprivileged tests.

12 years agoAdd function(...).exported
Stan Cox [Fri, 9 Dec 2011 22:51:19 +0000 (17:51 -0500)]
Add function(...).exported

* dwflpp.cxx (dwflpp::func_is_exported):  New.
* tapsets.cxx (dwarf_query::dwarf_query):  Add has_exported
  (query_dwarf_func): Check for .exported
* library.exp:  Add .exported test
* NEWS, langref.tex, stapprobes.3stap:  Document it.

12 years agowork in progress
Stan Cox [Mon, 14 Nov 2011 17:08:14 +0000 (12:08 -0500)]
work in progress

12 years agoAdd new test that probes by pid.
David Smith [Fri, 9 Dec 2011 22:08:39 +0000 (16:08 -0600)]
Add new test that probes by pid.

* testsuite/systemtap.clone/probe_by_pid.exp: New test file.
* testsuite/systemtap.clone/Makefile.probe_by_pid: Ditto.
* testsuite/systemtap.clone/probe_by_pid.c: Ditto.
* testsuite/systemtap.clone/probe_by_pid.exp: Ditto.
* testsuite/systemtap.clone/probe_by_pid_function.stp: Ditto.
* testsuite/systemtap.clone/probe_by_pid_utrace.stp: Ditto.

12 years agoBogus error message being logged by stap-serverd.
Dave Brolley [Fri, 9 Dec 2011 21:03:04 +0000 (16:03 -0500)]
Bogus error message being logged by stap-serverd.

12 years agoRemove the possibililty of sleeping from __stp_call_mmap_callbacks_*().
David Smith [Fri, 9 Dec 2011 19:43:17 +0000 (13:43 -0600)]
Remove the possibililty of sleeping from __stp_call_mmap_callbacks_*().

* runtime/task_finder2.c (__stp_call_mmap_callbacks_with_addr): Change
  down_read() to down_read_trylock() instead, which won't sleep.
  (__stp_call_mmap_callbacks_for_task): Ditto.

12 years agoRemoved ifdef'ed out code from stp_utrace.[ch].
David Smith [Fri, 9 Dec 2011 19:37:10 +0000 (13:37 -0600)]
Removed ifdef'ed out code from stp_utrace.[ch].

* runtime/stp_utrace.c: Removed unused code (no actual code changes).
* runtime/stp_utrace.h: Ditto.

12 years agoInitializce the vma tracker for internal utrace.
David Smith [Fri, 9 Dec 2011 19:20:52 +0000 (13:20 -0600)]
Initializce the vma tracker for internal utrace.

* runtime/vma.c (_stp_vma_init): Do the initialization when we're using
  our internal utrace.

12 years agopf2.stp example probefunc() is deprecated, use symname(addr()) instead.
Mark Wielaard [Fri, 9 Dec 2011 15:42:50 +0000 (16:42 +0100)]
pf2.stp example probefunc() is deprecated, use symname(addr()) instead.

Also explicitly exclude user space function names as advertised.
Otherwise the aggregate will quickly overflow on a busy system.

12 years agoPR13076: Added test cases
Chris Meek [Fri, 9 Dec 2011 15:19:07 +0000 (10:19 -0500)]
PR13076: Added test cases

12 years agoMove __stp_tf_vma_map check from commit 972ea1 to stap_find_vma_map_info().
Mark Wielaard [Fri, 9 Dec 2011 14:24:03 +0000 (15:24 +0100)]
Move __stp_tf_vma_map check from commit 972ea1 to stap_find_vma_map_info().

Commit 972ea1 misapplied the check to stap_add_vma_map_info. This can
never be called when the vma tracker hasn't been initialized. But
stap_find_vma_map_info[_user] potentially could be called. And so this
function needs to check that sure__stp_tf_vma_map is initialized.

12 years agostap_add_vma_map_info: Make sure__stp_tf_vma_map is initialized.
Mark Wielaard [Fri, 9 Dec 2011 13:40:53 +0000 (14:40 +0100)]
stap_add_vma_map_info: Make sure__stp_tf_vma_map is initialized.

stap_add_vma_map_info can even be called when the vma tracker was never
activated by _stp_snprint_addr().

12 years agostap_add_vma_map_info: Reserve __stp_tf_vma_entry memory before taking locks.
Mark Wielaard [Fri, 9 Dec 2011 11:19:54 +0000 (12:19 +0100)]
stap_add_vma_map_info: Reserve __stp_tf_vma_entry memory before taking locks.

Otherwise we could sleep while a reader was waiting on us.

12 years agocache.cxx (clean_cache): Use difftime to compare times.
Mark Wielaard [Fri, 9 Dec 2011 10:10:42 +0000 (11:10 +0100)]
cache.cxx (clean_cache): Use difftime to compare times.

Otherwise on some systems you will get a error: comparison between signed
and unsigned integer expressions.

12 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Mark Wielaard [Fri, 9 Dec 2011 09:56:40 +0000 (10:56 +0100)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

12 years agoPR11671 Allocate __stp_tf_vma_entry dynamically.
Mark Wielaard [Fri, 9 Dec 2011 09:46:20 +0000 (10:46 +0100)]
PR11671 Allocate __stp_tf_vma_entry dynamically.

Get rid of TASK_FINDER_VMA_ENTRY_ITEMS and __stp_tf_vma_free_list_items
array list completely. All __stp_tf_vma_entry are allocated dynamically
now. This is possible since stap_add_vma_map_info() is only called
through the task_finder from a user context.

There is no more fixed maximum number of VMA pages that will be tracked
at runtime. This reduces memory use for those scripts that don't need any,
or only limited target process VMA tracking and allows easier system
wide probes inspecting shared library variables and/or user backtraces.
stap will now silently ignore -DTASK_FINDER_VMA_ENTRY_ITEMS.

12 years agotracepoints: tolerate kernel event headers without their own #include <linux/tracepoi...
Frank Ch. Eigler [Thu, 8 Dec 2011 20:51:21 +0000 (15:51 -0500)]
tracepoints: tolerate kernel event headers without their own #include <linux/tracepoint.h>

include/trace/events/writeback.h lacks this, which means that
systemtap tracepoint _aux.o files fail to build.

* tapsets.cxx (tracepoint_derived_probe_group::emit_module_decls): Generously
  offer to emit the possibly missing #include <...> into the FOO_aux_N.c file.

12 years agoInitialize the task_finder mmap entries in task_finder2.
David Smith [Thu, 8 Dec 2011 18:59:07 +0000 (12:59 -0600)]
Initialize the task_finder mmap entries in task_finder2.

* runtime/task_finder2.c (stap_start_task_finder): Be sure to initialize
  the map entries.

12 years agoIntroduce stap_destroy_vma_map and allocate vma free at vma init time.
Mark Wielaard [Thu, 8 Dec 2011 16:09:55 +0000 (17:09 +0100)]
Introduce stap_destroy_vma_map and allocate vma free at vma init time.

We don't keep a static __stp_tf_vma_free_list_items anymore, but allocate
the items once in stap_initialize_vma_map(), which can now return failure
when there isn't enough memory. Make sure to call stap_destroy_vma_map()
when the module is unloaded to clean up.

12 years agoPR13076: Added man page entry
Chris Meek [Thu, 8 Dec 2011 18:02:39 +0000 (13:02 -0500)]
PR13076: Added man page entry

stap.1
  Added info under CACHING. Also updated the cache_mb_limit defult
  value to 256 MiB rather than 64MiB

12 years agoPR13076: Added time interval to cache cleaning
Chris Meek [Thu, 8 Dec 2011 17:41:00 +0000 (12:41 -0500)]
PR13076: Added time interval to cache cleaning

cache.cxx:
  Added a new file to the cache - cache_clean_interval_s - to keep
  track of the new cache clean time interval. Now the cache will
  only be cleaned when the time since the previous clean is longer
  than the interval, rather than every time a new entry is added
  to the cache. The default interval is 30 sec.

12 years agostap_initialize_vma_map() doesn't need any locking.
Mark Wielaard [Thu, 8 Dec 2011 15:14:57 +0000 (16:14 +0100)]
stap_initialize_vma_map() doesn't need any locking.

I must be called before any other task_finder_vma routine can be called,
so it will never run concurrently.

12 years agoMake sure 'environ' is not NULL before passing it (via env) to posix_spawnp.
Dave Brolley [Wed, 7 Dec 2011 16:17:51 +0000 (11:17 -0500)]
Make sure 'environ' is not NULL before passing it (via env) to posix_spawnp.

12 years agostaprun: User privilege checking in restricted environments.
Dave Brolley [Tue, 6 Dec 2011 21:32:26 +0000 (16:32 -0500)]
staprun: User privilege checking in restricted environments.

- Make sure staprun builds with all combinations of HAVE_ELF and
  HAVE_ELF_GETSHDRSTRNDX.
- When HAVE_ELF_GETSHDRSTRNDX is not defined, we must assume the
  highest required privilege level for signed modules (stapsys).

12 years ago--modinfo testsuite
Frank Ch. Eigler [Mon, 5 Dec 2011 23:21:42 +0000 (18:21 -0500)]
--modinfo testsuite

tweak expect clauses to consume all lines

12 years agotapset: Make addr_to_node ignore !NODE_DATA(nid)
Josh Stone [Mon, 5 Dec 2011 21:04:19 +0000 (13:04 -0800)]
tapset: Make addr_to_node ignore !NODE_DATA(nid)

In the block added for RHEL4 compatibility, there was even a comment
indicating that we'd like to skip nodes that aren't online.  We can't
make that check due to missing an EXPORT for node_online_map, but
checking for a non-NULL pointer for NODE_DATA(nid) gets approximately
the same result.

12 years agoPR 13323: Fix regression checking return code of init_ctl_channel.
Dave Brolley [Mon, 5 Dec 2011 22:15:31 +0000 (17:15 -0500)]
PR 13323: Fix regression checking return code of init_ctl_channel.

- init_ctl_channel can return 0 or 1 on success
- remove_module must be called if it returns < 0

12 years agoAdd new --modinfo option.
Frank Ch. Eigler [Mon, 5 Dec 2011 21:28:57 +0000 (16:28 -0500)]
Add new --modinfo option.

* session.cxx (parse_cmdline): Parse it.
  (usage): Note it.
* session.h (modinfos): Store it.
* hash.cxx (find_script_hash): Mix it.
* translate.cxx (translate_pass): Use it.
* testsuite/systemtap.base/modinfo.exp: Lightly test it.
* NEWS, stap.1: Document it.

12 years agoDon't mark skipped unprivileged_embedded_C.exp tests as UNTESTED.
Dave Brolley [Mon, 5 Dec 2011 21:09:24 +0000 (16:09 -0500)]
Don't mark skipped unprivileged_embedded_C.exp tests as UNTESTED.

12 years agoFixed uninitialized error in _stp_vsnprintf()
Chris Meek [Mon, 5 Dec 2011 20:48:53 +0000 (15:48 -0500)]
Fixed uninitialized error in _stp_vsnprintf()

vsprintf.c:
  Initialized both char *end and char *str to NULL.

12 years agoPR 13323: staprun should check return code from send_request when sending messages...
Dave Brolley [Mon, 5 Dec 2011 17:35:00 +0000 (12:35 -0500)]
PR 13323: staprun should check return code from send_request when sending messages via the transport layer

The return code of send_request is now propagated and checked back to
init_staprun.

12 years agoruntime/stack-dwarf.c: arch_unw_init_frame_info() call takes an int.
Mark Wielaard [Fri, 2 Dec 2011 22:46:30 +0000 (23:46 +0100)]
runtime/stack-dwarf.c: arch_unw_init_frame_info() call takes an int.

12 years agotapset/arm/registers.stp (_stp_arg): should return signed values.
Mark Wielaard [Fri, 2 Dec 2011 11:56:03 +0000 (12:56 +0100)]
tapset/arm/registers.stp (_stp_arg): should return signed values.

12 years agotestsuite/systemtap.context/num_args.stp: Define ri and rl registers for ARM.
Mark Wielaard [Fri, 2 Dec 2011 10:45:16 +0000 (11:45 +0100)]
testsuite/systemtap.context/num_args.stp: Define ri and rl registers for ARM.

12 years ago_stp_get_mm_counter: Fix kernel version check.
Mark Wielaard [Thu, 1 Dec 2011 19:26:19 +0000 (20:26 +0100)]
_stp_get_mm_counter: Fix kernel version check.

The kernel version check was wrong in two ways. First it tested against
kernel_v >= "3.1.0" but linux commit 172703 "mm: delete non-atomic mm
counter implementation" was actually integrated for 3.0. But fedora
names their 3.0 kernels 2.6.40 (and 3.1 kernels 2.6.41, depending on
release). So change the test to kernel_v >= "2.6.40".

The reason this wasn't found earlier was that there is another check
for CONFIG_NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS which is almost always
true (but not on arm tegra kernels).

12 years agosystemtap.examples/check.exp: Don't try running tests that failed to build.
Mark Wielaard [Thu, 1 Dec 2011 19:22:51 +0000 (20:22 +0100)]
systemtap.examples/check.exp: Don't try running tests that failed to build.

Just mark them UNTESTED if the build phase FAILed. This also saves time
since the run phase will try to build the testcase again (and will always
FAIL doing that).

12 years agoPR13462 symdata() returns ARM mapping symbols.
Mark Wielaard [Thu, 1 Dec 2011 19:02:02 +0000 (20:02 +0100)]
PR13462 symdata() returns ARM mapping symbols.

Introduce skippable_arch_symbol() function that filters out arch specific
symbols that should be ignored in dump_symbol_tables().

12 years agoFix the dtrace_clone.exp test to properly test with/without semaphores.
David Smith [Thu, 1 Dec 2011 17:49:41 +0000 (11:49 -0600)]
Fix the dtrace_clone.exp test to properly test with/without semaphores.

* testsuite/systemtap.clone/dtrace_clone.exp: Use the correct #define to
  get rid of the semaphores.
* testsuite/systemtap.clone/dtrace_clone.c: Be sure to ifdef out all the
  semaphores.

12 years agotapsets.cxx: Fix arguments passed to common_probe_entryfn_epilogue.
Mark Wielaard [Thu, 1 Dec 2011 14:51:58 +0000 (15:51 +0100)]
tapsets.cxx: Fix arguments passed to common_probe_entryfn_epilogue.

12 years agoMerge branch 'master' into jistone/inode-uprobes
David Smith [Thu, 1 Dec 2011 14:14:31 +0000 (08:14 -0600)]
Merge branch 'master' into jistone/inode-uprobes

12 years agoDocument some new features and improvements since systemtap 1.6.
Mark Wielaard [Thu, 1 Dec 2011 11:05:35 +0000 (12:05 +0100)]
Document some new features and improvements since systemtap 1.6.

task_backtrace removed, MAXBACKTRACE documented, new probe_type() function,
unwind and symbol data only processed when really necesessary, kernel
backtraces for non-pt_regs probe context (timer and tracepoints),
ubacktrace() from kernel probe points, s390x user space support, ppc,
s390x and arm dwarf unwinder support, arm uprobes port.

12 years agoPR13306: test 'er
Frank Ch. Eigler [Thu, 1 Dec 2011 00:58:54 +0000 (19:58 -0500)]
PR13306: test 'er

12 years agoPR13306: document new option
Frank Ch. Eigler [Thu, 1 Dec 2011 00:58:37 +0000 (19:58 -0500)]
PR13306: document new option

12 years agoPR13306: introduce stap --suppress-handler-errors option
Frank Ch. Eigler [Thu, 1 Dec 2011 00:54:19 +0000 (19:54 -0500)]
PR13306: introduce stap --suppress-handler-errors option

PR13306 asked for a way to skip handlers when probe alias prefixes
fail.  This implementation is a little bigger hammer, but believed
to be more generally useful.

* session.cxx: Initialize/copy/getopt new option.
* session.h: Store it.
* hash.cxx (find_script_hash): Mix it in.
* tapsets.cxx (common_probe_entryfn_epilogue): Skip various
  MAXERRORS/MAXSKIPPED processing when flag is set.
* tapset.h (common_probe_entryfn_epilogue): Drop middle default
  argument since it got confusing.  Add new argument.
* tapsets*.cxx (*::emit_module_decls): Update ..._epilogue callers.

12 years agoMerge branch 'master' into jistone/inode-uprobes
David Smith [Wed, 30 Nov 2011 21:48:01 +0000 (15:48 -0600)]
Merge branch 'master' into jistone/inode-uprobes

12 years agotestsuite: more xfail->kfail transforms
Frank Ch. Eigler [Wed, 30 Nov 2011 15:01:37 +0000 (10:01 -0500)]
testsuite: more xfail->kfail transforms

As per commit 174c4d74, use kfail for transient environmental
problems as opposed to want-to-fail test cases.

12 years agond_syscalls.stp: Probe sys_accept4 for kernel 2.6.28+.
Mark Wielaard [Wed, 30 Nov 2011 13:02:27 +0000 (14:02 +0100)]
nd_syscalls.stp: Probe sys_accept4 for kernel 2.6.28+.

Since 2.6.28 sys_accept is chained through sys_accept4. Probe
sys_accept4 only for newer kernels to not miss some accept
syscalls. Don't probe both or we will get double hits.

12 years agoAdd DWARF unwinder support for ARM.
Mark Wielaard [Wed, 30 Nov 2011 10:42:12 +0000 (11:42 +0100)]
Add DWARF unwinder support for ARM.

12 years agotestsuite: xfail->kfail buildok failures
Frank Ch. Eigler [Tue, 29 Nov 2011 22:23:29 +0000 (17:23 -0500)]
testsuite: xfail->kfail buildok failures

Use kfail to designate problems that represent unfixable issues such
as compiler limitations (debuginfo missing from here or there).
xfail is inappropriate, as we use this to designate failures we
want to see, e.g., the detection of deliberate input errors.

* lib/stap_buildok.exp: Removed, inlined back into
* systemtap.pass1-4/buildok.exp: Pull switch code in here.  Use kfail*.
* systemtap.exelib/pthreadprobes.exp: Don't look at buildok_known_failures,
  which didn't have any pthread awareness anyway.

12 years agoAdded individual tests for function.call and function.return probes.
David Smith [Tue, 29 Nov 2011 21:52:13 +0000 (15:52 -0600)]
Added individual tests for function.call and function.return probes.

* testsuite/systemtap.base/uprobes.exp: Added sub-tests that check .call
  and .return probes individually.
* testsuite/systemtap.base/uprobes_call.stp: New file.
* testsuite/systemtap.base/uprobes_return.stp: New file.

12 years agoPR13458: laugh in the face of xslt
Frank Ch. Eigler [Tue, 29 Nov 2011 21:29:09 +0000 (16:29 -0500)]
PR13458: laugh in the face of xslt

Using a dozen-line xslt script, one can sort the generated tapsets.xml
documentation's reference sections.  Thank you interwebs:
http://stackoverflow.com/questions/572854/how-to-sort-a-subelement-of-xml-with-xslt
http://www.w3schools.com/xpath/xpath_syntax.asp

12 years agoMark buildok/memory-write_shared_copy.stp as KFAIL when it fails
William Cohen [Tue, 29 Nov 2011 20:38:11 +0000 (15:38 -0500)]
Mark buildok/memory-write_shared_copy.stp as KFAIL when it fails

Kernels built with older versions of gcc do not have the needed argument
information for inlined functions. vm.write_shared_copy probes inlined
functions and suffers from PR1155 in this situation. This patch marks
it as a KFAIL with a mention of PR1155 when it fails.

12 years agond_syscall.exp KFAIL PR13451, PR13452, PR13453, PR13454, PR13455 and PR13456
Mark Wielaard [Tue, 29 Nov 2011 19:33:05 +0000 (20:33 +0100)]
nd_syscall.exp KFAIL PR13451, PR13452, PR13453, PR13454, PR13455 and PR13456

dup, eventfd, inotify, pipe, signalfd and poll are incomplete in nd_syscalls.

12 years agoPR13420 cast-scope.exp: kfail all non-optimized test cases.
Mark Wielaard [Tue, 29 Nov 2011 17:07:16 +0000 (18:07 +0100)]
PR13420 cast-scope.exp: kfail all non-optimized test cases.

On powerpc both -m32 and -m64 unoptimized fail because of PR13420.
Better to accidentially KPASS on some arches than have XFAILS on some others.

12 years agoMake cast-scope testcase more robust. Prevent line-reordening.
Mark Wielaard [Tue, 29 Nov 2011 16:53:35 +0000 (17:53 +0100)]
Make cast-scope testcase more robust. Prevent line-reordening.

Setting a statement line probe is somewhat fragile since different GCCs
output different line tables. Make sure that there is a known single
statement line in the testcase to probe.

12 years agoPR10739 kfail all backtrace.exp tests on non-x86 architectures.
Mark Wielaard [Tue, 29 Nov 2011 12:23:02 +0000 (13:23 +0100)]
PR10739 kfail all backtrace.exp tests on non-x86 architectures.

12 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Mark Wielaard [Tue, 29 Nov 2011 12:03:07 +0000 (13:03 +0100)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

12 years agoSupport fallback kernel dump_stack() with or without bp argument.
Mark Wielaard [Tue, 29 Nov 2011 11:32:05 +0000 (12:32 +0100)]
Support fallback kernel dump_stack() with or without bp argument.

There has been some flip-flopping in the kernel whether or not dump_stack()
takes a bp argument. We now support either with or without.
See linux commits v2.6.36-9872-g9c0729d and v2.6.38-793-ge8e999c.

12 years agoSupport fallback kernel dump_stack() with or without bp argument.
Mark Wielaard [Tue, 29 Nov 2011 11:32:05 +0000 (12:32 +0100)]
Support fallback kernel dump_stack() with or without bp argument.

There has been some flip-flopping in the kernel whether or not dump_stack()
takes a bp argument. We now support either with or without.
See linux commits v2.6.36-9872-g9c0729d and v2.6.38-793-ge8e999c.

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