]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoCompile Server Client merge into stap: Use errno to diagnose stream problems if it...
Dave Brolley [Tue, 22 Jun 2010 18:01:59 +0000 (14:01 -0400)]
Compile Server Client merge into stap: Use errno to diagnose stream problems if it is set during the operation.

14 years agoReword compile server client merge into stap based on feedback received:
Dave Brolley [Mon, 14 Jun 2010 19:19:43 +0000 (15:19 -0400)]
Reword compile server client merge into stap based on feedback received:

- Move server related utility methods out of systemtap_session
- Move other utility methods back out of systemtap_session and back
  into the top level of main.cxx
- Move pending_interrupts out of systemtap_session and back to top level.
- Initialize systemtap_session in the constructor
- Move server argument collection out of main options switch.

14 years agoMerged compile server client: Cleanup error handling.
Dave Brolley [Tue, 8 Jun 2010 18:57:50 +0000 (14:57 -0400)]
Merged compile server client: Cleanup error handling.

14 years agoMerged compile server client: Basic implementation.
Dave Brolley [Tue, 1 Jun 2010 18:51:53 +0000 (14:51 -0400)]
Merged compile server client: Basic implementation.

o client automatically detects compatible online servers
o request package created, zipped and sent to the server
o response unzipped and processed
o staprun called, if requsted
o command line options filtered and passed to the server in the request package
o --unprivileged is handled

14 years agoMore compile server client merge infrastructure:
Dave Brolley [Fri, 21 May 2010 19:52:32 +0000 (15:52 -0400)]
More compile server client merge infrastructure:

- Make phase management functions methods of systemtap_session
- Make phase management globals static members of systemtap_session
- Create skeletal compile_server_client class

14 years agoBegin compile server client merge into stap:
Dave Brolley [Fri, 21 May 2010 18:09:26 +0000 (14:09 -0400)]
Begin compile server client merge into stap:

- Detect presence of avahi-client library and headers during configuration
- Use avahi-client API to detect online servers
- Implement --server-status=online,compatible

14 years agoPR10599 Always print modname when available (and requested).
Mark Wielaard [Tue, 29 Jun 2010 14:16:02 +0000 (16:16 +0200)]
PR10599 Always print modname when available (and requested).

* runtime/sym.c (_stp_umod_lookup): Also return vm_end if available.
  (_stp_kallsyms_lookup): Don't try to handle 32bit-on-64bit signedness,
  _stp_umod_lookup already does. If available return modname, size and
  offset.
  (_stp_print_addr): Always print modname when available (and requested).
  (_stp_symbol_snprint): Likewise.
* runtime/unwind.c (unwind): Adjust _stp_umod_lookup call.
* tapset/ucontext.stp (umodname): Likewise.

14 years agoConsolidate _stp_print_symbol and _stp_func_print into _stp_print_addr.
Mark Wielaard [Tue, 29 Jun 2010 12:23:35 +0000 (14:23 +0200)]
Consolidate _stp_print_symbol and _stp_func_print into _stp_print_addr.

Finally one address symbol function to print them all.

* runtime/sym.c (_stp_print_symbol): Removed.
  (_stp_func_print): Renamed to ...
  (_stp_print_addr): ... this.
* runtime/stack-arm.c (__stp_stack_print): Use _stp_print_addr.
* runtime/stack-i386.c (_stp_stack_print_fallback): Likewise.
  (__stp_stack_print): Likewise.
* runtime/stack-ia64.c (dump_para): Add verbose flag.
  (__stp_show_stack_sym): Use _stp_print_addr with verbose flag.
  (__stp_show_stack_addr): Removed.
  (__stp_stack_print): Set verbose flag and just call __stp_show_stack_sym
  through unw_init_running.
* runtime/stack-ppc.c (__stp_stack_print): Use _stp_print_addr.
* runtime/stack-s390.c (__stp_show_stack): Likewise.
* runtime/stack-x86_64.c (_stp_stack_print_fallback): Likewise.
  (__stp_stack_print): Likewise.
* runtime/stack.c (print_stack_address): Likewise.
  (_stp_stack_print): Likewise.
  (_stp_stack_print_tsk): Likewise and use verbose flag.
* tapset/context-symbols.stp (print_stack): Use _stp_print_addr.
* tapset/ucontext-symbols.stp (print_ustack): Likewise.

14 years agoMerge _stp_vma_module_name functionality into _stp_umod_lookup.
Mark Wielaard [Tue, 29 Jun 2010 10:02:48 +0000 (12:02 +0200)]
Merge _stp_vma_module_name functionality into _stp_umod_lookup.

This also includes the fix for 32bit signed values in 64bit longs issue
which was missing from _stp_umod_lookup. Better to have the lookup and
fix/workaround all in one place.

* runtime/vma.c (_stp_vma_module_name): Removed.
* runtime/sym.c (_stp_umod_lookup): Include module name lookup.
  (_stp_kallsyms_lookup): Get name directly when available throug umodule.
* runtime/unwind.c (unwind): Adjust _stp_umod_lookup call.
* tapset/ucontext.stp (umodname): Use _stp_umod_lookup.

14 years agoMatch user space modules on actual path and set name to basename.
Mark Wielaard [Mon, 28 Jun 2010 20:21:23 +0000 (22:21 +0200)]
Match user space modules on actual path and set name to basename.

Matching on actual canonical path is more accurate. Having basename is
better for module in backtraces.

* translate.cxx (dump_unwindsyms): Grab basename from canonical path for
  user space modules.
* dwflpp.cxx (dwflpp::emit_address): Call _stp_umodule_relocate with
  canonical path.
* runtime/sym.c (_stp_umodule_relocate): Match on path, not name.

14 years agoFixed PR11762 by making the systemtap.base/flightrec*.exp tests more robust.
David Smith [Mon, 28 Jun 2010 19:30:33 +0000 (14:30 -0500)]
Fixed PR11762 by making the systemtap.base/flightrec*.exp tests more robust.

* testsuite/systemtap.base/flightrec1.exp: Make sure old test results are
  removed when starting.  Be sure to close spawned processes properly.
  When sending stapio a signal, sleep 2 seconds to let everything settle
  out.
* testsuite/systemtap.base/flightrec2.exp: Ditto.
* testsuite/systemtap.base/flightrec3.exp: Ditto.
* testsuite/systemtap.base/flightrec4.exp: Ditto.
* testsuite/systemtap.base/flightrec5.exp: Ditto.

14 years agoFold space/newline/brief/inexact logic into _stp_func_print flags.
Mark Wielaard [Mon, 28 Jun 2010 14:14:29 +0000 (16:14 +0200)]
Fold space/newline/brief/inexact logic into _stp_func_print flags.

Trying to get all the logic of how symbols/addresses in backtraces are
printed into one place. So that passing through the flags tell the whole
story, instead of decissions being spread out all over the place. This
does mean one hairy _stp_print_func() function unfortunately. But at least
there is now one place to tweak when adding stack/symbol output changes.

* runtime/runtime.h: Remove SYM_VERBOSE_NO, _FULL, _BRIEF.
* runtime/sym.h: Add _STP_SYM_ flags.
* runtime/sym.c (_stp_func_print): Base output on individual _STP_SYM_ flags.
* runtime/stack.c (print_stack_address): Use _STP_SYM_INEXACT.
  (_stp_stack_print): Check and use _STP_SYM_ flags.
* runtime/stack-i386.c (_stp_stack_print_fallback): Use _STP_SYM_INEXACT.
* runtime/stack-x86_64.c (_stp_stack_print_fallback): Likewise.
* tapset/context-unwind.stp (print_backtrace): Pass _STP_SYM_FULL.
* tapset/ucontext-unwind.stp (print_ubacktrace): Likewise.
  (print_ubacktrace_brief): Pass _STP_SYM_BRIEF.

14 years agoMerge branch 'usym'
Mark Wielaard [Mon, 28 Jun 2010 09:20:00 +0000 (11:20 +0200)]
Merge branch 'usym'

14 years agoPR11759: more DEFINE_*LOCK -> DEFINE_RAW_*lock for CONFIG_PREEMPT_RT
Frank Ch. Eigler [Mon, 28 Jun 2010 00:53:37 +0000 (20:53 -0400)]
PR11759: more DEFINE_*LOCK -> DEFINE_RAW_*lock for CONFIG_PREEMPT_RT

14 years agoDon't resolve symbols unnecessarily and don't suppress things from backtrace.
Mark Wielaard [Sun, 27 Jun 2010 19:30:53 +0000 (21:30 +0200)]
Don't resolve symbols unnecessarily and don't suppress things from backtrace.

We were always doing symbol lookups of addresses in a backtrace, even when
the user only wanted the addresses. If we couldn't find an symbol associated
with an address in the backtrace we just tried again and reported the next
address/symbol we could find. It really is better to always report all
addresses we think are part of a backtrace. It is more efficient, and more
truthful.

* runtime/sym.c (_stp_func_print): Don't report whether name lookup
  succeeded. Only lookup symbol names when requested.
* runtime/stack-x86_64.c (_stp_stack_print_fallback): Report all addresses
  found.
* runtime/stack-i386.c (_stp_stack_print_fallback): Likewise.
  (__stp_stack_print): Mark frame based addresses as inexact.

14 years agoUse -w --ldd in exelib.exp tests. Allow "startup" functions to leak through.
Mark Wielaard [Sun, 27 Jun 2010 20:50:37 +0000 (22:50 +0200)]
Use -w --ldd in exelib.exp tests. Allow "startup" functions to leak through.

* testsuite/systemtap.exelib/libmarkunamestack.tcl: Spawn stap with -w --ldd.
  Allow startup functions (like _start and _main) in backtrace.
* testsuite/systemtap.exelib/ustack.tcl: Likewise.

14 years agoRemove unused argument namebuf for _stp_kallsym_lookup.
Mark Wielaard [Sun, 27 Jun 2010 15:36:58 +0000 (17:36 +0200)]
Remove unused argument namebuf for _stp_kallsym_lookup.

* runtime/sym.c (_stp_kallsyms_lookup): Remove char *namebuf argument.
  (_stp_print_symbol): Don't call _stp_kallsyms_lookup with NULL namebuf.
  (_stp_func_print): Likewise.
  (_stp_symbol_snprint): Likewise.

14 years agoDon't panic on utrace_barrier failures because process already ended.
Mark Wielaard [Sun, 27 Jun 2010 12:22:55 +0000 (14:22 +0200)]
Don't panic on utrace_barrier failures because process already ended.

* runtime/task_finder.c (stap_utrace_detach): When utrace_barrier returns
  -ESRCH or -EALREADY treat it as success.

14 years agoSplit _stp_module_relocate into kernel and user space lookup functions.
Mark Wielaard [Sun, 27 Jun 2010 12:18:33 +0000 (14:18 +0200)]
Split _stp_module_relocate into kernel and user space lookup functions.

Simplify relocation logic by splitting kernel and user space module lookups.

* runtime/sym.h (_stp_module_relocate): Split into ...
  (_stp_kmodule_relocate): ... this for kernel module lookups and ...
  (_stp_umodule_relocate): ... this for user space lookups.
* runtime/sym.c: Likewise.
  (_stp_module_check): Use _stp_kmodule_relocate.
* dwflpp.cxx (dwflpp::emit_address): Use _stp_kmodule_relocate or
  _stp_umodule_relocate as appropriate.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Use
  _stp_kmodule_relocate for kprobes.

14 years agoMerge branch 'master' into usym
Mark Wielaard [Sun, 27 Jun 2010 11:01:02 +0000 (13:01 +0200)]
Merge branch 'master' into usym

14 years agoDon't relookup module/section in unwinder, use section static_addr directly.
Mark Wielaard [Sat, 26 Jun 2010 21:15:08 +0000 (23:15 +0200)]
Don't relookup module/section in unwinder, use section static_addr directly.

* runtime/unwind.c (adjustStartLoc): Add comments. Use s->static_addr
   directly instead of looking it up through _stp_module_relocate().

14 years agoUse #ifdef CONFIG_PREEMPT_RT, not #if.
Mark Wielaard [Sat, 26 Jun 2010 20:47:46 +0000 (22:47 +0200)]
Use #ifdef CONFIG_PREEMPT_RT, not #if.

* runtime/itrace.c (struct itrace_info): Guard raw_spinlock_t with #ifdef.

14 years agoPR11759: CONFIG_PRREMPT_RT -> use raw_{rwlock,spinlock}_t
Frank Ch. Eigler [Sat, 26 Jun 2010 20:16:55 +0000 (16:16 -0400)]
PR11759: CONFIG_PRREMPT_RT -> use raw_{rwlock,spinlock}_t

14 years agomore deprecation policy elaboration
Frank Ch. Eigler [Fri, 25 Jun 2010 18:40:33 +0000 (14:40 -0400)]
more deprecation policy elaboration

14 years agodraft deprecation policy/mechanism
Frank Ch. Eigler [Fri, 25 Jun 2010 15:42:38 +0000 (11:42 -0400)]
draft deprecation policy/mechanism

14 years agoPR11343: document
Frank Ch. Eigler [Fri, 25 Jun 2010 15:41:51 +0000 (11:41 -0400)]
PR11343: document

14 years agoFix warnings.exp testcase for s390x.
David Smith [Fri, 25 Jun 2010 21:13:56 +0000 (16:13 -0500)]
Fix warnings.exp testcase for s390x.

* testsuite/systemtap.base/warnings.stp: Adjust the line number offset in
  a 'kernel.statement' probe for s390x.

14 years agoAdded kprocess.stp testcases.
David Smith [Fri, 25 Jun 2010 16:32:02 +0000 (11:32 -0500)]
Added kprocess.stp testcases.

* testsuite/buildok/kprocess-all-probes.stp: Renamed from
  process-all-probes.stp and uses wildcards.
* testsuite/buildok/kprocess-detailed.stp: New testcase.
* testsuite/buildok/kprocess-embedded.stp: Ditto.

14 years agoAllow dtrace to override -DSTAP_SDT_V2
Stan Cox [Fri, 25 Jun 2010 15:28:37 +0000 (11:28 -0400)]
Allow dtrace to override -DSTAP_SDT_V2

* dtrace.in: For -G: #include sys/sdt.h and pass includes to gcc
* sdt_misc.exp: Use it.

14 years agoFixed PR11752 by updating the signal.handle alias for ppc.
David Smith [Fri, 25 Jun 2010 14:36:54 +0000 (09:36 -0500)]
Fixed PR11752 by updating the signal.handle alias for ppc.

* tapset/signal.stp (signal.handle): Added handle_rt_signal64,
  handle_rt_signal32, and handle_signal32 to the alias to support ppc
  kernels >= 2.6.23.

14 years agoRename _stp_stack_snprint to _stp_stack_hexstring.
Mark Wielaard [Fri, 25 Jun 2010 14:04:12 +0000 (16:04 +0200)]
Rename _stp_stack_snprint to _stp_stack_hexstring.

_stp_stack_snprint() was only used to get the hex string of a backtrace.
So rename it to make that clear and simplify it by not calling through
the full _stp_stack_print(). Simplify _stp_stack_print() a bit since it
now doesn't need to handle "hex string only" backtraces.

* runtime/stack.c (_stp_stack_print): Just handle the SYM_VERBOSE_FULL
  and SYM_VERBOSE_BRIEF cases. SYM_VERBOSE_NONE isn't supported directly
  anymore.
  (_stp_stack_snprint): Rename to ...
  (_stp_stack_hexstring): ... this. Remove now unused verbose argument.
  Just handle hexstring backtrace only, call through to __stp_stack_print.
* tapset/context-unwind.stp (print_backtrace): Explicitly use
  SYM_VERBOSE_FULL.
  (backtrace): Use _stp_stack_hexstring().
* tapset/ucontext-unwind.stp (ubacktrace): Likewise.

14 years agoCombine _stp_symbol_print and _stp_usymbol_print into _stp_print_symbol.
Mark Wielaard [Fri, 25 Jun 2010 10:00:42 +0000 (12:00 +0200)]
Combine _stp_symbol_print and _stp_usymbol_print into _stp_print_symbol.

These functions did exactly the same, except the usymbol one took a
task_struct. Combine them and use task_struct being NULL as indicator
for wanting kernel/module symbols.

* runtime/sym.c (_stp_symbol_print): Combine with...
  (_stp_usymbol_print): ... this into ...
  (_stp_print_symbol): combined function.
* tapset/context-symbols.stp (print_stack): Call _stp_print_symbol with NULL.
* tapset/ucontext-symbols.stp (print_ustack): Call _stp_print_symbol with tsk.
* runtime/stack.c (_stp_stack_print): Use _stp_print_symbol.
  (_stp_stack_print_tsk): Likewise.
* runtime/stack-arm.c (__stp_stack_print): Likewise.
* runtime/stack-ia64.c (__stp_show_stack_sym): Likewise.
* runtime/stack-ppc.c (__stp_stack_print): Likewise.
* runtime/stack-s390.c (__stp_show_stack): Likewise.

14 years agoImprove dwflpp::emit_address internal error message.
Mark Wielaard [Thu, 24 Jun 2010 19:00:56 +0000 (21:00 +0200)]
Improve dwflpp::emit_address internal error message.

* dwflpp.cxx (dwflpp::emit_address): Be more explicit about context and
  what failed in case of internal error.

14 years agodocs rpm: prereq publican "brand" by /path/ rather than RPM name
Frank Ch. Eigler [Thu, 24 Jun 2010 18:51:59 +0000 (14:51 -0400)]
docs rpm: prereq publican "brand" by /path/ rather than RPM name

14 years agoSplit _stp_mod_sec_lookup into _stp_kmod_sec_lookup and _stp_umod_lookup.
Mark Wielaard [Thu, 24 Jun 2010 16:19:35 +0000 (18:19 +0200)]
Split _stp_mod_sec_lookup into _stp_kmod_sec_lookup and _stp_umod_lookup.

* runtime/sym.c (_stp_mod_sec_lookup): Split into...
  (_stp_kmod_sec_lookup): ... for kernel/module lookup and ...
  (_stp_umod_lookup): For user space/vma lookup.
  (_stp_kallsyms_lookup): Use either of the above and calculate rel_addr.
* runtime/unwind.c (unwind): Call either _stp_umod_lookup or
  _stp_kmod_sec_lookup.
* tapset/context-symbols.stp (probemod): Use _stp_kmod_sec_lookup.
  (modname): Likewise.

14 years agoWorking PR11719 fixes for cmd_parse.exp for ppc.
David Smith [Thu, 24 Jun 2010 14:21:55 +0000 (09:21 -0500)]
Working PR11719 fixes for cmd_parse.exp for ppc.

* testsuite/systemtap.base/cmd_parse.exp: Fixed mapped variable name.

14 years agoAnother PR11710 fix so that nd_syscall probes work on s390x systems.
David Smith [Thu, 24 Jun 2010 14:03:37 +0000 (09:03 -0500)]
Another PR11710 fix so that nd_syscall probes work on s390x systems.

* tapset/s390/registers.stp (_stp_get_register_by_offset): Added a cast.

14 years agoInclude gettimeofday in the tapset reference
Josh Stone [Thu, 24 Jun 2010 00:00:09 +0000 (17:00 -0700)]
Include gettimeofday in the tapset reference

14 years agoInclude pn() in the tapset reference
Josh Stone [Wed, 23 Jun 2010 23:34:23 +0000 (16:34 -0700)]
Include pn() in the tapset reference

14 years agoAdd kernel-dwarf to the pretty-prints tests
Josh Stone [Wed, 23 Jun 2010 23:04:25 +0000 (16:04 -0700)]
Add kernel-dwarf to the pretty-prints tests

Since some kernels don't have utrace, we should also exercise the dwarf
pretty-printing on a kprobe.

14 years agoPR10830 cont'd: Rename pp1() -> pn() and isolate it
Josh Stone [Wed, 23 Jun 2010 21:28:16 +0000 (14:28 -0700)]
PR10830 cont'd: Rename pp1() -> pn() and isolate it

The new name is "pn" to evoke "probe name".  It is also now isolated in
its own tapset file, so it's less likely to be pulled into and conflict
with a user's script accidentally.

No real code changes here -- it's roughly just s/pp1/pn/ and
s/probe_point_listing/probe_name/.

14 years agoCorrect testing for compat task. Always use our own test.
Mark Wielaard [Wed, 23 Jun 2010 19:47:53 +0000 (21:47 +0200)]
Correct testing for compat task. Always use our own test.

is_compat_task(), when defined in the kernel, is really just for testing
whether or not we are in a 32-compat syscall. It does not definitely tell
us whether or not the current task is a 32bit compat task. So always use
our own test_thread_flag() with the arch specific TIF_flag.

* runtime/autoconf-is-compat-task.c: Removed.
* buildrun.cxx (compile_pass): Remove is-compat-task check.
* runtime/compatdefs.h: Detect s390 specific TIF flag. Always define
  _stp_is_compat_task() when CONFIG_COMPAT defined.
* tapset/conversions.stp (user_long): Use _stp_is_compat_task().
  (user_long_warn): Likewise.

14 years agoBetter split kernel/user space address symbol lookups.
Mark Wielaard [Wed, 23 Jun 2010 19:07:33 +0000 (21:07 +0200)]
Better split kernel/user space address symbol lookups.

* runtime/sym.c (_stp_mod_sec_lookup): Don't fall through to kernel module
  address search when we know to be looking for a user space module/vma.
* tapset/context-symbols.stp (probefunc): Clarify documentation.
  Use user_mode(CONTEXT->regs) check. Pass NULL for task to
  _stp_symbol_snprint().
 (probemod): Clarify documentation. Pass NULL for task to
 _stp_mod_sec_lookup().
 (modname): Likewise.
 (symname): Clarify documentation.
 (symdata): Likewise.

14 years agoFixed PR11725 by adding big-endian support to systemtap.printf/bin6.exp.
David Smith [Wed, 23 Jun 2010 16:39:05 +0000 (11:39 -0500)]
Fixed PR11725 by adding big-endian support to systemtap.printf/bin6.exp.

* testsuite/systemtap.printf/bin6.exp: Added a big-endian result string
  and code to pick the correct result string bassed on the system running
  the test.

14 years agoPR10830: Add pp1() for the high-level probe name
Josh Stone [Wed, 23 Jun 2010 00:44:35 +0000 (17:44 -0700)]
PR10830: Add pp1() for the high-level probe name

This is a new function which should return the same high-level name that
"stap -l" gives.  (e.g. syscall.open instead of kernel.function...)

* translate.cxx (c_unparser::emit_common_header): Add probe_point_listing.
  (translate_pass): Add pp1 to stap_probe, predicated on
  STP_NEED_PROBE_POINT_LISTING so we don't waste space.
* tapsets.cxx (common_probe_init): Set pp1 to script_location().
  (common_probe_entryfn_prologue): Write pp1 to the CONTEXT.
* tapset-timers.cxx (profile_derived_probe_group::emit_module_decls):
  Fixup CONTEXT->probe_point_listing, since it loops individual probes
  manually.
* tapset/context.stp (pp1): New, expose the location to scripts.
* testsuite/buildok/context-embedded.stp: Build pp1().
* testsuite/systemtap.base/pp.{exp,stp}: Test the difference between
  pp() and pp1().

14 years agoFactor out common probe elements
Josh Stone [Wed, 23 Jun 2010 00:02:37 +0000 (17:02 -0700)]
Factor out common probe elements

The probes in every tapset type all have a handler (ph) and a
probe_point (pp), which are initialized and used in exactly the same
way.  Let's bring that out into a common stap_probe struct.

This will also ease new fields, e.g. for PR10830.

* translate.cxx (translate_pass): Define struct stap_probe, also making
  the decision of whether pp is better as char* or char[].
* tapsets.cxx (common_probe_init): Initialize a runtime stap_probe from
  any translator derived_probe.
  (common_probe_entryfn_prologue): Take a stap_probe instead of pp.
* tapset*.cxx: Adjust all tapsets to use the features above.

14 years agoAdd a function for getting a probe's script location
Josh Stone [Tue, 22 Jun 2010 20:01:10 +0000 (13:01 -0700)]
Add a function for getting a probe's script location

* elaborate.cxx (derived_probe::script_location): New, factor out the
  code for grabbing the "friendly" location of a probe, as specified in
  the script.
* main.cxx (printscript): Use it.

14 years agoMake probe->basest/almost_basest const
Josh Stone [Tue, 22 Jun 2010 19:55:50 +0000 (12:55 -0700)]
Make probe->basest/almost_basest const

14 years agoMake probe::almost_basest() work
Josh Stone [Tue, 22 Jun 2010 18:42:30 +0000 (11:42 -0700)]
Make probe::almost_basest() work

* staptree.h (probe::almost_basest): Probes are the basest, not almost.
* elaborate.h (derived_probe::almost_basest): If base says 0, then the
  almost_basest is this one.
* main.cxx (printscript): Use p->almost_basest() instead of collecting
  the entire derivation chain.

14 years agoAdded detailed irq.stp testcase.
David Smith [Tue, 22 Jun 2010 21:42:28 +0000 (16:42 -0500)]
Added detailed irq.stp testcase.

* testsuite/buildok/irq-detailed.stp: New detailed testcase.
* testsuite/buildok/irq-all-probes.stp: Renamed from
  testsuite/buildok/irq.stp.

14 years agoImprove regexec string accesses.
Stan Cox [Tue, 22 Jun 2010 20:07:58 +0000 (16:07 -0400)]
Improve regexec string accesses.

tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Use substr instead of funky C tricks.

14 years agoFixed PR11726 by adding a cast to get the memory1.exp testcase compiling.
David Smith [Tue, 22 Jun 2010 19:34:50 +0000 (14:34 -0500)]
Fixed PR11726 by adding a cast to get the memory1.exp testcase compiling.

* translate.cxx (visit_print_format): Added a cast to fix ppc64 support.

14 years agoUpdated ip.stp and added a testcase for it.
David Smith [Tue, 22 Jun 2010 19:32:53 +0000 (14:32 -0500)]
Updated ip.stp and added a testcase for it.

* tapset/ip.stp: Simplified __get_skb_iphdr() a bit by merging
  __get_skb_iphdr_new() into it.
* testsuite/buildok/ip-embedded.stp: New testcase.

14 years agoOnly use compat functions/types when CONFIG_COMPAT defined.
Mark Wielaard [Tue, 22 Jun 2010 18:59:22 +0000 (20:59 +0200)]
Only use compat functions/types when CONFIG_COMPAT defined.

* tapset/conversions.stp (user_long): Use #ifdef CONFIG_COMPAT.
  (user_long_warn): Likewise.

14 years agoInitialize ln in sdt_uprobe_var_expanding_visitor::visit_target_symbol.
Mark Wielaard [Tue, 22 Jun 2010 18:58:33 +0000 (20:58 +0200)]
Initialize ln in sdt_uprobe_var_expanding_visitor::visit_target_symbol.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
  Fool compiler into thinking literal_number* ln is always assigned.

14 years agoAdded new ipmib.stp buildok testcases.
David Smith [Tue, 22 Jun 2010 18:59:12 +0000 (13:59 -0500)]
Added new ipmib.stp buildok testcases.

* testsuite/buildok/ipmib-detailed.stp: New testcase.
* testsuite/buildok/ipmib-embedded.stp: Ditto.

14 years agoMinor buildok testsuite fixes.
David Smith [Tue, 22 Jun 2010 18:00:34 +0000 (13:00 -0500)]
Minor buildok testsuite fixes.

* testsuite/buildok/inet_sock-embedded.stp: Added daddr_to_string() test.
* testsuite/buildok/ioscheduler-detailed.stp: Added comment about why
  we're testing the iocheduler.*.kp probe aliases.

14 years agoHandle $N numeric literal for -DSTAP_SDT_V2 probe asm arg descriptor.
Stan Cox [Tue, 22 Jun 2010 16:37:43 +0000 (12:37 -0400)]
Handle $N numeric literal for -DSTAP_SDT_V2 probe asm arg descriptor.

sdt.h (__stap_argN):  Switch gcc asm constraint from "ro" to "ron" to allow $N
tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Add literal_arg to support $N.

14 years agoPut the stappaths manpage in all rpms that have manpages.
David Smith [Tue, 22 Jun 2010 15:58:06 +0000 (10:58 -0500)]
Put the stappaths manpage in all rpms that have manpages.

* systemtap.spec (Requires): Put stappaths.7* in all subrpms that have
  manpages, since it is a "global" manpage.

14 years agoPR11722 Handle signed "addresses" from 32-on-64 user processes.
Mark Wielaard [Tue, 22 Jun 2010 13:53:47 +0000 (15:53 +0200)]
PR11722 Handle signed "addresses" from 32-on-64 user processes.

A systemtap long is signed, and so can contain a "negative" address.
Make sure to "chop off" the signedness when processing these longs
for 32-on-64 bit user tasks.

* runtime/compatdefs.h: Always (redifine) TIF_32BIT.
* runtime/sym.c (_stp_kallsyms_lookup): Detect long used as 32bit address.
* runtime/vma.c (_stp_vma_module_name): Likewise.

14 years agoPackaged stappaths.7.gz.
David Smith [Tue, 22 Jun 2010 13:46:29 +0000 (08:46 -0500)]
Packaged stappaths.7.gz.

* systemtap.spec: Added '%{_mandir}/man7/*' so that stappaths.7.gz gets
  packages properly.

14 years agoPR11722 Add runtime/compatdefs.h to define is_compat_task() for older kernels.
Mark Wielaard [Tue, 22 Jun 2010 10:07:17 +0000 (12:07 +0200)]
PR11722 Add runtime/compatdefs.h to define is_compat_task() for older kernels.

* runtime/autoconf-is-compat-task.c: New autoconf test.
* buildrun.cxx (compile_pass): Add STAPCONF_IS_COMPAT_TASK.
* runtime/compatdefs.h: New compat definitions (is_compat_task).
* runtime/regs.c: Include compatdefs.h
* tapset/conversions.stp: Remove configure checkery.

14 years agoAllow optional $ at start of semantic error alternatives list.
Mark Wielaard [Tue, 22 Jun 2010 09:00:03 +0000 (11:00 +0200)]
Allow optional $ at start of semantic error alternatives list.

This changes the expected error message matching to account for commit
4ca5ac which fixed PR11713: listing available variable with leading '$'

* testsuite/systemtap.base/alternatives.exp: Add \$? in front of char match.

14 years agoPR11713: listing available variable with leading '$'
Wenji Huang [Tue, 22 Jun 2010 02:43:35 +0000 (10:43 +0800)]
PR11713: listing available variable with leading '$'

* dwflpp.cxx(dwflpp::print_locals): Add '$' to name.

14 years agoautoconfigury rebuilt with f13 tools
Frank Ch. Eigler [Mon, 21 Jun 2010 22:07:31 +0000 (18:07 -0400)]
autoconfigury rebuilt with f13 tools

14 years agoFixed ia64 compile problem with 'nd_syscall.pipe.return'.
David Smith [Mon, 21 Jun 2010 21:29:03 +0000 (16:29 -0500)]
Fixed ia64 compile problem with 'nd_syscall.pipe.return'.

* tapset/nd_syscalls2.stp(nd_syscall.pipe.return): Fixed typo (missing
  comma), which was causing ia64 compilation problems.

14 years agoFixed ipmip.stp documentation strings to say 'ipmib', not 'tcpmib'.
David Smith [Mon, 21 Jun 2010 21:23:50 +0000 (16:23 -0500)]
Fixed ipmip.stp documentation strings to say 'ipmib', not 'tcpmib'.

* tapset/ipmib.stp: Fixed all documentation strings.

14 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Lukas Berk [Mon, 21 Jun 2010 20:31:44 +0000 (16:31 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

14 years agoAddressing bug 11706 "unautoconfiscation of most stap*.in manual
Lukas Berk [Mon, 21 Jun 2010 20:25:44 +0000 (16:25 -0400)]
Addressing bug 11706 "unautoconfiscation of most stap*.in manual
pages. autoconfiguration paths were moved to a new stappaths (7)
manual page while the other manual pages were changed to refer
to stappaths (7) in case of a dynamic path.  Tested using a fresh
install with a set --prefix during configuration and evn MANPATHS to
match the given $prefix.

14 years agoAddressing bug 11706 "unautoconfiscation of most stap*.in manual pages".
Lukas Berk [Mon, 21 Jun 2010 19:53:56 +0000 (15:53 -0400)]
Addressing bug 11706 "unautoconfiscation of most stap*.in manual pages".
Autoconfiguration paths were moved to a new stappaths (7) manual page,
while the other manual pages were changed to refer to stappaths(7) in
case of dynamic paths.  Tested using a fresh install with a set --prefix
during configuration and evn MANPATHS to match the given $prefix.

14 years agoAddressing bug 11706 unautoconfiscation of most stap*.in manual pages
Lukas Berk [Mon, 21 Jun 2010 19:48:52 +0000 (15:48 -0400)]
Addressing bug 11706 unautoconfiscation of most stap*.in manual pages
autoconfiguration paths were moved to a new stappaths (7) manual page
while the other manual pages were changed to refer to stappaths (7)
in case of a dynamic path.  Tested using a fresh install with a
set --prefix during configuration and evn MANPATHS to match the given
$prefix.

14 years agoSupport postgres 8.4.4 for static user marker testing.
Stan Cox [Mon, 21 Jun 2010 19:04:13 +0000 (15:04 -0400)]
Support postgres 8.4.4 for static user marker testing.

postgres.exp (postgresrelease): Bump to 8.4.4.

14 years agoLarge update to kprobes test scripts.
David Smith [Mon, 21 Jun 2010 15:09:58 +0000 (10:09 -0500)]
Large update to kprobes test scripts.

* scripts/kprobes_test/kprobes_test.py: Python script to replace old
  expect scripts.
* scripts/kprobes_test/whitelist.exp: Removed old expect script.
* scripts/kprobes_test/whitelist_lib.exp: Ditto.
* scripts/kprobes_test/gen_code.py: Changed so that could be included by
  another python module, or directly executed.
* scripts/kprobes_test/is_probed.py: Ditto.
* scripts/kprobes_test/run_module.py: Ditto.
* scripts/kprobes_test/config_opts.py: Commented config options.
* scripts/kprobes_test/default.cfg: Commented out ltp tests that require a
  server.
* scripts/kprobes_test/.gitignore: Updated.

14 years agoPR11722 user_long(uaddr) should fetch a user space long (in case of 32-on-64).
Mark Wielaard [Mon, 21 Jun 2010 12:17:46 +0000 (14:17 +0200)]
PR11722 user_long(uaddr) should fetch a user space long (in case of 32-on-64).

user_long[_warn](uaddr) would fetch a kernel long, but that might be the
wrong size if the user space process was running in compat mode (32-on-64).

* tapset/conversions.stp (user_long): Fetch a compat_long_t if current
  process is_compat_task().
  (user_long_warn): Likewise.

14 years agoRework usymbols.exp to create arch specific executables and library names.
Mark Wielaard [Mon, 21 Jun 2010 11:57:16 +0000 (13:57 +0200)]
Rework usymbols.exp to create arch specific executables and library names.

This makes it more clear what setup is specifically tested. But it also
seems to work around a bug where systemtap apparently picks up the wrong
copy (cached?) of similarly named executables/shared libraries. PR11735.

* testsuite/systemtap.context/usymbols.exp: Make testexename/testlibname
  derived from arch under test.

14 years agousymbols.exp set maintestflags and testlibflags correctly for compat (-m32).
Mark Wielaard [Mon, 21 Jun 2010 09:40:38 +0000 (11:40 +0200)]
usymbols.exp set maintestflags and testlibflags correctly for compat (-m32).

Testcase now really compiles both for default and compat (-m32) arches for
platforms that support it. This makes the 32-on-64 x86_64 fail similarly
to the ppc case (user_long fetches a kernel long, not the user space long).

* testsuite/systemtap.context/usymbols.exp: Set maintestflags and
  testlibflags not just testflags.

14 years agoUntest func_alias on utrace-less debuginfo
Wenji Huang [Mon, 21 Jun 2010 03:09:56 +0000 (11:09 +0800)]
Untest func_alias on utrace-less debuginfo

14 years agoGuard pretty-printing test with CONFIG_UTRACE
Wenji Huang [Mon, 21 Jun 2010 02:07:36 +0000 (10:07 +0800)]
Guard pretty-printing test with CONFIG_UTRACE

14 years agonoptrace: add a bit of blurbage
Frank Ch. Eigler [Sat, 19 Jun 2010 11:18:58 +0000 (07:18 -0400)]
noptrace: add a bit of blurbage

14 years agonoptrace sample: report blocked ptrace(2) attempt before changing request code
Frank Ch. Eigler [Sat, 19 Jun 2010 03:18:14 +0000 (23:18 -0400)]
noptrace sample: report blocked ptrace(2) attempt before changing request code

14 years agonew example: noptrace.stp
Frank Ch. Eigler [Sat, 19 Jun 2010 03:01:13 +0000 (23:01 -0400)]
new example: noptrace.stp

14 years agoFixed PR11723 by getting transok/buildko.sp to pass.
David Smith [Fri, 18 Jun 2010 20:17:53 +0000 (15:17 -0500)]
Fixed PR11723 by getting transok/buildko.sp to pass.

* testsuite/transok/buildko.stp: If the buildko script needs '-g', use it.

14 years agoFixed PR11719 by fixing cmd_parse.exp for ppc.
David Smith [Fri, 18 Jun 2010 20:13:17 +0000 (15:13 -0500)]
Fixed PR11719 by fixing cmd_parse.exp for ppc.

* testsuite/systemtap.base/cmd_parse.exp: Mapped 'ppc64' to 'powerpc' (and
  similar changes form s390x and i686) because that is the internal kernel
  architecture.

14 years agoSeparate vma tracker function callbacks from sym.c into vma.c.
Mark Wielaard [Fri, 18 Jun 2010 16:09:38 +0000 (18:09 +0200)]
Separate vma tracker function callbacks from sym.c into vma.c.

* runtime/sym.c: Move vma related function callbacks to...
* runtime/vma.c: ... here.
* tapset/ucontext.stp (umodname): Call renamed _stp_vma_module_name().
* task_finder.cxx (task_finder_derived_probe_group::emit_module_init): Emit
  renamed _stp_vma_init().

14 years agoPR11722 usymbols.exp should be probing 64 and/or 32 rt_sigaction.
Mark Wielaard [Fri, 18 Jun 2010 19:55:20 +0000 (21:55 +0200)]
PR11722 usymbols.exp should be probing 64 and/or 32 rt_sigaction.

Extend testcase so it covers 32 and 64 bit on platforms that support that.

* testsuite/systemtap.context/usymbols.exp: Loop through supported arches.

14 years agoPR11721 the usymbols.exp testcase shouldn't touch '__user' memory directly
Mark Wielaard [Fri, 18 Jun 2010 19:39:10 +0000 (21:39 +0200)]
PR11721 the usymbols.exp testcase shouldn't touch '__user' memory directly

* testsuite/systemtap.context/usymbols.exp: Fetch address through user_long.

14 years agoRemove unused unsigned long module field from struct _stp_module.
Mark Wielaard [Fri, 18 Jun 2010 12:56:30 +0000 (14:56 +0200)]
Remove unused unsigned long module field from struct _stp_module.

* runtime/sym.h (_stp_module): Remove module field.

14 years agoOnly print alternatives in a semantic error when there are any.
Mark Wielaard [Thu, 17 Jun 2010 09:29:31 +0000 (11:29 +0200)]
Only print alternatives in a semantic error when there are any.

"semantic error: probe point mismatch at position 3 (alternatives:):"
looks slightly ugly. Just don't print alternatives when there aren't any.

* elaborate.cxx (match_node::find_and_build): Check that there are any
  alternatives before adding them to the semantic error message.

14 years agoPR3672: Document and test pretty-printing
Josh Stone [Thu, 17 Jun 2010 00:42:01 +0000 (17:42 -0700)]
PR3672: Document and test pretty-printing

* NEWS: Blurb it.
* stapprobes.3stap.in: Show it.
* testsuite/semok/pretty.stp: Semantize it.
* testsuite/buildok/pretty.stp: Build it.

14 years agoDocument $var[(expr)]
Josh Stone [Wed, 16 Jun 2010 23:14:39 +0000 (16:14 -0700)]
Document $var[(expr)]

* stapprobes.3stap.in: In $var[N], N can be an expression.

14 years agoPR4186 cont'd; fix preprocessor.exp test
Frank Ch. Eigler [Wed, 16 Jun 2010 21:16:51 +0000 (17:16 -0400)]
PR4186 cont'd; fix preprocessor.exp test

We need to canonicalize 'uname -i' here too.

14 years agoPR11553: better error messages for .return probes on inlined functions
Frank Ch. Eigler [Wed, 16 Jun 2010 21:03:01 +0000 (17:03 -0400)]
PR11553: better error messages for .return probes on inlined functions

* tapsets.cxx (dwarf_query): Add inlined_non_returnable field.
  (query_dwarf_funct): Add to it as appropriate.
  (dwarf_builder::build): Report on it as appropriate, function
  of verbosity, match-count, warning-suppression.  Yey.
  (query_inline_instance_info): Assert !has_return.

14 years agoFixed PR11710 so that nd_syscall probes work on s390x systems.
David Smith [Wed, 16 Jun 2010 14:18:02 +0000 (09:18 -0500)]
Fixed PR11710 so that nd_syscall probes work on s390x systems.

* tapset/s390/registers.stp (_stp_arg): Fixed logic error.  The last case
  was missing an "if", which caused all _stp_arg() calls to only return
  the value of r6.

14 years agounprivileged typo
Josh Stone [Wed, 16 Jun 2010 01:27:02 +0000 (18:27 -0700)]
unprivileged typo

14 years agoRename cast_op::type to type_name
Josh Stone [Tue, 15 Jun 2010 23:27:18 +0000 (16:27 -0700)]
Rename cast_op::type to type_name

The existing name shadowed expression::type, and we can't have that...

14 years agoThe Death of target_symbol::base_name
Josh Stone [Tue, 15 Jun 2010 22:46:47 +0000 (15:46 -0700)]
The Death of target_symbol::base_name

Once upon a time, target_symbol was not a symbol, such shame.
But lo! one fateful day, an new inheritance raised its game.
Henceforth let target_symbol be known by its symbol::name.

14 years agoPR3672: Auto-stringify char* and char[]
Josh Stone [Tue, 15 Jun 2010 22:17:39 +0000 (15:17 -0700)]
PR3672: Auto-stringify char* and char[]

* tapsets.cxx (dwarf_pretty_print::print_chars): New, if the referenced
  type looks like a C-string, dereference it as such.
  (dwarf_pretty_print::recurse_array): Try print_chars first.
  (dwarf_pretty_print::recurse_pointer): Ditto.
* tapset/conversions.stp (kernel_string2): New, with error string.

14 years agoPR3672: don't print "_vptr.foo" members
Josh Stone [Tue, 15 Jun 2010 00:18:43 +0000 (17:18 -0700)]
PR3672: don't print "_vptr.foo" members

The only use I can think for the vtable pointer is to try to identify an
instance's subclass, but I don't think that's useful in the general
case.  We might want to think about how to expose that for power users
though, because our syntax doesn't allow "$p->_vptr.foo".

* tapsets.cxx (dwarf_pretty_print::recurse_struct_members): Filter out
  members which start with "_vptr.foo".

14 years agoEnsure synthetic functions get symbol resolution
Josh Stone [Tue, 15 Jun 2010 22:00:08 +0000 (15:00 -0700)]
Ensure synthetic functions get symbol resolution

When writing the pretty-print functions, I had trouble because the
referents weren't being automatically filled in.  Rather than assigning
them manually, this change now adds synthetic functions to the session
in a way that they will get symbol resolution later.

* elaborate.cxx (semantic_pass_symbols): Process probes before
  functions, in case synthetic functions are added to the file.
* staptree.cxx (functiondecl::join): New, add a synthetic function to
  the session functions, and append it to the file's functions for later
  symbol resolution.
* tapsets.cxx (dwarf_pretty_print::expand): Use fdecl->join to add the
  function to the session, and leave referents as default for later.
  (dwarf_pretty_print::deref): Ditto.
  (dwarf_var_expanding_visitor::visit_target_symbol): Ditto.
  (dwarf_cast_query::handle_query_module): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_context): Ditto.
* tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol):
  Ditto.

14 years agoPR11684 cont'd
Frank Ch. Eigler [Tue, 15 Jun 2010 21:45:40 +0000 (17:45 -0400)]
PR11684 cont'd

* doc/langref.tex: remove all references to tapset-defined functions.
  Leave in just "formatted output" a la printf.  Correct explanation
  of $1 token-pasting.  Still several bits left to fix later.

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