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

14 years agodoc build: make clean should clean up dvi files too
Frank Ch. Eigler [Tue, 15 Jun 2010 20:09:48 +0000 (16:09 -0400)]
doc build: make clean should clean up dvi files too

14 years agoBanish the SyScall
Josh Stone [Mon, 14 Jun 2010 17:44:10 +0000 (10:44 -0700)]
Banish the SyScall

We don't need to deal with the SYSCALL_WRAPPERS-generated SyS_foo,
because since the dawn of that feature they have also provided a normal
sys_foo alias.  So as long as alias tracking is working, both in our
translator and in kallsyms for kprobe.function, we can be blissfully
ignorant.

http://sourceware.org/ml/systemtap/2010-q2/msg00551.html

14 years agoFixed PR11707 so that nd_syscall probes work on ppc64 systems.
David Smith [Tue, 15 Jun 2010 19:36:23 +0000 (14:36 -0500)]
Fixed PR11707 so that nd_syscall probes work on ppc64 systems.

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

14 years agoAdded endian.stp/errno.stp build testcases.
David Smith [Tue, 15 Jun 2010 16:39:43 +0000 (11:39 -0500)]
Added endian.stp/errno.stp build testcases.

* testsuite/buildok/endian-embedded.stp: New endian.stp testcase.
* testsuite/buildok/errno-embedded.stp: New errno.stp testcase.
* testsuite/buildok/ioscheduler-all-probes.stp: Made executable.

14 years agoAdded new dev.stp and ctime.stp build testcases and updated dentry testcase.
David Smith [Tue, 15 Jun 2010 16:25:31 +0000 (11:25 -0500)]
Added new dev.stp and ctime.stp build testcases and updated dentry testcase.

* testsuite/buildok/conversions-guru-embedded.stp: Renamed from
  set_kernel.stp.
* testsuite/buildok/ctime-embedded.stp: New testcase.
* testsuite/buildok/dentry-embedded.stp: Renamed from dentry.stp and added
  the rest of the functions from dentry.stp.
* testsuite/buildok/dev-embedded.stp: New testcase.

14 years agoImproved aux_syscalls.stp build testcase.
David Smith [Tue, 15 Jun 2010 16:02:55 +0000 (11:02 -0500)]
Improved aux_syscalls.stp build testcase.

* testsuite/buildok/aux_syscalls-embedded.stp: Added the rest of the
  functions from aux_syscalls.stp.

14 years agoSmall updates to conversion tapset and testcases.
David Smith [Tue, 15 Jun 2010 15:27:33 +0000 (10:27 -0500)]
Small updates to conversion tapset and testcases.

* tapset/conversions.stp: Fixed documentation string.
* testsuite/buildok/conversions.stp: Added kernel_string_n() test.
* testsuite/buildok/conversions-embedded.stp: Ditto.

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

14 years agofixing the errors in langref.tex and reformatted the documentation in the tapset...
Lukas Berk [Mon, 14 Jun 2010 23:42:50 +0000 (19:42 -0400)]
fixing the errors in langref.tex and reformatted the documentation in the tapset/*.stp

14 years agouprobes_ppc: Don't emulate privileged MSR opcodes
Josh Stone [Thu, 10 Jun 2010 18:06:21 +0000 (11:06 -0700)]
uprobes_ppc: Don't emulate privileged MSR opcodes

14 years agoPR11698: Track aliases even with ppc function descriptors
Josh Stone [Sat, 12 Jun 2010 01:22:56 +0000 (18:22 -0700)]
PR11698: Track aliases even with ppc function descriptors

We can include function descriptors in the symbol table, and just make
sure that we don't try to probe them with query_module_symtab.  This
lets update_symtab do its thing resolving aliased names.

* dwflpp.h (func_info): Add a descriptor flag.
* tapsets.cxx (symbol_table::add_symbol): Set the descriptor flag.
  (symbol_table::read_symbols): Not descriptors.
  (symbol_table::get_from_elf): Functions from powerpc rejected sections
  are function descriptors.
  (dwarf_query::query_module_symtab): Don't probe descriptors.

14 years agoPR10327: Fix and test alias matching
Josh Stone [Sat, 12 Jun 2010 00:44:51 +0000 (17:44 -0700)]
PR10327: Fix and test alias matching

The optimization in commit 4df79aa broke alias matching for functions
without wildcards, but we didn't have any testing. :(

* dwflpp.cxx (dwflpp::iterate_single_function): Call update_symtab after
  building the module function cache, to enable alias matching.
* testsuite/systemtap.base/func_alias.{exp,c}: New test.

14 years agoFixed BZ598615 to avoid a crash when setting registers on ia64.
David Smith [Mon, 14 Jun 2010 18:23:16 +0000 (13:23 -0500)]
Fixed BZ598615 to avoid a crash when setting registers on ia64.

* runtime/regs-ia64.c (ia64_store_register): Added a missing "return"
  statement that caused a crash when changing registers on ia64.

14 years agoMake sure that the tapset documentation title descriptions are on a single line
William Cohen [Mon, 14 Jun 2010 14:30:06 +0000 (10:30 -0400)]
Make sure that the tapset documentation title descriptions are on a single line

The docproc program that extracts information information from the tapset
comments needs the title line to be a single line. Otherwise the second
line get counted as a description line and conflicts with the later
"Description:" section.

14 years agoAddressing bug #11684 and eliminating duplication from /doc/langref.tex and /tapset...
Lukas Berk [Mon, 14 Jun 2010 14:04:01 +0000 (10:04 -0400)]
Addressing bug #11684 and eliminating duplication from /doc/langref.tex and /tapset/*.stp

14 years agoPR11641: fix backtrace from uretprobe
Wenji Huang [Sat, 12 Jun 2010 03:03:59 +0000 (11:03 +0800)]
PR11641: fix backtrace from uretprobe

This will partly revert commit 23258335. When not called
from a uretprobe hander, to pass -1 not 0 ensures all the
cases can be covered.

14 years agoAdded testcase for queue_stats.stp.
David Smith [Fri, 11 Jun 2010 20:30:32 +0000 (15:30 -0500)]
Added testcase for queue_stats.stp.

* testsuite/buildok/queue_stats-embedded.stp: New testcase.

14 years agoGot tty.stp working everywhere.
David Smith [Fri, 11 Jun 2010 20:26:46 +0000 (15:26 -0500)]
Got tty.stp working everywhere.

* tapset/tty.stp: Large update to get working on RHEL4, RHEL5,
  RHEL6(beta), f12, f13, and rawhide.
* testsuite/buildok/tty-detailed.stp: Renamed from
  testsuite/buildok/tty.stp and added more functions.
* testsuite/buildok/tty-resize.stp: Separate probe testcase since it can
  fail because of PR 1155 (can't find inline function arguments).
* testsuite/buildok/tty-embedded.stp: New testcase.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail the tty-resize.stp.

14 years agosdt.h: use /* c */ comments only
Frank Ch. Eigler [Fri, 11 Jun 2010 17:53:10 +0000 (13:53 -0400)]
sdt.h: use /* c */ comments only

... else -ansi / -pedantic tests fail

14 years agoauthors bump
Frank Ch. Eigler [Fri, 11 Jun 2010 17:21:02 +0000 (13:21 -0400)]
authors bump

14 years agomove #if 0 around STAPCONF_PROBE_KERNEL around loc2c
Frank Ch. Eigler [Fri, 11 Jun 2010 17:18:12 +0000 (13:18 -0400)]
move #if 0 around STAPCONF_PROBE_KERNEL around loc2c

* buildrun.cxx: Always run autotest-kernel-probe.c.
* runtime/loc2c-runtime.h: Disable use of these probe functions here.

14 years agouse probe_kernel_read for build-id verification if available
Tony Jones [Fri, 11 Jun 2010 17:15:50 +0000 (13:15 -0400)]
use probe_kernel_read for build-id verification if available

Post 1.1 I've been seeing the following on i686 (x86_64 is ok):

ERROR: Build-id mismatch: "kernel" vs. "vmlinux-2.6.34-8-default.debug" byte 0 (0x00 vs 0x00) rc -14 -14
Pass 5: run failed.  Try again with another '--vp 00001' option.

as per irc discussion, following test diff fixed the problem on i686, I've not
tested on any other archs.

14 years agoDefine the sdt probe type in one place.
Stan Cox [Fri, 11 Jun 2010 15:18:29 +0000 (11:18 -0400)]
Define the sdt probe type in one place.

tapsets.cxx (sdt_query): Move stap_sdt_probe_type from here...
sdt.h: ...to here.

14 years agoConsolidate task_finder/vma tracker initialization.
Mark Wielaard [Fri, 11 Jun 2010 12:57:13 +0000 (14:57 +0200)]
Consolidate task_finder/vma tracker initialization.

After the task_finder is started, no new targets can reliably be added.
So make sure that all registration/enabling of the task_finder and/or
the vma tracker is done in one place (task_finder_derived_probe_group).

* task_finder.h: Defined enable_vma_tracker and vma_tracker_enabled.
* task_finder.cxx: Implement enable_vma_tracker and vma_tracker_enabled.
  (task_finder_derived_probe_group::emit_module_init): Also handle
  vma_tracker.
* elaborate.cxx (visit_embeddedcode): Use enable_vma_tracker and
  vma_tracker_enabled.
* session.h (systemtap_session): Remove need_vma_tracker.
* session.cxx (initialize): Remove need_vma_tracker initialization.
  (parse_cmdline): Enable vma tracking early when -d user mode module found.
* translate.cxx (c_unparser::emit_module_init): Don't try to start
  task finder and vma tracker here.
  (c_unparser::emit_module_exit): Don't try to stop task finder here.
  (emit_symbol_data_done): Don't emit static _stp_need_vma_tracker.
* runtime/sym.h: Remove static _stp_need_vma_tracker.
* runtime/sym.c (_stp_sym_init): Return error when registration failed.
* runtime/task_finder.c (stap_register_task_finder_target): Add sanity
  checks to detect double registration or registration after task finder
  was already started.
  (stap_start_task_finder): Sanity check that task finder wasn't already
  started.

14 years agoDon't double print error message on bad stap command line option.
Mark Wielaard [Fri, 11 Jun 2010 12:20:08 +0000 (14:20 +0200)]
Don't double print error message on bad stap command line option.

Bug introduced in commit db1354. getopt_long will already have printed
an appropriate error message in case of an invalid/unrecognized option
or an option missing an required argument. So don't print another error
message in that case.

* session.cxx (parse_cmdline): Silently handle '?' case.

14 years agoPR11690: Remove a dtrace debug-print, and fix probe_perf
Josh Stone [Thu, 10 Jun 2010 23:05:29 +0000 (16:05 -0700)]
PR11690: Remove a dtrace debug-print, and fix probe_perf

Stan's commit 278c975 fixes the core issue; I'm just polishing...

* dtrace.in: Comment out the debug-print before calling gcc.
* scripts/probe_perf/bench.sh: Pass -DSTAP_SDT_V2 to dtrace.

14 years agoFix tests for -DSTAP_SDT_V2.
Stan Cox [Thu, 10 Jun 2010 21:40:29 +0000 (17:40 -0400)]
Fix tests for -DSTAP_SDT_V2.

dtrace -G -s foo.d builds foo.o so it must pass -DSTAP_SDT_V2 to gcc.  Add a -D
flag (sun dtrace also has a -D flag) and pass that to the gcc invocation.

* dtrace.in (semaphore_def_append): Make -DSTAP_SDT_V1 the default.
(generate): Likewise.
(main):  Add -D and pass to cpp and gcc.
* sdt_misc.exp: Run dtrace every iteration and pass it -DSTAP_SDT_V2.

14 years agoCorrect the hex-spelling of UPB2
Josh Stone [Thu, 10 Jun 2010 21:13:31 +0000 (14:13 -0700)]
Correct the hex-spelling of UPB2

14 years agoGet rid of probe_perf tmps, and use a single awk
Josh Stone [Thu, 10 Jun 2010 20:11:07 +0000 (16:11 -0400)]
Get rid of probe_perf tmps, and use a single awk

14 years agoFix 3-way merge result.
Stan Cox [Thu, 10 Jun 2010 13:49:05 +0000 (09:49 -0400)]
Fix 3-way merge result.

* sdt.h: Remove extra hunk from merge.

14 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Thu, 10 Jun 2010 13:40:01 +0000 (09:40 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

* 'master' of git://sources.redhat.com/git/systemtap:
  Tighten static user probe point operand contraints from "g" to "ro"

14 years agofix !CONFIG_FRAME_POINTER, !CONFIG_UTRACE case
Tony Jones [Thu, 10 Jun 2010 13:38:14 +0000 (09:38 -0400)]
fix !CONFIG_FRAME_POINTER, !CONFIG_UTRACE case

In a kernel without FRAME_POINTERS (using the DWARF UNWINDER) and without
UTRACE I see the following in latest git master:
[...]
In file included from /tmp/stap/share/systemtap/runtime/stack.c:56:0,
                 from /tmp/stapPHqTen/stap_12068.c:52:
/tmp/stap/share/systemtap/runtime/stack-i386.c: In function "__stp_stack_print":
/tmp/stap/share/systemtap/runtime/stack-i386.c:69:25: error: implicit declaration of function "uprobe_get_pc".

AFAICT the autoconf test should result in STAPCONF_UPROBE_GET_PC=0 for the
case where CONFIG_UTRACE is unset since UPROBES requires UTRACE.

Signed-off-by: Tony Jones <tonyj@suse.de>
14 years agoTighten static user probe point operand contraints from "g" to "ro"
Stan Cox [Thu, 10 Jun 2010 13:36:40 +0000 (09:36 -0400)]
Tighten static user probe point operand contraints from "g" to "ro"

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