]> sourceware.org Git - systemtap.git/log
systemtap.git
13 years agoFix typo in loc2c-runtime.h for ia64
William Cohen [Wed, 28 Sep 2011 15:40:06 +0000 (11:40 -0400)]
Fix typo in loc2c-runtime.h for ia64

13 years agoIntroduce gfp_mask variants of _stp allocation functions.
Mark Wielaard [Wed, 28 Sep 2011 11:18:18 +0000 (13:18 +0200)]
Introduce gfp_mask variants of _stp allocation functions.

* runtime/alloc.c: Add _stp_kmalloc_gfp(), _stp_kzalloc_gfp() and
  _stp_kmalloc_node_gfp() which take a gfp_mask in case you really know
  what you are doing.
* translate.cxx (emit_module_init): Use with GFP_KERNEL for context alloc.
* runtime/map.c: Use for init and new functions called at module_init time.
* runtime/stat.c: Likewise.

13 years agoruntime/alloc.c: Remove unused _stp_vmalloc() and _stp_vfree() functions.
Mark Wielaard [Wed, 28 Sep 2011 10:15:22 +0000 (12:15 +0200)]
runtime/alloc.c: Remove unused _stp_vmalloc() and _stp_vfree() functions.

13 years ago_stp_vma_match_vdso: Don't subtract build_id_len from notes_addr.
Mark Wielaard [Tue, 27 Sep 2011 14:21:15 +0000 (16:21 +0200)]
_stp_vma_match_vdso: Don't subtract build_id_len from notes_addr.

Older (pre-0.138) elfutils would erroneously return the address of the
build id note address with the length added. Newer ones never do this.
And we only support elfutils 0.142+ now anyway. Fixes vma_vdso.exp.

13 years agodtrace.in: generate DTRACE_PROBE compatibility macro instead of STAP_PROBE.
Mark Wielaard [Tue, 27 Sep 2011 12:28:45 +0000 (14:28 +0200)]
dtrace.in: generate DTRACE_PROBE compatibility macro instead of STAP_PROBE.

13 years agostack.c (_stp_get_uregs): Detect kernel unwind before user unwind case.
Mark Wielaard [Mon, 26 Sep 2011 14:19:37 +0000 (16:19 +0200)]
stack.c (_stp_get_uregs): Detect kernel unwind before user unwind case.

Detect and optimize the kernel backtrace() then user backtrace in same
probe case, by reusing the unwind info.

13 years agostack.c (_stp_get_uregs): Recover user registers from kernel context.
Mark Wielaard [Fri, 23 Sep 2011 11:34:37 +0000 (13:34 +0200)]
stack.c (_stp_get_uregs): Recover user registers from kernel context.

When possible recover full pt_regs user register set by unwinding
using kernel context till we hit user space.

13 years agounwind.c (adjustStartLoc): Call stap_find_vma_map_info_user() only on task.
Mark Wielaard [Fri, 23 Sep 2011 11:18:32 +0000 (13:18 +0200)]
unwind.c (adjustStartLoc): Call stap_find_vma_map_info_user() only on task.

For kernel modules the mapped address is found in the section static_addr.

13 years ago_stp_current_pt_regs() helper, explicitly checks current->mm.
Mark Wielaard [Fri, 23 Sep 2011 11:07:07 +0000 (13:07 +0200)]
_stp_current_pt_regs() helper, explicitly checks current->mm.

task_pt_regs(current) is only valid when current->mm has been setup.

13 years agoPR12221 cont'd: Added module suport for adding build id to hash
Chris Meek [Thu, 22 Sep 2011 19:04:32 +0000 (15:04 -0400)]
PR12221 cont'd: Added module suport for adding build id to hash

Now when you probe a module, the build ID of the module is
added to the script's hash.

dwflpp.cxx:
  - Calls dwfl_getmodules in setup_kernel with a new callback
  add_module_build_id_to_hash().
  - Added add_module_build_id_to_hash() callback.

dwflpp.h:
  - Added function declaration for above callback.

setupdwfl.cxx:
  - Removed adding kernel build ID to session variable as new
  callback handles that case as well.

13 years agoPR13216: set AM_GNU_GETTEXT_VERSION(0.17) in configury
Frank Ch. Eigler [Thu, 22 Sep 2011 15:53:13 +0000 (11:53 -0400)]
PR13216: set AM_GNU_GETTEXT_VERSION(0.17) in configury

13 years agotestsuite: standardize test $pass/$fail messages
Frank Ch. Eigler [Wed, 21 Sep 2011 15:57:50 +0000 (11:57 -0400)]
testsuite: standardize test $pass/$fail messages

* lib/stap_run_error.exp (stap_run_error): Make pass & fail testcase
  names the same, so regressions can be more easily found.

13 years agoFix pre gcc 4.6 unitialized variable warnings.
Stan Cox [Wed, 21 Sep 2011 14:20:51 +0000 (10:20 -0400)]
Fix pre gcc 4.6 unitialized variable warnings.

dwflpp.cxx (dwflpp::iterate_over_plt):  Initialize have_rel/have_rela.

13 years agodwflpp.cxx (dwflpp::iterate_over_plt): Initialize both rel and rela.
Mark Wielaard [Wed, 21 Sep 2011 14:02:05 +0000 (16:02 +0200)]
dwflpp.cxx (dwflpp::iterate_over_plt): Initialize both rel and rela.

So gcc can see they are not used uninitialized.

13 years agoPut probe name descriptions on separate line to include in tapset ref.
Mark Wielaard [Wed, 21 Sep 2011 13:16:18 +0000 (15:16 +0200)]
Put probe name descriptions on separate line to include in tapset ref.

To get included in the tapset reference manual a probe name description
cannot start on the first '/**' comment line.

13 years agoAlso recognize rel.plt, which is used on x686.
Stan Cox [Wed, 21 Sep 2011 12:54:28 +0000 (08:54 -0400)]
Also recognize rel.plt, which is used on x686.

dwflpp.cxx (dwflpp::iterate_over_plt):  Allow either .rela.plt or .rel.plt.

13 years agoTell the user if UTS_VERSION does not match running kernel
Timo Juhani Lindfors [Wed, 21 Sep 2011 09:19:01 +0000 (12:19 +0300)]
Tell the user if UTS_VERSION does not match running kernel

The test is done before looking at build-id since build-id error
messages like

ERROR: Build-id mismatch: "kernel" vs. "vmlinux-2.6.32-5-amd64" byte 0 (0x5e vs 0xff)
Pass 5: run failed.  Try again with another '--vp 00001' option.

are not very user-friendly.

13 years agoPR13210 vma/vdso tracking is broken testcase
Mark Wielaard [Wed, 21 Sep 2011 10:38:24 +0000 (12:38 +0200)]
PR13210 vma/vdso tracking is broken testcase

Add a generic testcase to see if we can track the vma from which a syscall
was made. This might or might not come in through the vdso on the particular
(compat) arch, but should always at least be able to get the vma name.
Currently it fails some of the tests in different ways for different arches
and/or kernel versions.

13 years agoAdd process.plt test.
Stan Cox [Tue, 20 Sep 2011 18:14:46 +0000 (14:14 -0400)]
Add process.plt test.

testsuite/systemtap.base/plt.exp:  New test.
testsuite/systemtap.base/plt.c:  New test case.
tapsets.cxx (base_query::base_query):  .plt requires the elf symbol table.

13 years agoPut struct unwind_frame_info in unwind.h and remove unused task field.
Mark Wielaard [Tue, 20 Sep 2011 20:22:14 +0000 (22:22 +0200)]
Put struct unwind_frame_info in unwind.h and remove unused task field.

Remove the identical definitions of struct unwind_frame_info from
unwind/i386.h and unwind/x86_64.h and put it in unwind/unwind.h.
Also put struct unwind_context there to keep all struct definitions
together. Remove unused task field from struct unwind_frame_info.

13 years agoPR 13107: simplify compile-server testsuite
Dave Brolley [Tue, 20 Sep 2011 16:56:42 +0000 (12:56 -0400)]
PR 13107: simplify compile-server testsuite

- Removed the use of a wrapper script to run stap using the server.
- Client/server tests now use the --use-server option as needed.
- testsuite/systemtap.server/server.exp is now reduced.
  - no longer runs all of buildok tests
  - now runs tests on server-specific functionality
  - general client/server interoperability covered by existing tests.

13 years agoBZ732346 vs PR12729: don't print make failure messages for bad tracepoints
Frank Ch. Eigler [Tue, 20 Sep 2011 14:49:41 +0000 (10:49 -0400)]
BZ732346 vs PR12729: don't print make failure messages for bad tracepoints

Having buggy/incomplete kernel tracepoint headers is routine, but
PR12729 started relaying make/gcc complaints about them to the user.
That's unkind.

* buildrun.cxx (make_tracequery): Run "make -i" instead of "make"
  for tracequery jobs.

13 years agotestsuite: add explicit timeouts to stap session
Frank Ch. Eigler [Tue, 20 Sep 2011 14:21:09 +0000 (10:21 -0400)]
testsuite: add explicit timeouts to stap session

With the previous code, it was possible for the delayedkill ./loop job
to be killed before the stap script watching for its end got really
ready.  That could mean that the stap script starts, and waits, and
waits, and waits more, and waits, and waits, and waits, and waits, and
waits, and waits, and waits, and waits, and waits, and waits, and
waits, and waits, and waits yet more, and waits, and waits, and waits,
and waits, and waits, and waits, and waits, and waits, and waits, and
waits, and waits a bit longer, and waits, and waits, and waits, and
waits, and waits, and waits, and waits, and waits more , and waits,
and waits, and waits, and waits, and waits, and waits, and waits, and
waits, and keeps waiting, and waits, and waits, and waits, and waits,
and waits, and waits, and waits, and goes on waiting, and waits, and
waits a lot, and waits, and waits, and waits, and waits, and waits,
and waits, and waits, and waits for warts, and waits, and waits, and
waits, and waits, and waits, and waits, and waits, and waits, now
getting slightly impatient, and waits, and waits, and waits, and
waits, and waits, and waits, and waits, and waits, and waits, and
waits, and waits, and waits, and waits, and waits a lot more.

Since there is no robust synchronization in the test case, let's
increase the delayedkill interval to make the above wait less likely,
plus add a godot timeout probe that will abort the script before it
gets grey hairs, loses its teeth, and gets bombarded with funeral
pre-planning spam.

13 years agoIntroduce _stp_get_uregs and _STP_PROBE_STATE_FULL_UREGS flag.
Mark Wielaard [Tue, 20 Sep 2011 09:48:28 +0000 (11:48 +0200)]
Introduce _stp_get_uregs and _STP_PROBE_STATE_FULL_UREGS flag.

No actual functionality change yet. _STP_PROBE_STATE_FULL_UREGS
is set for context probe_flags if full user register set is available
after calling _stp_get_uregs().

13 years agoFix arm _stp_get_register_by_offset switched uregs/kregs usage.
Mark Wielaard [Tue, 20 Sep 2011 09:07:14 +0000 (11:07 +0200)]
Fix arm _stp_get_register_by_offset switched uregs/kregs usage.

13 years agoPR13200: skip prologue searching for *.function(ADDR).return probes
Frank Ch. Eigler [Mon, 19 Sep 2011 18:25:43 +0000 (14:25 -0400)]
PR13200: skip prologue searching for *.function(ADDR).return probes

Prologue searching has to be suppressed for all kretprobes/uretprobes
address calculations, or else the *retprobes facility can overwrite
valid stack frame data instead of return addresses.

* tapsets.cxx (query_addr, query_func_info): Perform prologue analysis
  but verbosely ignore results, for .return probes.

13 years agouaddr(): Use CONTEXT->uregs directly when _STP_PROBE_STATE_USER_MODE set.
Mark Wielaard [Mon, 19 Sep 2011 15:27:44 +0000 (17:27 +0200)]
uaddr(): Use CONTEXT->uregs directly when _STP_PROBE_STATE_USER_MODE set.

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Dave Brolley [Mon, 19 Sep 2011 15:14:32 +0000 (11:14 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

13 years agoRemove arch specific _stp_probing_32bit_app() and _stp_get_regparm().
Mark Wielaard [Mon, 19 Sep 2011 13:42:19 +0000 (15:42 +0200)]
Remove arch specific _stp_probing_32bit_app() and _stp_get_regparm().

Both functions were doing more than necessary and didn't actually need
access to the current regs. _STP_PROBE_STATE_USER_MODE tells us whether
the current probe triggered in user mode. _stp_is_compat_task() tells
us whether the current task is a 32-on-64 process.

* runtime/compatdefs.h (_stp_is_compat_task): Defined also when CONFIG_COMPAT
  is undefined (to always return false).
* runtime/loc2c-runtime.h: u_fetch_register() and u_store_register() are
  only called from user space dwarf context. Only needs _stp_is_compat_task()
  test.
* runtime/regs.c: Remove arch specific _stp_probing_32bit_app() and
  _stp_get_regparm() functions.
* tapset/i386/registers.stp (_stp_arg): Check regparm directly.
* tapset/powerpc/registers.stp (probing_32bit_app): Use _stp_is_compat_task()
  test.
* tapset/s390/registers.stp (probing_32bit_app): Likewise.
* tapset/x86_64/registers.stp (_stp_arg): Check regparm directly.
  (probing_32bit_app): Use _stp_is_compat_task() test.
  (regparm): Likewise.

13 years agoPR12136: Test a @cast to type sdt::string
Josh Stone [Fri, 16 Sep 2011 23:45:15 +0000 (16:45 -0700)]
PR12136: Test a @cast to type sdt::string

This test would previously fail to find std::string, as that type is not
at the top level of the CU in the debuginfo, but rather nested under the
DIE for the std namespace.  It should now be found.

Note however that this test is currently failing for me due to an
apparently bad argument calculation.  The @cast in the SDT probe looks
good, but from the function probe it's getting a bad pointer for $str.
It's OK on F15 i686, but not on F15 x86_64.  I think this issue is
distinct from what I'm fixing, but it need further investigation...

13 years agoFill in @cast default module from SDT
Josh Stone [Fri, 16 Sep 2011 22:59:45 +0000 (15:59 -0700)]
Fill in @cast default module from SDT

If a @cast in SDT context does not have a specified source for type
info, then we should infer it as the SDT's module, as we do for normal
DWARF-based probes.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_cast_op): If the
  @cast module isn't already set, use the SDT module.
  (sdt_kprobe_var_expanding_visitor::visit_cast_op): Ditto.

13 years agoPR12136: Load nested types for C++ CUs
Josh Stone [Wed, 24 Aug 2011 23:21:38 +0000 (16:21 -0700)]
PR12136: Load nested types for C++ CUs

For C++ compile units only, check for nested type definitions within
namespaces, structures, and classes.  This allows @cast to have access
to types like "std::string".

* dwflpp.cxx (dwflpp::global_alias_caching_callback): Take a flag
  has_inner_types to indicate that we should recurse, and a prefix to
  specify what we've already recursed into.
  (dwflpp::iterate_over_globals): Check whether we're in C++, then do
  the real work in the new iterate_over_types.
  (dwflpp::iterate_over_types): Do the work that iterate_over_globals
  used to handle, without assuming that we're starting in a top CU.

13 years agoImprove scope splitting in function specs
Josh Stone [Tue, 23 Aug 2011 23:59:16 +0000 (16:59 -0700)]
Improve scope splitting in function specs

We now take care to only split "::" separators that are outside of any
template specification.  So "std::foo<std::bar>" becomes only two
components, "std" and "foo<std::bar>".

* util.cxx (tokenize_cxx): Split on "::" only outside of templates.
* tapsets.cxx (dwarf_query::parse_function_spec): Use tokenize_cxx.

13 years agoPR13193 wallpaper
Frank Ch. Eigler [Fri, 16 Sep 2011 21:34:14 +0000 (17:34 -0400)]
PR13193 wallpaper

The reported stuck process bug (whether it's in the kernel or
in stap), is apparently triggered by concurrent modprobes.  Change
the testsuite to avoid this practice, to wallpaper over the problem
temporarily.

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Dave Brolley [Fri, 16 Sep 2011 20:20:23 +0000 (16:20 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

Conflicts:
NEWS

13 years agoPR 11441 - continue with unprivileged test suite
Dave Brolley [Fri, 16 Sep 2011 20:18:09 +0000 (16:18 -0400)]
PR 11441 - continue with unprivileged test suite

Deprecate probe types discovered during testing to have no reasonable
meaning:

      kernel.function(number).inline
      module(string).function(number).inline
      process.function(number).inline
      process.library(string).function(number).inline
      process(string).function(number).inline
      process(string).library(string).function(number).inline

13 years agoAdd process.plt to probe plt entries.
Stan Cox [Fri, 16 Sep 2011 15:31:39 +0000 (11:31 -0400)]
Add process.plt to probe plt entries.

* dwflpp.cxx (iterate_over_plt):  New to callback through plt entries.
* dwflpp.h: Likewise.
* tapsets.cxx (TOK_PLT): New.
(base_query::query_plt_callback, query_plt):  New methods.
(base_query):  New members has_plt, has_statement, plt_val.
(base_query::base_query):  Set new members.
(dwarf_query::query_module_symtab):  Use raw address for plt entries.
(dwarf_query::add_probe_point): Don't reloc the plt entry address.
(query_module):  Call iterate_over_plt.
(plt_expanding_visitor):  New to expand $$name.
(dwarf_derived_probe::register_patterns):  Add new probe tags.

13 years agoSplit kregs and uregs in probe context.
Mark Wielaard [Fri, 16 Sep 2011 12:33:06 +0000 (14:33 +0200)]
Split kregs and uregs in probe context.

Keep track of kernel registers and user registers for a probe context
separately in anticipation of k/uregs "recovery". This patch simply
replaces the regs field of common_probe_context.h with a kregs and uregs
field, plus changes all over to use one or the other to store or fetch
the appropriate registers.

13 years agoPR13156 cont'd: Removed String Truncating Code
Chris Meek [Thu, 15 Sep 2011 18:55:13 +0000 (14:55 -0400)]
PR13156 cont'd: Removed String Truncating Code

No longer truncates anything. Just prints everything as-is in
the hash log.

13 years agoPR13101 Networking tapsets should have structured comments
William Cohen [Thu, 15 Sep 2011 18:25:36 +0000 (14:25 -0400)]
PR13101 Networking tapsets should have structured comments

Fix up the language for the default filter functions for ipmib, linuxmib,
and tcpmib. Also make the functions return sane values regardless of
the value of the op parameter.

13 years agoPR6503 NEWS blurb
Frank Ch. Eigler [Thu, 15 Sep 2011 01:02:47 +0000 (21:02 -0400)]
PR6503 NEWS blurb

13 years agoPR6503 test cases
Frank Ch. Eigler [Thu, 15 Sep 2011 01:00:26 +0000 (21:00 -0400)]
PR6503 test cases

13 years agoPR6503: verify build-ids of dynamically arriving modules
Frank Ch. Eigler [Wed, 14 Sep 2011 22:49:51 +0000 (18:49 -0400)]
PR6503: verify build-ids of dynamically arriving modules

With the horrible module_sect_attr* hack, the .note.gnu.build-id data
may now be verified.

* runtime/sym.c (_stp_kmodule_check): New function.
* runtime/transport/symbols.c (_stp_module_notifier): Upon MODULE_STATE_COMING,
  verify build-ids.  Reject the module from further consideration upon a
  mismatch.

13 years agoPR6503: get at dynamic module section addresses via horrible hack (tm)
Frank Ch. Eigler [Wed, 14 Sep 2011 21:52:44 +0000 (17:52 -0400)]
PR6503: get at dynamic module section addresses via horrible hack (tm)

Since <linux/module.h> does not declare structs module_sect_attr[s],
let's declare it ourselves.  We need to get at these, because
otherwise there is no way to get at the build-id section address.

* runtime/autoconf-module-sect-attrs.c: New (partial) autoconf file.
* buildrun.cxx (compile_pass): Build it.
* runtime/transport/symbols.c (_stp_module_notifier): Use our own
  modern (2.6.19+) declaration of these structs to pass all section
  names/addresses to _stp_kmodule_update_address.

13 years agoPR6503: note special build-id relocation with -DDEBUG_SYMBOLS
Frank Ch. Eigler [Wed, 14 Sep 2011 21:51:27 +0000 (17:51 -0400)]
PR6503: note special build-id relocation with -DDEBUG_SYMBOLS

* runtime/sym.c (_stp_kmodule_update_address): Specially
  note .note.gnu.build-id pseudo-section being relocated.

13 years agoCorrect avahi package for building is avahi-devel, not avahi-client.
Dave Brolley [Wed, 14 Sep 2011 21:20:49 +0000 (17:20 -0400)]
Correct avahi package for building is avahi-devel, not avahi-client.

13 years agoSystemtap compile-server and client do not require avahi.
Dave Brolley [Wed, 14 Sep 2011 20:21:01 +0000 (16:21 -0400)]
Systemtap compile-server and client do not require avahi.

Avahi is required for automatic detection and selection of compile-servers
but the client can still contact servers directly without avahi.

avahi-tools and avahi-devel are not required.

Updated stap-start-server, testsuite/lib/systemtap.exp and systemtap.spec
to reflect this. The specfile stills list avahi-client as a build
requirement for both the systemtap and systemtap-server packages.

13 years agoPR 11441 - continue with unprivileged test suite
Dave Brolley [Wed, 14 Sep 2011 18:45:21 +0000 (14:45 -0400)]
PR 11441 - continue with unprivileged test suite

New test suite, unprivileged_myproc tests that process probes only
fire within the user's own process for unprivileged users.

Rename unprivileged_all.exp to unprivileged_probes.exp.

13 years agoPR13156: More verbose hash log output
Chris Meek [Wed, 14 Sep 2011 17:30:52 +0000 (13:30 -0400)]
PR13156: More verbose hash log output

Added descriptions for each item added to the script's hash in
the hash's log. Also, now it limits the length of each string
printed to the last 80 characters (except paths), to make it
more readable.

13 years agoBZ738242: tweak memory allocation estimation logic
Frank Ch. Eigler [Wed, 14 Sep 2011 15:46:55 +0000 (11:46 -0400)]
BZ738242: tweak memory allocation estimation logic

* runtime/transport/relay_v2.c (_stp_transport_data_fs_init):
  In BULK_MODE, stop overestimating the number of pages we will
  need: it's num_online_cpus rather than num_possible_cpus.

13 years agoRevert previous change to stap-start-server.
Dave Brolley [Wed, 14 Sep 2011 15:24:03 +0000 (11:24 -0400)]
Revert previous change to stap-start-server.

Failure to advertise the server via avahi is fatal again.

13 years agobuildid.exp: Now no longer fails on RHEL5
Chris Meek [Tue, 13 Sep 2011 18:48:06 +0000 (14:48 -0400)]
buildid.exp: Now no longer fails on RHEL5

Since systems earlier than RHEL 6 don't have build IDs,
this test used to fail on those systems. Now it just
is untested.

13 years agosystemtap.spec: Added elfutils to the testsuite requires
Chris Meek [Tue, 13 Sep 2011 18:05:27 +0000 (14:05 -0400)]
systemtap.spec: Added elfutils to the testsuite requires

This is needed for the hash_add_buildid.exp test.

13 years agoPR12221: Added Test Cases
Chris Meek [Tue, 13 Sep 2011 17:48:50 +0000 (13:48 -0400)]
PR12221: Added Test Cases

Test:
  1. Compiles a simple binary
  2. Sets timestamp to a known value
  3. Compiles a stap module probing this binary
  4. Compiles a similar binary, same size, name, path etc
     but different contents
  5. Sets the timestamp to the same as the previous one
  6. Compiles another stap module probing this new binary.

Results:
  Before the build ID was added to the hash, this sequence
  would cause stap to fetch the module from the cache, but
  now, it will compile a new one, since the build IDs are
  different.

13 years agoRHBZ 737095: Unable to start a systemtap server
Dave Brolley [Tue, 13 Sep 2011 15:07:11 +0000 (11:07 -0400)]
RHBZ 737095: Unable to start a systemtap server

- Don't use getlogin to obtain user name because it can fail.
- Establish server log before issuing any messages.
- Failure of avahi to advertise is now only a warning. Avahi is not
  always available and the server can still be used directly.

13 years agoDon't expose local path names in test names.
Dave Brolley [Tue, 13 Sep 2011 15:05:47 +0000 (11:05 -0400)]
Don't expose local path names in test names.

13 years agoFixed BZ639344 on s390x by adding '/lib/ld64.so.1' as a supported interpreter.
David Smith [Tue, 13 Sep 2011 13:59:52 +0000 (08:59 -0500)]
Fixed BZ639344 on s390x by adding '/lib/ld64.so.1' as a supported interpreter.

* dwflpp.cxx (iterate_over_libraries): Added '/lib/ld64.so.1' so that
  RHEL6 s390x systems behave correctly.

13 years agotestsuite: sanitize paths from usymbols.exp
Frank Ch. Eigler [Mon, 12 Sep 2011 21:51:59 +0000 (17:51 -0400)]
testsuite: sanitize paths from usymbols.exp

In the compile-failing case, one could see directory names.

13 years agotestsuite: cleanup buildid.exp test item messages
Frank Ch. Eigler [Mon, 12 Sep 2011 21:48:50 +0000 (17:48 -0400)]
testsuite: cleanup buildid.exp test item messages

Eliminate a few duplicate names, and remove a [pwd] path from the
pass/fail strings.

13 years agotestsuite: excise build-tree directory names from library.exp results
Frank Ch. Eigler [Mon, 12 Sep 2011 21:39:48 +0000 (17:39 -0400)]
testsuite: excise build-tree directory names from library.exp results

13 years agoPR13072: fix for translator, add for runtime
Frank Ch. Eigler [Mon, 12 Sep 2011 15:25:50 +0000 (11:25 -0400)]
PR13072: fix for translator, add for runtime

* configure.ac, runtime/staprun/configure.ac: Disable enable_sdt_probes
  for gcc < 4.0.

13 years agoPR6503: enable module-init probing for 2.6.29+
Frank Ch. Eigler [Sun, 11 Sep 2011 00:18:00 +0000 (20:18 -0400)]
PR6503: enable module-init probing for 2.6.29+

Identified a few key kernel commits that are prerequisites for
this facility; it turns out 2.6.29 is good enough.

13 years agoPR6503: actually allow module init/exit probes
Frank Ch. Eigler [Fri, 9 Sep 2011 21:29:12 +0000 (17:29 -0400)]
PR6503: actually allow module init/exit probes

* dwflpp.cxx (dwflpp::blacklisted_p): Skip blacklist_section
  processing for modules, since we can (sometimes) probe their
  .init / .exit sections now.
* runtime/staprun/staprun.c (send_relocation_modules): Hey, we
  only said "sometimes".  Preexisting modules lie in /sys/module/...
  about having their init stuff still in memory.  Skip those.

13 years agoi18n: correct use of %# PRIx64 formatting
Frank Ch. Eigler [Fri, 9 Sep 2011 21:27:44 +0000 (17:27 -0400)]
i18n: correct use of %# PRIx64 formatting

During the i18n conversion, we ended up with several instances of 0x%#
PRIx64 formatting directives, which duplicates the 0x.  This patch
zaps those throughout.

13 years agoPR6503: tweak blacklisting logic
Frank Ch. Eigler [Fri, 9 Sep 2011 19:05:28 +0000 (15:05 -0400)]
PR6503: tweak blacklisting logic

Previously, guru mode override for the blacklist only applied to the
file/function blacklist.  With this rework, all blacklists may be
bypassed in guru mode.

13 years agoRevert "Remove CONFIG_UTRACE check in pass 2 (dwarfbuilder)."
Mark Wielaard [Fri, 9 Sep 2011 21:28:00 +0000 (23:28 +0200)]
Revert "Remove CONFIG_UTRACE check in pass 2 (dwarfbuilder)."

This reverts commit 2fd2c46ca19c8d995d2376ab8ca1d3e62fb6f43e.
<jistone> tsk tsk, mjw is making a liar out of pass-2 / -l
The issue is that pass-2 does not just list the probes,
but also selects which optional probes might trigger.

Added a comment to mention the above.

13 years agoPR6503: enable module arrival/departure response for kernel/module.* probes
Frank Ch. Eigler [Fri, 9 Sep 2011 14:24:54 +0000 (10:24 -0400)]
PR6503: enable module arrival/departure response for kernel/module.* probes

* tapsets.cxx (dwarf_derived_probe_group::emit_module_refresh): Create real
  implementation.  Register kprobes on new module; unregister on old module.

13 years agoPR6503: call systemtap_module_refresh() upon module arrival/departure
Frank Ch. Eigler [Fri, 9 Sep 2011 14:24:37 +0000 (10:24 -0400)]
PR6503: call systemtap_module_refresh() upon module arrival/departure

13 years agoPR6503: when clearing departing module section relocations, clear them all
Frank Ch. Eigler [Fri, 9 Sep 2011 13:50:10 +0000 (09:50 -0400)]
PR6503: when clearing departing module section relocations, clear them all

* runtime/sym.c (_stp_kmodule_update_address): For the reloc=NULL
  case, don't stop iterating after the first departing section.

13 years agoRegen script index for process/syscalltimes.
Mark Wielaard [Fri, 9 Sep 2011 11:55:27 +0000 (13:55 +0200)]
Regen script index for process/syscalltimes.

13 years agoFix systemtap.examples/process/syscalltimes script and add test.
Mark Wielaard [Fri, 9 Sep 2011 11:46:45 +0000 (13:46 +0200)]
Fix systemtap.examples/process/syscalltimes script and add test.

stap was a little too smart for the script, optimizing out unused
variables and producing WARNINGS/ERRORS for deleted variables.
Make all variable manipulation conditional on their actual usage,
add -w to surpress warnings, add a new option -c 'process' to run
during script invocation and add a meta testcase for the testsuite.

13 years agoRemove CONFIG_UTRACE check in pass 2 (dwarfbuilder).
Mark Wielaard [Fri, 9 Sep 2011 07:05:09 +0000 (09:05 +0200)]
Remove CONFIG_UTRACE check in pass 2 (dwarfbuilder).

pass 4 (buildrun) already checks for CONFIG_UTRACE, so remove it from
pass 2 (dwarfbuilder) so scripts containing process() probes can at least
be semantically checked and inspected with stap -l on arches that don't
have utrace yet.

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Mark Wielaard [Thu, 8 Sep 2011 15:34:29 +0000 (17:34 +0200)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

13 years agoRemove kfail from backtrace.exp. Fixed by commit 207d2d.
Mark Wielaard [Thu, 8 Sep 2011 15:30:59 +0000 (17:30 +0200)]
Remove kfail from backtrace.exp. Fixed by commit 207d2d.

13 years agoUse "unsigned long" in place of "uintptr_t" to compile on older kernels
William Cohen [Thu, 8 Sep 2011 15:23:00 +0000 (11:23 -0400)]
Use "unsigned long" in place of "uintptr_t" to compile on older kernels

13 years agoRemove commented out and outdated (confusing embedded C) example from SBG.
Mark Wielaard [Thu, 8 Sep 2011 15:22:25 +0000 (17:22 +0200)]
Remove commented out and outdated (confusing embedded C) example from SBG.

Just remove so there are no false positives while looking for dangerous
embedded C snippets. The actual example just includes the thread-times.stp
file which is fine.

13 years agoDon't try to be smart detecting perf event was in user mode.
Mark Wielaard [Thu, 8 Sep 2011 15:14:32 +0000 (17:14 +0200)]
Don't try to be smart detecting perf event was in user mode.

Just use user_mode(regs) always.
Add test to check we always detect some user_mode activity.

13 years agos390 also has ambiguous asm opcode.
Stan Cox [Thu, 8 Sep 2011 15:14:39 +0000 (11:14 -0400)]
s390 also has ambiguous asm opcode.

* sdt.exp: Add s390 to the ambiguous asm opcode list.

13 years agoPR12221: Added the build ids to the script's hash
Chris Meek [Thu, 8 Sep 2011 12:09:51 +0000 (08:09 -0400)]
PR12221: Added the build ids to the script's  hash

hash.cxx
  Added the build IDs from the session variables's build_ids
  vector to the script's hash.

session.h
  Added the build_ids vector to the session.

setupdwfl.cxx
  Extracted the build IDs in setup_dwfl_kernel and
  setup_dwfl_user and added them to the build_ids vector.
  Also, rearranged the code for downloading the debuginfo
  to facilitate this patch.

13 years agoRename CONTEXT regflags to probe_flags. Now simply indicates user mode.
Mark Wielaard [Thu, 8 Sep 2011 11:57:21 +0000 (13:57 +0200)]
Rename CONTEXT regflags to probe_flags. Now simply indicates user mode.

Renamed common_probe_context.h regflags to probe_flags, rename constant
from _STP_REGS_USER_FLAG to _STP_PROBE_STATE_USER_MODE and use throughout
tapsets to check whether in user_mode() or not.

13 years agoAllow xfails for sdt.exp.
Stan Cox [Wed, 7 Sep 2011 21:57:51 +0000 (17:57 -0400)]
Allow xfails for sdt.exp.

* sdt.exp (sdt_stap_run): New.  Like stap_run3 but adds FAIL.
Use it for known xfails.

13 years agoRemove unused runtime/counter.c file.
Mark Wielaard [Wed, 7 Sep 2011 14:01:31 +0000 (16:01 +0200)]
Remove unused runtime/counter.c file.

13 years agochange probe wildcard matching criterion in sdt_misc.exp
Han Pingtian [Wed, 17 Aug 2011 09:23:58 +0000 (17:23 +0800)]
change probe wildcard matching criterion in sdt_misc.exp

On i386 and x86_64 system, sdt_misc.exp fails with those messages:

i386:
FAIL: sdt_misc wildcard (40) V1_uprobe
FAIL: sdt_misc wildcard (40) V2_kprobe
FAIL: sdt_misc wildcard (40) V2_uprobe
FAIL: sdt_misc wildcard (40) V3_uprobe

x86_64:
FAIL: sdt_misc wildcard (48) V1_uprobe
FAIL: sdt_misc wildcard (48) V2_kprobe
FAIL: sdt_misc wildcard (48) V2_uprobe
FAIL: sdt_misc wildcard (48) V3_uprobe

I believe this because three variables, arr_struct, primary_colors_var, incomplete_struct_type, has been changed to conditional defined in systemtap.base/sdt_types.c:

 92 # if !defined(__cplusplus) || \
 93         ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && __GXX_EXPERIMENTAL_CXX0X__)
 94   struct {
 95     int int_var;
 96   } arr_struct [2] = {{1},{2}};
 97
 98   enum  {
 99     red = 0,
100     green = 1,
101     blue = 2
102   } primary_colors_var = green;
103
104   struct opaque_struct *incomplete_struct_type = 0;
105 # endi

The criterion should be changed.

Signed-off-by: Han Pingtian <phan@redhat.com>
13 years agoPR11441 - unprivileged mode test suite enhancements.
Dave Brolley [Tue, 6 Sep 2011 19:48:29 +0000 (15:48 -0400)]
PR11441 - unprivileged mode test suite enhancements.

- Created a script which identifies all embedded C code in our tapset
  sources.
- Tests to ensure that calls to each function containing embedded C are
  accepted/rejected for unprivileged users, as appropriate.

13 years agoruntime/staprun/configure.ac: AC_CHECK_LIB before adding -lelf.
Turgis, Frederic [Tue, 6 Sep 2011 17:38:08 +0000 (19:38 +0200)]
runtime/staprun/configure.ac: AC_CHECK_LIB before adding -lelf.

13 years agoUpdate known and expected failures in unprivileged_all.exp
Dave Brolley [Tue, 6 Sep 2011 16:07:30 +0000 (12:07 -0400)]
Update known and expected failures in unprivileged_all.exp

13 years agoRemove unused STP_WORK_TIMER define.
David Smith [Tue, 6 Sep 2011 15:35:01 +0000 (10:35 -0500)]
Remove unused STP_WORK_TIMER define.

* runtime/transport/transport.h: Remove unused STP_WORK_TIMER.

13 years agoAllow STP_WORK_TIMER to be changed on the stap command line.
David Smith [Tue, 6 Sep 2011 14:33:17 +0000 (09:33 -0500)]
Allow STP_WORK_TIMER to be changed on the stap command line.

* runtime/transport/transport.h: Allow user to override STP_WORK_TIMER
  from the command line using '-DSTP_WORK_TIMER=value'.

13 years agoPR13112 Add include/asm/io_64.h blacklist.
Mark Wielaard [Mon, 5 Sep 2011 21:57:44 +0000 (23:57 +0200)]
PR13112 Add include/asm/io_64.h blacklist.

Also simplify blfile include list (starting .* pattern needed for all
asm/include files means we can collapse some).

13 years agoPR13108 blacklist probing paravirt ops from paravirt.c or paravirt.h.
Mark Wielaard [Mon, 5 Sep 2011 21:44:53 +0000 (23:44 +0200)]
PR13108 blacklist probing paravirt ops from paravirt.c or paravirt.h.

13 years agoPR13112 (and PR13108) blacklist probing function from include/asm .h files.
Mark Wielaard [Mon, 5 Sep 2011 21:37:11 +0000 (23:37 +0200)]
PR13112 (and PR13108) blacklist probing function from include/asm .h files.

dwflpp.cxx (build_blacklist): all include/asm .h blfile patterns might
need "full path" so prefix those with '.*'
Add new XFAIL semok.exp inb_blacklisted.stp testcase.

13 years agonon-guru printk test fail during semantic (p2) time, not build (p4) time.
Mark Wielaard [Mon, 5 Sep 2011 08:14:34 +0000 (10:14 +0200)]
non-guru printk test fail during semantic (p2) time, not build (p4) time.

guru functions are checked during pass 2 (semantic analysis) time.

13 years agoPR6503: introduce systemtap_module_refresh() entry point
Frank Ch. Eigler [Fri, 2 Sep 2011 21:22:51 +0000 (17:22 -0400)]
PR6503: introduce systemtap_module_refresh() entry point

This new function in the generated code is to get all active probe
point families to reevaluate applicability, to retry inserting probes
that may have failed during systemtap_module_init (e.g., due to
modules being offline), or disarm/remove probes that are no longer
applicable (e.g. due to modules having gone offline).  The default
implementation is empty.

* elaborate.h (derived_probe_group::emit_module_refresh): Define
  empty default.
* translate.cxx (c_unparser::emit_module_refresh): Call the
  per-probe-group functions.
  (translate_pass): Call emit_module_refresh().

13 years agoPR13101 - Networking tapsets should have structured comments
William Cohen [Fri, 2 Sep 2011 03:14:21 +0000 (23:14 -0400)]
PR13101 - Networking tapsets should have structured comments

Make the descriptions of the default filter functions clear.

13 years agoPR13101 Networking tapsets should have structured comments
William Cohen [Thu, 1 Sep 2011 21:33:18 +0000 (17:33 -0400)]
PR13101 Networking tapsets should have structured comments

Fix up formatting issues in documentation comments.

13 years agoPR13101 Networking tapsets should have structured comments
William Cohen [Thu, 1 Sep 2011 21:29:09 +0000 (17:29 -0400)]
PR13101 Networking tapsets should have structured comments

Fix up formatting issues in documentation comments.

13 years agoPR6503: make module notifier update kmodule section addresses, GRSECURITY version
Frank Ch. Eigler [Thu, 1 Sep 2011 20:49:46 +0000 (16:49 -0400)]
PR6503: make module notifier update kmodule section addresses, GRSECURITY version

Some struct module fields are renamed under STAPCONF_GRSECURITY.

13 years agoPR6503: make module notifier update kmodule section addresses
Frank Ch. Eigler [Thu, 1 Sep 2011 20:43:55 +0000 (16:43 -0400)]
PR6503: make module notifier update kmodule section addresses

* runtime/sym.c (_stp_kmodule_update_address): Tolerate null reloc
  (section name) parameter, treat as "all".

* runtime/transport/symbols.c (_stp_module_notifier): A hack worthy of
  Alan Smithee himself, supply a disappointing subset of
  module-section-address data tuples as modules come and go.

13 years agotestsuite: remove process.*.return.maxactive(NNN) variants
Frank Ch. Eigler [Wed, 31 Aug 2011 21:12:09 +0000 (17:12 -0400)]
testsuite: remove process.*.return.maxactive(NNN) variants

13 years agoPR6503: add module notifier
Frank Ch. Eigler [Wed, 31 Aug 2011 17:42:17 +0000 (13:42 -0400)]
PR6503: add module notifier

* runtime/transport/symbols.c (_stp_module_notifier): New function.
  Do nothing.
* runtime/transport/transport.c (_stp_handle_start): Register it.
  (_stp_cleanup_and_exit): Unregister it.

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