]> sourceware.org Git - systemtap.git/log
systemtap.git
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.

12 years agoPR10739 kfail on non-x86 architectures, no dump_trace available.
Mark Wielaard [Tue, 29 Nov 2011 11:24:07 +0000 (12:24 +0100)]
PR10739 kfail on non-x86 architectures, no dump_trace available.

12 years agoFixed compile problem when HAVE_NSS isn't defined.
David Smith [Mon, 28 Nov 2011 22:12:28 +0000 (16:12 -0600)]
Fixed compile problem when HAVE_NSS isn't defined.

* runtime/staprun/staprun_funcs.c (check_signature): If HAVE_NSS isn't
  defined, mark the arguments as unused to avoid gcc errors.

12 years agoRHBZ 757802: Add '--' to regexp commands in server_args.exp.
Dave Brolley [Mon, 28 Nov 2011 21:36:44 +0000 (16:36 -0500)]
RHBZ 757802: Add '--' to regexp commands in server_args.exp.

12 years agoPR13440: Use real userspace addresses in @cast tests
Josh Stone [Mon, 28 Nov 2011 21:06:15 +0000 (13:06 -0800)]
PR13440: Use real userspace addresses in @cast tests

Some architectures make a harder distinction between user/kernel
addresses, so we shouldn't be faking our user memory.

* testsuite/systemtap.base/cast.*: Remove userspace @cast.
* testsuite/systemtap.base/cast-user.*: Add a new test for userspace
  @casts with an honest userspace address.

12 years agoPR13354: Add a type cast to satisfy old compilers
Josh Stone [Mon, 28 Nov 2011 21:02:16 +0000 (13:02 -0800)]
PR13354: Add a type cast to satisfy old compilers

RHEL4-era gcc tried to make "fake_remote?-1:i" unsigned (as 'i' is), and
then complained about making -1 unsigned.  Since remote::create just
wants an int anyway, cast "i" in the ternary.

12 years agoPR13445: shrink ctl command handler function use less stack space
Frank Ch. Eigler [Mon, 28 Nov 2011 12:59:55 +0000 (07:59 -0500)]
PR13445: shrink ctl command handler function use less stack space

* runtime/transport/control.c (_stp_ctl_write_cmd): Make larger struct
  copies static.  Explain why this is safe.

12 years ago_stp_vma_mmap_cb: Really mean that we are only interested in the first load.
Mark Wielaard [Mon, 28 Nov 2011 11:06:39 +0000 (12:06 +0100)]
_stp_vma_mmap_cb: Really mean that we are only interested in the first load.

There was a chance our test for whether this was the first load of the
whole module that is executable could miss a second load, which would
override the original start address. Fix that by explicitly checking
whether we already registered this module or not.

12 years agoPR13354: remote_id() and remote_uri() tapset functions
Frank Ch. Eigler [Sun, 27 Nov 2011 22:26:44 +0000 (17:26 -0500)]
PR13354: remote_id() and remote_uri() tapset functions

This little thing required changes all through the stack!

* main.cxx (main): Pass the explicit --remote option index to the
  remote::create invocations.
* remote.cxx (remote::create): Pass incoming index/uri to build staprun_r_arg.
  (direct::start): Use value.
  (stapsh::start): Use value if remote end is believed to be >= v1.7.
  (ssh_legacy_remote::start): Don't use value, as remote end may not know staprun -r.
* remote.h (remote): New field staprun_r_arg.

* runtime/transport/transport_msgs.h: Define new STP_REMOTE_ID message type.

* runtime/staprun/common.c (parse_args, usage): Support new -r option.
* runtime/staprun/staprun.8: Document it.
* runtime/staprun/staprun.c: Pass remote id/uri to runtime via
  new STP_REMOTE_URI message.
* runtime/staprun/staprun.h: Declare new variables.

* runtime/transport/control.c (_stp_ctl_write_cmd): Accept STP_REMOTE_ID message
  from euid=0.
* runtime/transport/transport.c (_stp_handle_remote_id): Process it.

* tapset/context.stp (remote_id, remote_uri): New functions.
* testsuite/systemtap.base/remote.exp: Extend to print/check those functions' values.

12 years agoPR13354: NEWS blurb for remote_id() and remote_uri()
Frank Ch. Eigler [Sun, 27 Nov 2011 21:07:59 +0000 (16:07 -0500)]
PR13354: NEWS blurb for remote_id() and remote_uri()

12 years agoPR13354: run remote.exp by default, even if $TESTREMOTES were unset
Frank Ch. Eigler [Sun, 27 Nov 2011 20:56:32 +0000 (15:56 -0500)]
PR13354: run remote.exp by default, even if $TESTREMOTES were unset

Just run it with direct: and stapsh:

12 years agoPass through user flag into all of unwinder.
Mark Wielaard [Sat, 26 Nov 2011 21:21:22 +0000 (22:21 +0100)]
Pass through user flag into all of unwinder.

runtime/unwind.c relied on passing of struct task being not NULL
to see whether to access user space. In practice tsk was always
either NULL or current. And not all bits of the unwinder checked
it. Now we just pass a user flag and push it down to every
function that needs it.

12 years agoPR13155 mention in NEWS
Frank Ch. Eigler [Sat, 26 Nov 2011 04:16:22 +0000 (23:16 -0500)]
PR13155 mention in NEWS

12 years agoexamples index bump
Frank Ch. Eigler [Fri, 25 Nov 2011 16:33:25 +0000 (11:33 -0500)]
examples index bump

12 years agoFix build error in staprun_funcs.c when HAVE_ELF_GETSHDRSTRNDX is not set.
Mark Wielaard [Sat, 26 Nov 2011 01:33:01 +0000 (02:33 +0100)]
Fix build error in staprun_funcs.c when HAVE_ELF_GETSHDRSTRNDX is not set.

Mark find_section_in_module arguments unused when HAVE_ELF_GETSHDRSTRNDX
isn't set.

12 years agoUse __get_user and __put_user for s390 uderef/kderef.
Mark Wielaard [Sat, 26 Nov 2011 01:29:57 +0000 (02:29 +0100)]
Use __get_user and __put_user for s390 uderef/kderef.

Replace costum s390 [store_][uk]deref() implementations with standard
s390 kernel __get_user() and __put_user() functions. Wrapped in get_fs()
set_fs() calls to switch between user/kernel space addresses.

12 years agoloc2c-runtime.h: Split deref and store_deref into user and kernel version.
Mark Wielaard [Fri, 25 Nov 2011 14:11:00 +0000 (15:11 +0100)]
loc2c-runtime.h: Split deref and store_deref into user and kernel version.

All references to deref have been updated to use either the user or kernel
variant where appropriate, but kderef is currently still defined as uderef,
and store_kderef as store_uderef. Which should work fine for all arches
except s390.

12 years agoruntime/loc2c-runtime.h remove unused deref_buffer define.
Mark Wielaard [Fri, 25 Nov 2011 10:53:19 +0000 (11:53 +0100)]
runtime/loc2c-runtime.h remove unused deref_buffer define.

12 years agoConsolidate fetch_[uk]register defines in one place in tapsets.cxx.
Mark Wielaard [Thu, 24 Nov 2011 19:32:24 +0000 (20:32 +0100)]
Consolidate fetch_[uk]register defines in one place in tapsets.cxx.

12 years agoCreate stapusr, stapsys and stapdev groups with their assigned group ids, if possible.
Dave Brolley [Fri, 25 Nov 2011 17:06:03 +0000 (12:06 -0500)]
Create stapusr, stapsys and stapdev groups with their assigned group ids, if possible.

- Group IDs were assigned by RHBZ 756807

12 years agoPR 13128: NEWS and man page updates.
Dave Brolley [Wed, 23 Nov 2011 22:43:33 +0000 (17:43 -0500)]
PR 13128: NEWS and man page updates.

12 years agoPR 13128: No need to exhaustively test every tapset function.
Dave Brolley [Wed, 23 Nov 2011 21:31:10 +0000 (16:31 -0500)]
PR 13128: No need to exhaustively test every tapset function.

- Test a subset by default
- Test them all if SYSTEMTAP_TEST_ALL_EMBEDDED_C is defined in the environment.

12 years agoPR 13128: Implement module privilege check in staprun.
Dave Brolley [Wed, 23 Nov 2011 18:44:40 +0000 (13:44 -0500)]
PR 13128: Implement module privilege check in staprun.

- staprun extracts the required privilege level from signed modules
  and compares it against the user's actual privilege credentials
  before loading.

12 years agoPR 13128: Implement the new --privilege=stapsys
Dave Brolley [Tue, 22 Nov 2011 16:13:28 +0000 (11:13 -0500)]
PR 13128: Implement the new --privilege=stapsys

- Users belonging to the group stapsys can use all probe points and tapset
  functions (including those which contain embedded C), but cannot
  use the -g option.
- Loading of modules for stapsys users requires signing by a trusted compile-server.
- Add testing for stapsys throughout as appropriate.
- Update existing unprivileged test suites to test stapsys as appropriate.
- New test suite tests -g against all privilege levels.

12 years agoARM uprobes support
Wade Farnsworth [Fri, 4 Nov 2011 19:35:05 +0000 (12:35 -0700)]
ARM uprobes support

Basic uprobes support for ARM.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
12 years agoSimplify arch specific fallback for kernel backtraces __stp_stack_print.
Mark Wielaard [Tue, 22 Nov 2011 23:53:34 +0000 (00:53 +0100)]
Simplify arch specific fallback for kernel backtraces __stp_stack_print.

Only needs regs, sym_flags and levels to print.
Drop uwcontext, ri and uregs_valid.

12 years agotestsuite/systemtap.base/cxxclass.exp: Fix typo in untested case.
Mark Wielaard [Tue, 22 Nov 2011 23:45:48 +0000 (00:45 +0100)]
testsuite/systemtap.base/cxxclass.exp: Fix typo in untested case.

12 years agoPR13430 Split user tests from stmt_rel.exp into stmt_rel_user.exp.
Mark Wielaard [Tue, 22 Nov 2011 21:05:08 +0000 (22:05 +0100)]
PR13430 Split user tests from stmt_rel.exp into stmt_rel_user.exp.

The new stmt_rel_user.exp testcase runs the same test against all
available abi/opt variants. It kfails all the optimized builds
because of PR13430.

12 years agodwflpp::die_entrypc: Add missing closing brace in verbose message.
Mark Wielaard [Tue, 22 Nov 2011 16:03:11 +0000 (17:03 +0100)]
dwflpp::die_entrypc: Add missing closing brace in verbose message.

12 years agoFixed PR13428 by updating nfsd.stp.
David Smith [Tue, 22 Nov 2011 15:10:26 +0000 (09:10 -0600)]
Fixed PR13428 by updating nfsd.stp.

* tapset/nfsd.stp: Fixed nfsd.createv3 and nfsd.createv3.return probes
  after the kernel function they probe was renamed.

12 years agoAdd autoconf check for the addition of the pte argument for alloc_vm_area
William Cohen [Mon, 21 Nov 2011 22:21:20 +0000 (17:21 -0500)]
Add autoconf check for the addition of the pte argument for alloc_vm_area

Linux Kernel commit cd12909cb5 add the pt argument to the alloc_vm_area
function. Need to check whether that pte argument exists and sets a define
as required.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Mon, 21 Nov 2011 21:38:39 +0000 (16:38 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoMerge branch 'master' into dsmith/task_finder2
David Smith [Mon, 21 Nov 2011 19:28:40 +0000 (13:28 -0600)]
Merge branch 'master' into dsmith/task_finder2

12 years agoUpdate testsuite to check for new utrace requirements.
David Smith [Mon, 21 Nov 2011 18:03:03 +0000 (12:03 -0600)]
Update testsuite to check for new utrace requirements.

* testsuite/lib/systemtap.exp (utrace_p): Properly tests for the new
  utrace requirements.
* runtime/task_finder.c: Remove code that hardcoded new utrace.
* runtime/uprobes/uprobes.h: Reset to "normal" version.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Mon, 21 Nov 2011 15:15:23 +0000 (10:15 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agotestsuite/systemtap.base/cast-scope.exp: KFAIL: cast-scope-m64 (PRMS: 13420)
Mark Wielaard [Mon, 21 Nov 2011 12:23:46 +0000 (13:23 +0100)]
testsuite/systemtap.base/cast-scope.exp: KFAIL: cast-scope-m64 (PRMS: 13420)

PR13420 prologue detection fails for unoptimized 64bit cast-scope.exp.

12 years agotestsuite/lib/systemtap.exp: Check abi arch flags (-m64, -m32/31) work.
Mark Wielaard [Mon, 21 Nov 2011 10:51:24 +0000 (11:51 +0100)]
testsuite/lib/systemtap.exp: Check abi arch flags (-m64, -m32/31) work.

Make sure all development packages for the supported ABIs (-m64 -m32/-m31)
are installed by building a quick hello.c and hello.cxx program with both.

12 years agoAdd testsuite/lib/compile_flags.exp and use it in tests.
Mark Wielaard [Sat, 19 Nov 2011 19:45:49 +0000 (20:45 +0100)]
Add testsuite/lib/compile_flags.exp and use it in tests.

testsuite/lib/compile_flags.exp defines all_compile_flags(),
all_compile_flag(INDEX) and all_compile_flag_name(INDEX) which return
the number, actual flag and extra test name to use in tests that use
target_compile for use space testing. On architectures that support
multiple ABIs it will return all combinations of all optimizations
(none, -O, -O2) and the ABI flags (-m64, -m32 or -m31).

Use in a for loop like: for {set i 0} {$i < [all_compile_flags]} {incr i} {
  set extra_flag [all_compile_flag $i] # Add to target_compile flags
  set extra_name [all_compile_flag_name $i] # Add to test pass/fail message
...
}

12 years agouprobe_stmt_num.exp run the last test, but explicitl kfail PR10454.
Mark Wielaard [Sat, 19 Nov 2011 18:07:47 +0000 (19:07 +0100)]
uprobe_stmt_num.exp run the last test, but explicitl kfail PR10454.

12 years agoCheck for the new task_finder config variable requirement.
David Smith [Fri, 18 Nov 2011 20:37:11 +0000 (14:37 -0600)]
Check for the new task_finder config variable requirement.

* tapsets.cxx (check_process_probe_kernel_support): Add support for the
  requirements of the new task_finder (and even look ahead to the new
  uprobes).
* tapset-utrace.cxx (utrace_derived_probe_group::emit_module_decls): Minor
  change to match "real" tapset-utrace.cxx.

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Fri, 18 Nov 2011 20:22:03 +0000 (15:22 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoMerge branch 'master' into dsmith/task_finder2
David Smith [Fri, 18 Nov 2011 19:35:02 +0000 (13:35 -0600)]
Merge branch 'master' into dsmith/task_finder2

12 years agoMove common CONFIG_UTRACE check to its own function.
David Smith [Fri, 18 Nov 2011 19:28:54 +0000 (13:28 -0600)]
Move common CONFIG_UTRACE check to its own function.

* tapsets.cxx (check_process_probe_kernel_support): New function.
  (dwarf_builder::build): Moved CONFIG_UTRACE check to
  check_process_probe_kernel_support() which we call instead.
* tapset-utrace.cxx (utrace_derived_probe::utrace_derived_probe): Call
  check_process_probe_kernel_support() instead of doing CONFIG_UTRACE
  check.
* tapsets.h: Declare check_process_probe_kernel_support().

12 years agoPR12136: Tweak the cast-scope testcase
Josh Stone [Thu, 17 Nov 2011 21:10:55 +0000 (13:10 -0800)]
PR12136: Tweak the cast-scope testcase

- Use unnamed process.* to allow -c to guarantee the right path
- Specify the function probe's file, so we don't accidentally pick up
  any other length(), like string::length().

12 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
William Cohen [Thu, 17 Nov 2011 21:02:28 +0000 (16:02 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

12 years agoPR12136: Add a statement probe for testing @cast scopes
Josh Stone [Thu, 17 Nov 2011 20:32:03 +0000 (12:32 -0800)]
PR12136: Add a statement probe for testing @cast scopes

There's still an issue with getting the entry value, but the rest looks
like it's working properly...

12 years agoAdd UTRACE_API_VERSION to determine which utrace version we've got.
David Smith [Wed, 16 Nov 2011 21:23:46 +0000 (15:23 -0600)]
Add UTRACE_API_VERSION to determine which utrace version we've got.

* runtime/stp_utrace.h: Added UTRACE_API_VERSION back.
* tapset-utrace.cxx (utrace_derived_probe_group::emit_module_decls): Use
  UTRACE_API_VERSION, which stp_utrace.h now provides, so that we don't
  have to check STP_TASK_FINDER2.

12 years agoMerge branch 'master' into dsmith/task_finder2
David Smith [Wed, 16 Nov 2011 21:04:16 +0000 (15:04 -0600)]
Merge branch 'master' into dsmith/task_finder2

12 years agoDon't use dwfl_module bias in either emit_address() and vardie_from_symtable().
Mark Wielaard [Wed, 16 Nov 2011 12:33:26 +0000 (13:33 +0100)]
Don't use dwfl_module bias in either emit_address() and vardie_from_symtable().

dwflpp::emit_address() is called by loc2c for emitting DW_OP_addr.
DW_OP_addr could come from the actual dwarf location description or
could be synthetically generated from through vardie_from_symtable().
vardie_from_symtable() would keep the dwfl module bias (if there was one),
but the DW_OP_addr from real dwarf debuginfo would not have it.
Now we are consistently not having the module bias added.

Add some variants of the externalvar.exp testcase, which previously
failed with older GCC versions (where we would pick up the DW_OP_addr
from the dwarf location description), while newer GCCs emit dwarf DIEs
for these variables that only have the external flag set. The new
testcase variants use static vars, which will have DW_OP_addr emitted
in both old and new GCC versions.

12 years agoAdd the kvm_service_time.stp example
William Cohen [Tue, 15 Nov 2011 16:39:45 +0000 (11:39 -0500)]
Add the kvm_service_time.stp example

12 years agoUpdate the examples index with qemu_io.stp and qemu_count.stp.
William Cohen [Tue, 15 Nov 2011 14:19:20 +0000 (09:19 -0500)]
Update the examples index with qemu_io.stp and qemu_count.stp.

12 years agoAdd qemu_count.stp example
William Cohen [Tue, 15 Nov 2011 14:18:22 +0000 (09:18 -0500)]
Add qemu_count.stp example

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