]> sourceware.org Git - systemtap.git/log
systemtap.git
8 years agoAdd an 'compatible_version' interactive mode option.
David Smith [Tue, 26 Jan 2016 16:31:56 +0000 (10:31 -0600)]
Add an 'compatible_version' interactive mode option.

* interactive.cxx: Mark all unused parameters with '__attribute
  ((unused))' to make gcc 5 happy. Add a 'compatible_version' option.

8 years agoMerge remote-tracking branch 'origin/master' into dsmith/interactive
David Smith [Mon, 25 Jan 2016 20:26:13 +0000 (14:26 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/interactive

8 years agoImprove mlock2 tapset support and add testsuite support.
David Smith [Mon, 25 Jan 2016 20:24:56 +0000 (14:24 -0600)]
Improve mlock2 tapset support and add testsuite support.

* tapset/linux/nd_syscalls.stp (nd_syscall.mlock2): Fix argument handling
  and add missing comma between arguments in 'argstr'.
* tapset/linux/syscalls.stp (syscall.mlock2): Add missing comma between
  arguments in 'argstr'.
* testsuite/buildok/aux_syscalls-embedded.stp: Add _stp_mlock2_str()
  compile test.
* testsuite/buildok/nd_syscalls-detailed.stp: Add 'mlock2' compile test.
* testsuite/buildok/syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/mmap.c: Add mlock2 support to test case.

8 years agoAutoreconf following commit 0b03204.
Martin Cermak [Mon, 25 Jan 2016 10:29:27 +0000 (11:29 +0100)]
Autoreconf following commit 0b03204.

8 years agoFix PR19502 by adding the "GETTING HELP" section to the stap.1 manpage.
Martin Cermak [Mon, 25 Jan 2016 10:25:56 +0000 (11:25 +0100)]
Fix PR19502 by adding the "GETTING HELP" section to the stap.1 manpage.

Move stap.1 to stap.1.in so that it can contain autoconf macros.  Add
the "GETTING HELP" section to it.  Do the same with the czech version
of the manpage.

8 years agoUse -Wextra. Fix some warnings.
Mark Wielaard [Sun, 24 Jan 2016 19:59:13 +0000 (20:59 +0100)]
Use -Wextra. Fix some warnings.

Fix some warnings (mostly -Wunused-parameter) so that we can enable -Wextra.
Tested against GCC5 and GCC6.

Regenerate auto* and po files.

8 years agoexamples-index-gen.pl: Remove duplicate my $usage definition.
Mark Wielaard [Sun, 24 Jan 2016 14:31:39 +0000 (15:31 +0100)]
examples-index-gen.pl: Remove duplicate my $usage definition.

"my" variable $usage masks earlier declaration in same scope at
  examples-index-gen.pl line 106.

8 years agoAdd tapset support for mlock2 syscall in 4.4
Lukas Berk [Fri, 22 Jan 2016 23:40:33 +0000 (18:40 -0500)]
Add tapset support for mlock2 syscall in 4.4

aux_syscalls.stp - flags to str function
nd_syscalls.stp - add kprobe based syscall probe point
syscalls.stp - add kernel function based syscall probe point

8 years agoPR19510 partial fix - more '-p1' output improvements.
David Smith [Fri, 22 Jan 2016 20:10:19 +0000 (14:10 -0600)]
PR19510 partial fix - more '-p1' output improvements.

* elaborate.cxx (create_monitor_function): Initialize 'unmangled_name'
  when a vardecl gets created.
  (monitor_mode_init): Ditto.
  (monitor_mode_write): Ditto.
  (symresolution_info::visit_symbol): Ditto.
  (stable_functioncall_visitor::visit_functioncall): Ditto.

8 years agoOutput semi-colons between statements when printing a script.
David Smith [Fri, 22 Jan 2016 20:05:30 +0000 (14:05 -0600)]
Output semi-colons between statements when printing a script.

* staptree.cxx (print): Add a semi-colon after every statement in a
  block. This helps when using parser output as input back to systemtap
  by separating statements appropriately.
* testsuite/systemtap.base/optim_arridx.exp: Update test to expect a
  semi-colon after statements in parser output.
* testsuite/systemtap.server/client_args.exp: Ditto.

8 years agoMerge remote-tracking branch 'origin/master' into dsmith/interactive
David Smith [Fri, 22 Jan 2016 17:28:45 +0000 (11:28 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/interactive

8 years agoFix systemtap.examples/memory/hw_watch_{addr,sym}.stp.
David Smith [Fri, 22 Jan 2016 17:20:06 +0000 (11:20 -0600)]
Fix systemtap.examples/memory/hw_watch_{addr,sym}.stp.

* testsuite/systemtap.examples/memory/hw_watch_addr.stp: Only try hardware
  breakpoints (i.e. 'kernel.data') probes if CONFIG_HAVE_HW_BREAKPOINT is
  on.
* testsuite/systemtap.examples/memory/hw_watch_sym.stp: Ditto.

8 years agoAlign czech program strings terminology to reviewed manpages.
Martin Cermak [Fri, 22 Jan 2016 14:05:52 +0000 (15:05 +0100)]
Align czech program strings terminology to reviewed manpages.

8 years agoLocalize a few basic main.cxx strings.
Martin Cermak [Fri, 22 Jan 2016 13:52:45 +0000 (14:52 +0100)]
Localize a few basic main.cxx strings.

8 years agotapset documentation: standardize
Frank Ch. Eigler [Fri, 22 Jan 2016 00:49:46 +0000 (19:49 -0500)]
tapset documentation: standardize

Some generated man pages had an erroneous "IBM" in the footer, and
inconsistent datestamping or capitalization.  The man pages look more
uniform now.

8 years agoadd generated po/cs.gmo
Frank Ch. Eigler [Thu, 21 Jan 2016 21:54:17 +0000 (16:54 -0500)]
add generated po/cs.gmo

8 years agostrace.stp sample tweak
Frank Ch. Eigler [Thu, 21 Jan 2016 21:29:22 +0000 (16:29 -0500)]
strace.stp sample tweak

A small fixed lookup array only needs a few entries allocated.

8 years agoFix systemtap.base/utrace_syscall_args.stp for s390x kernels >= 2.6.33.
David Smith [Thu, 21 Jan 2016 22:13:39 +0000 (16:13 -0600)]
Fix systemtap.base/utrace_syscall_args.stp for s390x kernels >= 2.6.33.

8 years agoPR19510 partial fix - improve '-p1' output.
David Smith [Thu, 21 Jan 2016 19:54:50 +0000 (13:54 -0600)]
PR19510 partial fix - improve '-p1' output.

* testsuite/systemtap.pass1-4/parse-semok.exp: New testcase.
* staptree.h: Add the 'unmangled_name' field to the 'symboldecl' class.
* staptree.cxx (vardecl::print): Print the 'unmangled_name' field, instead
  of the 'name' field (which could have been mangled).
  (vardecl::printsig): Ditto.
  (functiondecl::print): Ditto.
  (functiondecl::printsig): Ditto.
* parse.cxx (do_parse_global): Set the new 'unmangled_name' field.
  (do_parse_functiondecl): Ditto.
* elaborate.cxx (add_global_var_display): Use the 'unmangled_name' field
  instead of 'tok->content'.

8 years agoAutoreconf after adding czech manpages.
Martin Cermak [Thu, 21 Jan 2016 16:03:53 +0000 (17:03 +0100)]
Autoreconf after adding czech manpages.

8 years agoAdd czech version of stap.1 and stapprobes.3stap manpages.
Martin Cermak [Thu, 21 Jan 2016 16:02:52 +0000 (17:02 +0100)]
Add czech version of stap.1 and stapprobes.3stap manpages.

8 years agoPreparation for the czech localization of manpages.
Martin Cermak [Thu, 21 Jan 2016 15:57:25 +0000 (16:57 +0100)]
Preparation for the czech localization of manpages.

Following changes were inspired by the shadow utils project:
https://github.com/shadow-maint/shadow

configure.ac: Add man/cs/Makefile to AC_CONFIG_FILES.
man/Makefile.am: Include processing the cs folder with automake.
man/cs/Makefile.am: Add the cs folder to the mandir.
systemtap.spec: Include localized manpages in the expected file list.

The specfile change aims to also cover possible future
localizations that might include the "region" specification.

8 years agotapsets.cxx: fix indentation to appease GCC 6
Jonathan Lebon [Thu, 21 Jan 2016 01:10:44 +0000 (20:10 -0500)]
tapsets.cxx: fix indentation to appease GCC 6

The new -Wmisleading-indentation complains about the indentation of
these braces because of the if-statement right before. We can squash
that warning by simply unindenting the braces.

Whether this scoping should even exist is another question. I like it
there because that whole scope is related to variable expansion. It
should probably be moved to a function.

8 years agoFix PR9497 by updating the runtime to handle linux 4.4 commit 7523e4dc50.
David Smith [Wed, 20 Jan 2016 21:13:44 +0000 (15:13 -0600)]
Fix PR9497 by updating the runtime to handle linux 4.4 commit 7523e4dc50.

* runtime/linux/autoconf-module_layout.c: New autoconf test.
* buildrun.cxx (compile_pass): Add 'module_layout' autoconf test for new
  module_layout structure.
* runtime/linux/alloc.c: Handle module struct changes in rawhide.
* runtime/linux/print.c (_stp_print_kernel_info): Ditto.
* runtime/transport/symbols.c (_stp_module_update_self): Ditto.
* tapset/linux/context.stp (module_size): Ditto.

8 years agoGet systemtap.base/at_var.exp to pass on s390x.
David Smith [Wed, 20 Jan 2016 16:48:55 +0000 (10:48 -0600)]
Get systemtap.base/at_var.exp to pass on s390x.

* testsuite/systemtap.base/at_var.exp: Make changes needed to get test to
  pass on s390x. On s390x all syscalls args are longs, so you can't print
  them as a struct.
* testsuite/systemtap.base/at_var.stp: Ditto.

8 years agoPR17741: expand try_assign macro description
Abegail Jakop [Tue, 19 Jan 2016 22:43:56 +0000 (17:43 -0500)]
PR17741: expand try_assign macro description

8 years agoPR17741: add a try_assign macro
Abegail Jakop [Tue, 19 Jan 2016 20:35:09 +0000 (15:35 -0500)]
PR17741: add a try_assign macro

add a try_assign macro that stores in a provided variable the value
from evaluating the body of the try or catch statement.

tapset/try_assign.stpm:    define a try_assign macro
testsuite/../try_assign.*: basic testcase checking that the try_assign
macro's functionality works as expected.

8 years agoImprove interactive mode script display.
David Smith [Mon, 18 Jan 2016 17:15:28 +0000 (11:15 -0600)]
Improve interactive mode script display.

* interactive.cxx (list_cmd): Display scripts so that the colon following
  the line numbers line up no matter how many lines are in the script.

8 years agostap.1: highlight %.*M formatting tip
Frank Ch. Eigler [Mon, 18 Jan 2016 14:29:16 +0000 (09:29 -0500)]
stap.1: highlight %.*M formatting tip

It's common enough, and easy enough to get wrong.

8 years agoAdd the interactive "edit" command.
David Smith [Fri, 15 Jan 2016 20:29:43 +0000 (14:29 -0600)]
Add the interactive "edit" command.

* interactive.cxx (edit_cmd): New class.
  (interactive_mode): Add 'edit_cmd' to the command vector.

8 years agoUpdated optim_arridx.exp for the interactive branch.
David Smith [Fri, 15 Jan 2016 17:57:22 +0000 (11:57 -0600)]
Updated optim_arridx.exp for the interactive branch.

8 years agoMerge remote-tracking branch 'origin/master' into dsmith/interactive
David Smith [Fri, 15 Jan 2016 17:34:07 +0000 (11:34 -0600)]
Merge remote-tracking branch 'origin/master' into dsmith/interactive

8 years agoFix warning message typo in runtime/unwind.c.
David Smith [Thu, 14 Jan 2016 22:53:34 +0000 (16:53 -0600)]
Fix warning message typo in runtime/unwind.c.

8 years agoAdd new stress test case - parallel_exec.exp.
Zhou Wenjian [Thu, 14 Jan 2016 21:29:00 +0000 (15:29 -0600)]
Add new stress test case - parallel_exec.exp.

8 years agoFixed typo in last all_kernel_functions.exp change.
David Smith [Thu, 14 Jan 2016 19:40:57 +0000 (13:40 -0600)]
Fixed typo in last all_kernel_functions.exp change.

8 years agoFix PR19470 by updating process_by_pid.exp for arches without .plt probes.
David Smith [Thu, 14 Jan 2016 16:21:23 +0000 (10:21 -0600)]
Fix PR19470 by updating process_by_pid.exp for arches without .plt probes.

* testsuite/systemtap.base/process_by_pid_no_plt.stp: New test script for
  process_by_pid.exp for platforms without .plt probes.
* testsuite/systemtap.base/process_by_pid.exp: Use process_by_pid.stp if
  this platform supports .plt probes, use process_by_pid_no_plt.stp
  otherwise.

8 years agoLocalization files regeneration.
Martin Cermak [Thu, 14 Jan 2016 10:09:19 +0000 (05:09 -0500)]
Localization files regeneration.

8 years agoCzech translation of program strings. Initial version.
Martin Cermak [Thu, 14 Jan 2016 10:06:30 +0000 (05:06 -0500)]
Czech translation of program strings. Initial version.

8 years agoUpdate pthreadprobes.exp for RHEL7 ppc64.
David Smith [Wed, 13 Jan 2016 18:03:33 +0000 (12:03 -0600)]
Update pthreadprobes.exp for RHEL7 ppc64.

* testsuite/systemtap.exelib/pthreadprobes.exp: Handle some versions of
  glibc (such as RHEL7 ppc64) where the "cond_timedwait" mark doesn't
  exist.

8 years agoman/stap.1: A few typo fixes and tiny specifications.
Martin Cermak [Wed, 13 Jan 2016 14:35:21 +0000 (15:35 +0100)]
man/stap.1: A few typo fixes and tiny specifications.

8 years agoUpdate tracepoint support for 4.4.0 aarch64 kernels.
David Smith [Tue, 12 Jan 2016 17:37:57 +0000 (11:37 -0600)]
Update tracepoint support for 4.4.0 aarch64 kernels.

* tapsets.cxx (tracepoint_extra_decls): Add more decls.
  (tracepoint_builder::init_dw): Add another header file path.

8 years agoMove testsuite 'genload' function to its own file.
Zhou Wenjian [Tue, 12 Jan 2016 15:00:10 +0000 (09:00 -0600)]
Move testsuite 'genload' function to its own file.

* testsuite/lib/genload.exp: Move code from systemtap.stress/current.exp
  to its own file so it can be used multiple places.
* testsuite/config/unix.exp: Load genload.exp.
* testsuite/systemtap.stress/current.exp: Move 'genload' function to its
  own file.
* testsuite/systemtap.stress/all_kernel_functions.exp: Use 'genload'
  function (instead of having a copy).

8 years agoPR12414: Missing return value is not reported
Felix Lu [Mon, 11 Jan 2016 21:46:36 +0000 (16:46 -0500)]
PR12414: Missing return value is not reported

The default behavior returns a 0 or "" which is now documented.
Analyzing the AST right now for termination without reaching a
return seems like a waste. This could be easily done if we had
a control flow graph.

8 years agoFix PR19265 by adding code to handle relative module paths.
David Smith [Mon, 11 Jan 2016 21:26:59 +0000 (15:26 -0600)]
Fix PR19265 by adding code to handle relative module paths.

* tapsets.cxx (handle_module_token): New function that handles relative
  module paths.
  (dwarf_builder::build): Call handle_module_token().
  (kprobe_builder::build): Ditto. Simplify module names.

8 years agoRemoved unneeded file in last commit.
David Smith [Mon, 11 Jan 2016 13:49:21 +0000 (07:49 -0600)]
Removed unneeded file in last commit.

8 years agoFix PR19396 by updating tracepoint query code to find more tracepoints.
David Smith [Fri, 8 Jan 2016 21:45:41 +0000 (15:45 -0600)]
Fix PR19396 by updating tracepoint query code to find more tracepoints.

* tapsets.cxx (tracepoint_extra_decls): Add new parameter to let the
  function know if we're compiling a tracequery module or not. Handle
  several odd trace headers that get unintentially included. Add a few
  tweaks for a few more trace headers.
  (emit_module_decls): Update the call to tracepoint_extra_decls.
  (get_tracequery_modules): Ditto.
  (init_dw): Add a few more paths of potential places to look for
  tracepoint headers.
* session.h: Add new 'kernel_extra_cflags' member variable to the session
        object.
* session.cxx (systemtap_session): Initialize 'kernel_extra_cflags'.
* buildrun.cxx (compile_pass): Add in custom extra cflags.
  (make_tracequeries): Ditto.
* scripts/tracepoint-diff: Ignore more tracepoints we can't use.
* testsuite/systemtap.base/tracepoints.exp: Save the tracepoint script to
  a file, since it can grow large than the command line will support on a
  system with lots of tracepoints.
* testsuite/systemtap.base/tracepoints_list.exp: New testcase that makes
  sure that all tracepoints found by perf can be seen by systemtap.

8 years agoRestore the dedupe logic for tracepoint headers
Josh Stone [Thu, 7 Jan 2016 01:12:18 +0000 (17:12 -0800)]
Restore the dedupe logic for tracepoint headers

With and without this dedupe logic, I see no difference in the
tracepoints found on Fedora 23, RHEL7, and RHEL6.  But it is faster
since we avoid processing headers found in both the kernel source tree
and build tree.

The way the header paths are normalized for #include, I don't see how
skipping that dedupe logic was supposed to help find more tracepoints.
I've added a comment pointing to what other functions would need to
change as well for that to have a more tangible effect, in case we
decide to compare file contents instead of just paths, for instance.

See also commit b1966849ecf that introduced the "#if 0" I'm removing.
The specific tracepoints mentioned in irq_vectors.h are still fine.

8 years agoPR9968: Share global variable between embedded C and script
Felix Lu [Wed, 6 Jan 2016 15:41:35 +0000 (10:41 -0500)]
PR9968: Share global variable between embedded C and script

Embedded-C functions and blocks can now use the
STAP_GLOBAL_{GET,SET}_* macros to access script level global variables.

* NEWS: description
* doc/langref.text: description + added section for stable and
  unmodified-fnargs pragmas which was only in man/stap.1
* staptree.cxx: scan for pragmas in varuse_collecting_visitor
  visit_embeddedcode and visit_embedded_expr to allow proper locks
  to be emitted
* translate.cxx: c_unparser visit_embeddedcode and visit_embedded_expr
  generates the needed macros

8 years agoUpdated scripts/tracepoint-diff.
David Smith [Wed, 23 Dec 2015 18:01:44 +0000 (12:01 -0600)]
Updated scripts/tracepoint-diff.

* scripts/tracepoint-diff: Updated to handle the fact that systemtap now
  lists kernel tracepoints by category.

8 years agoAdd a variable definition and buffer size test cases.
Zhou Wenjian [Wed, 23 Dec 2015 17:57:11 +0000 (11:57 -0600)]
Add a variable definition and buffer size test cases.

* testsuite/semko/var_definition.stp: New variable definition test case.
* testsuite/systemtap.base/stap_bufsize.exp: New test case for buffer size.

8 years agoAdd more control limits test cases.
Zhou Wenjian [Wed, 23 Dec 2015 16:33:39 +0000 (10:33 -0600)]
Add more control limits test cases.

* testsuite/systemtap.base/control_limits.exp: Add more control limits
  test cases.
* testsuite/systemtap.base/control_limits.stp: Ditto.

8 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Wed, 23 Dec 2015 16:33:06 +0000 (10:33 -0600)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

8 years agoAdd vim syntax highlighting for STAP_PRINTF macro
Felix Lu [Wed, 23 Dec 2015 15:54:18 +0000 (10:54 -0500)]
Add vim syntax highlighting for STAP_PRINTF macro

8 years agoAdd test cases for '-p', '-k', and type mismatches.
Zhou Wenjian [Wed, 23 Dec 2015 15:48:47 +0000 (09:48 -0600)]
Add test cases for '-p', '-k', and type mismatches.

* testsuite/parseko/cmdline24.stp: Add a case for '-p'.
* testsuite/semko/typemismatch5.stp: Add a type mismatch case.
* testsuite/systemtap.base/temp-directory.exp: Add a test case for '-k'.

8 years agoImprove tracepoint support.
David Smith [Tue, 22 Dec 2015 21:26:07 +0000 (15:26 -0600)]
Improve tracepoint support.

* tapsets.cxx (tracepoint_extra_decls): Update the extra declarations
  needed to find the tracepoints.

8 years agoPR19216 fix: Do some code renaming.
David Smith [Mon, 21 Dec 2015 17:25:41 +0000 (11:25 -0600)]
PR19216 fix: Do some code renaming.

* runtime/linux/kprobes.c: Rename 'stap_dwarf_kprobe' to 'stap_kprobe' and
  'stap_dwarf_probe' to 'stap_kprobe_probe', since those structures aren't
  just related to dwarf-based kprobes anymore.
* tapsets.cxx: Ditto.

8 years agoFix PR19216 by merging the dwarf and non-dwarf kprobe support code.
David Smith [Mon, 21 Dec 2015 15:30:38 +0000 (09:30 -0600)]
Fix PR19216 by merging the dwarf and non-dwarf kprobe support code.

* tapsets.cxx: Move common kprobe code to the new
  'generic_kprobe_derived_probe' class and make the 'dwarf_derived_probe'
  and 'kprobe_derived_probe' classes derive from it. Replace the
  'dwarf_derived_probe_group' and 'kprobe_derived_probe_group' classes with
  the 'generic_kprobe_derived_probe_group' class.
* session.cxx (systemtap_session): Replaced the 'dwarf_derived_probes' and
  'kprobe_derived_probes' probe groups with the
  'generic_kprobe_derived_probes' probe group.
* session.h: Ditto.
* runtime/linux/kprobes.c (stapkp_prepare_kprobe): Set up the kprobe
  'symbol_name' field.
  (stapkp_prepare_kretprobe): Ditto.
  (stapkp_symbol_callback): Handle symbol_name+offset probes in the kernel
  and modules.
  (stapkp_init): Handle NULL and empty module names.
* testsuite/systemtap.base/modules_out_of_tree.exp: Add dwarfless probing
  tests and relative path tests.

8 years agoRemove extranious line from the generated label.c file for label.exp test
William Cohen [Thu, 17 Dec 2015 21:54:54 +0000 (16:54 -0500)]
Remove extranious line from the generated label.c file for label.exp test

The additional line added by commit 2d703227f41f6625f6041b1354010cf1530099ae
was messing up the matching.  Removed the beginning blank line so that the
line number matched up again.

8 years agoUtilize new probe point expansion.
Felix Lu [Thu, 17 Dec 2015 20:53:11 +0000 (15:53 -0500)]
Utilize new probe point expansion.

Selected sample scripts now use the brace expansion feature to
simplify the probe point specification.

8 years agoPR16672: Support brace expansion for probe points
Felix Lu [Tue, 15 Dec 2015 15:34:14 +0000 (10:34 -0500)]
PR16672: Support brace expansion for probe points

parse_probe_point() modified to parse the entire alias or
location list instead of one at a time. The expansion of
curly braces is done during parsing.

* NEWS: short blurb
* doc/langref.tex: documentation
* man/stapprobes.3stap: documentation
* parse.cxx: parse_probe_point() renamed to parse_probe_points(),
  new functions parse_component() and parse_components() used for
  parsing subsections of probe point.
* testsuite/*: test it

8 years agoIncrease bz1027459.exp timeout to allow slow machines to test this.
William Cohen [Thu, 17 Dec 2015 21:16:22 +0000 (16:16 -0500)]
Increase bz1027459.exp timeout to allow slow machines to test this.

8 years agostapdyn: use the simpler DYNINST_9_1 macro for callback changes
Josh Stone [Tue, 15 Dec 2015 20:26:37 +0000 (12:26 -0800)]
stapdyn: use the simpler DYNINST_9_1 macro for callback changes

8 years agoman error::pass2: mention prologue-searching for unavailable $context
Frank Ch. Eigler [Tue, 15 Dec 2015 02:56:24 +0000 (21:56 -0500)]
man error::pass2: mention prologue-searching for unavailable $context

8 years agoPR19362: fix doubled locations in probe copy-ctor
Josh Stone [Mon, 14 Dec 2015 22:00:01 +0000 (14:00 -0800)]
PR19362: fix doubled locations in probe copy-ctor

Commit 1341a03cc550835d5ddab35bb9333e43bd623714 moved most of the body
of the probe::probe copy constructor to its initializer list.  However,
the push to locations was accidentally left, so this vector was both
initialized and appended, doubling all probes from here.  This showed up
in library.exp SDT probes which counted twice too many matches.

8 years agounwind diagnostic improvements
Frank Ch. Eigler [Sat, 12 Dec 2015 16:01:02 +0000 (11:01 -0500)]
unwind diagnostic improvements

Add a heuristic for missing kernel unwindsyms to the runtime.
Tweak documentation to spell out --ldd is for userspace only.

Reported by: Nikolay Borisov <n.borisov@siteground.com>

8 years agoEnsure use of the function argument values from function entry in lwtools
William Cohen [Fri, 11 Dec 2015 20:49:40 +0000 (15:49 -0500)]
Ensure use of the function argument values from function entry in lwtools

On some machine such as powerpc64 and aarch64 function arguments are
passed using processor registers.  The compiler is free to use those
registers how it sees fit. Thus, the register value on function return
may differ from the original argument value on function entry.  To
ensure using the value from function entry the scripts use the
@entry() in the return probes.

8 years agoFix PR19358 by updating netfilter support for 4.4 kernels.
David Smith [Fri, 11 Dec 2015 20:45:45 +0000 (14:45 -0600)]
Fix PR19358 by updating netfilter support for 4.4 kernels.

* tapset-netfilter.cxx (emit_module_decls): Handle kernel v4.4 netfilter
  changes.
* runtime/linux/autoconf-netfilter-4_4.c: New autoconf test to test for
  kernel v4.4 netfilter changes.
* buildrun.cxx (compile_pass): Add new autoconf test.

8 years agostapdyn: prepare for the dyninst 9.1 library callback change
Josh Stone [Fri, 11 Dec 2015 03:17:56 +0000 (19:17 -0800)]
stapdyn: prepare for the dyninst 9.1 library callback change

The new API uses BPatch_object for the callback, because modules (~=CUs)
are now fully represented in shared objects too.  This is better, but we
need to keep fallback code for the old API too, using module->getObject().

8 years agostapdyn: re-poll dyninst directly before sleeping
Josh Stone [Fri, 11 Dec 2015 03:13:51 +0000 (19:13 -0800)]
stapdyn: re-poll dyninst directly before sleeping

The poll fd comes from proccontrol, but sometimes dyninstAPI pulls events
into its own queue without handling them yet.  If we then sleep in syscall
ppoll, we won't hear about those events until we hit the timeout.  We can
do a quick dyninst poll first to clear those out.

8 years agoFix typos in tapset/linux/arm/nd_syscalls.stp.
David Smith [Thu, 10 Dec 2015 18:58:39 +0000 (12:58 -0600)]
Fix typos in tapset/linux/arm/nd_syscalls.stp.

8 years agoAdd some support for older arm kernels.
Torsten Polle [Thu, 10 Dec 2015 18:56:29 +0000 (12:56 -0600)]
Add some support for older arm kernels.

* tapset/linux/arm/aux_syscalls.stp: Add support for arm kernels less than
  3.7.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/arm/syscalls.stp: Add support for [nd_]syscall.execve for
  arm kernels less than 3.7.
* tapset/linux/arm/nd_syscalls.stp: Ditto.

8 years agoMake 2 small syscall testsuite changes for arm.
David Smith [Thu, 10 Dec 2015 15:06:33 +0000 (09:06 -0600)]
Make 2 small syscall testsuite changes for arm.

* testsuite/systemtap.syscall/stat.c: Mark fstatat64 as covered.
* testsuite/systemtap.syscall/coverage.tcl: Add a few modifications for
  arm-based systems.

8 years agoAdd more arithmetic and map delete test cases.
Zhou Wenjian [Wed, 9 Dec 2015 21:38:52 +0000 (15:38 -0600)]
Add more arithmetic and map delete test cases.

* testsuite/systemtap.base/arith.stp: Add more cases.
* testsuite/systemtap.maps/ii.stp: Ditto.
* testsuite/systemtap.maps/ii.exp: Update for new test case.

8 years agoWorkaround PR19345 by not running the functioncallcount example on s390x.
David Smith [Wed, 9 Dec 2015 15:16:24 +0000 (09:16 -0600)]
Workaround PR19345 by not running the functioncallcount example on s390x.

* testsuite/systemtap.examples/profiling/functioncallcount.tcl: Don't run
  the functioncallcount example on s390x kernels less than 3.11.

8 years agostap-server coverity fix: check stat(2) rc
Frank Ch. Eigler [Tue, 8 Dec 2015 21:49:10 +0000 (16:49 -0500)]
stap-server coverity fix: check stat(2) rc

It's proper, so let's.

8 years agosystemtap.spec: disable py_auto_byte_compile:/usr/lib/rpm/brp-python-bytecompile
Frank Ch. Eigler [Tue, 8 Dec 2015 21:32:05 +0000 (16:32 -0500)]
systemtap.spec: disable py_auto_byte_compile:/usr/lib/rpm/brp-python-bytecompile

Failing python bytecompiles needlessly concern rpmdiff sometimes.

8 years agostap docs: syscalls.xml table to use simpler colwidth
Frank Ch. Eigler [Tue, 8 Dec 2015 20:25:42 +0000 (15:25 -0500)]
stap docs: syscalls.xml table to use simpler colwidth

Apparently some versions of xmlto / pdflatex or whatever choke on
the docbook-xml  colwidth="1*"  construct, so we use linear distances.

8 years agoRewrite and add type mismatch 'semko' tests.
Zhou Wenjian [Tue, 8 Dec 2015 19:18:55 +0000 (13:18 -0600)]
Rewrite and add type mismatch 'semko' tests.

* testsuite/semko/typemismatch.stp: Deleted. Replace by
  typemismatch[123].stp.
* testsuite/semko/typemismatch1.stp: New test case.
* testsuite/semko/typemismatch2.stp: Ditto.
* testsuite/semko/typemismatch3.stp: Ditto.
* testsuite/semko/typemismatch4.stp: Ditto.

8 years agosystemtap.spec: define empty dracut macro => %{nil}
Frank Ch. Eigler [Tue, 8 Dec 2015 16:20:51 +0000 (11:20 -0500)]
systemtap.spec: define empty dracut macro => %{nil}

RPM likes to have -some- macro body.

8 years agoi18n update
Frank Ch. Eigler [Tue, 8 Dec 2015 14:11:23 +0000 (09:11 -0500)]
i18n update

8 years agoAdd RHEL7.2 fixes for PR18889 so that we can probe module initializers.
David Smith [Fri, 4 Dec 2015 20:23:17 +0000 (14:23 -0600)]
Add RHEL7.2 fixes for PR18889 so that we can probe module initializers.

* runtime/linux/kprobes.c (stapkp_prepare_kprobe): If we have
  kallsyms_on_each_symbol(), just return if we don't have an address.
  (stapkp_prepare_kretprobe): Ditto.
  (stapkp_symbol_callback): New callback function for
  kallsyms_on_each_symbol() to convert symbol_name+offset probes into
  address probes. This works around a kernel bug and should be faster as
  well.
  (stapkp_init): Call kallsyms_on_each_symbol() when needed.
  (stapkp_refresh): Ditto.
* runtime/transport/symbols.c (_stp_module_notifier): Change to the new
  module refresh logic if the kernel version is 3.10 or higher.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Ditto.
* testsuite/systemtap.base/kmodule.exp: Only run the subtests that load
  the test kernel module after the systemtap module is loaded on systems
  that support module refreshes.

8 years agoAdd vim syntax highlight for new private keyword
Felix Lu [Fri, 4 Dec 2015 15:59:36 +0000 (10:59 -0500)]
Add vim syntax highlight for new private keyword

8 years agoAdd a comment about perf probes .hz field.
Felix Lu [Fri, 4 Dec 2015 15:18:37 +0000 (10:18 -0500)]
Add a comment about perf probes .hz field.

8 years agoAdd testcase for function definitions.
Zhou Wenjian [Fri, 4 Dec 2015 13:41:55 +0000 (07:41 -0600)]
Add testcase for function definitions.

* testsuite/systemtap.base/func_definition.exp: New test case.
* testsuite/systemtap.base/func_definition.stp: New test file.

8 years agoPR13820: timer.profile(NNN) variant using perf probes
Felix Lu [Wed, 2 Dec 2015 19:55:11 +0000 (14:55 -0500)]
PR13820: timer.profile(NNN) variant using perf probes

Add a probe point for profiling at given frequency.
The rate is only accurate up to 100 hertz since it is
implemented as an alias to perf probes.

* tapset-perfmon.cxx: new .hz(N) component
* tapset/timers.stp: timer.profile.freq alias for pattern matching

8 years agoUse main ELF file path if there is no separate debugfile in error messages.
Mark Wielaard [Tue, 1 Dec 2015 14:28:08 +0000 (15:28 +0100)]
Use main ELF file path if there is no separate debugfile in error messages.

* dwflpp.cxx (dwflpp::die_location_as_string): Use main ELF file if there
  is no debugfile to show the file path that the DIE came from.

8 years agoAdd more test cases to testsuite/systemtap.base/timers.exp.
Zhou Wenjian [Mon, 30 Nov 2015 22:44:16 +0000 (16:44 -0600)]
Add more test cases to testsuite/systemtap.base/timers.exp.

* testsuite/systemtap.base/timers.exp: update for new test cases
* testsuite/systemtap.base/timers.stp: add more test cases

8 years agoAdd testcase for "break" and "continue".
Zhou Wenjian [Mon, 30 Nov 2015 22:27:41 +0000 (16:27 -0600)]
Add testcase for "break" and "continue".

* testsuite/systemtap.base/break_and_continue.exp: New test case
* testsuite/systemtap.base/break_and_continue.stp: New test file

8 years agoFixed permissions on new parseko/semko tests.
David Smith [Mon, 30 Nov 2015 22:26:19 +0000 (16:26 -0600)]
Fixed permissions on new parseko/semko tests.

8 years agoperf tapset: add recent uapi/linux/perf_event.h bits
Frank Ch. Eigler [Mon, 30 Nov 2015 21:46:24 +0000 (16:46 -0500)]
perf tapset: add recent uapi/linux/perf_event.h bits

The perf_event_attr uapi has grown a few more predefined
event aliases.

8 years agoAdd 2 parse testcases.
Zhou Wenjian [Mon, 30 Nov 2015 21:36:17 +0000 (15:36 -0600)]
Add 2 parse testcases.

* testsuite/parseko/var_definition1.stp: New test case
* testsuite/parseko/var_definition2.stp: New test case

8 years agoAdd 'semko' testcase for timer probe.
Zhou Wenjian [Mon, 30 Nov 2015 21:25:42 +0000 (15:25 -0600)]
Add 'semko' testcase for timer probe.

* testsuite/semko/timer_hz_randomize.stp: New test case.

8 years agoFix BZ1285348 by updating systemtap's memory flag usage.
Jesper Brouer [Mon, 30 Nov 2015 17:24:29 +0000 (11:24 -0600)]
Fix BZ1285348 by updating systemtap's memory flag usage.

* runtime/linux/runtime_defines.h: Make sure __GFP_WAIT is defined.
* runtime/stp_utrace.c (utrace_task_alloc): Change GFP_IOFS to
  STP_ALLOC_FLAGS.
  (utrace_attach_task): Ditto.

8 years agostap.1: tweak foreach template text
Nan Xiao [Fri, 27 Nov 2015 02:33:37 +0000 (21:33 -0500)]
stap.1: tweak foreach template text

8 years agoAdd a nop_visitor, and use it for expression_is_functioncall
Josh Stone [Thu, 26 Nov 2015 00:31:09 +0000 (16:31 -0800)]
Add a nop_visitor, and use it for expression_is_functioncall

In expression_is_functioncall, it only cares if the immediate expression
is a functioncall, but the expression_visitor it was derived from would
fully traverse all other expressions.  All it really wanted was like a
visitor-patterned dynamic_cast.

The new nop_visitor better enables this.  It does nothing at all for any
node types, and then expression_is_functioncall can override just for the
functioncall it cares about.

(We haven't yet settled whether to prefer a visitor pattern like this,
or more direct virtual calls like expression::is_symbol, or just plain
dynamic_cast<>.  Try to avoid the need for downcasts if possible.)

8 years agoRemove functioncall::var_assigned_to_retval
Josh Stone [Wed, 25 Nov 2015 22:10:17 +0000 (14:10 -0800)]
Remove functioncall::var_assigned_to_retval

It's unusual to have a value specific to one visitor stored in the tree
node itself.  This particular value is only used by c_unparser.  Make it
a c_unparser member instead, saved and restored as necessary to allow
for nested calls.

8 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Josh Stone [Wed, 25 Nov 2015 01:26:03 +0000 (17:26 -0800)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

8 years agoPR18884 bonus: optimize tmps in more places
Josh Stone [Wed, 25 Nov 2015 01:23:25 +0000 (17:23 -0800)]
PR18884 bonus: optimize tmps in more places

Anywhere a tmpvar is subject to a single assignment, use the new
c_assign which can use an override with literal values.

8 years agoPR18884: skip tmps for any literal, not by tok->type
Josh Stone [Wed, 25 Nov 2015 01:12:35 +0000 (17:12 -0800)]
PR18884: skip tmps for any literal, not by tok->type

Some literal expressions get created dynamically, like const-folding an
expression of two literals.  Those will probably not have a tok->type
that looks like a literal, but they're still reasonable candidates to
skip temporary storage and output directly into C.

Add a new c_assign for any tmpvar=expression, which will check for
literals to override the tmp, or else assign them as normal.  Literals
are detected with a dynamic_cast of the expression, without looking at
the token at all.  In many places that were roughly doing this based on
tok->type, use the new c_assign to handle it automatically.

The new test transok/literal_tmp.stp compares the PR18884 examples,
asserting that they now have *exactly* the same generated code.

8 years agoRestrict optimization of literals in "%s\n" to streams only
Josh Stone [Tue, 24 Nov 2015 22:55:56 +0000 (14:55 -0800)]
Restrict optimization of literals in "%s\n" to streams only

This "use_print" optimization is only effective for printing to streams
with _stp_print().  Then a literal string argument to "%s\n" can just
have that literal token-pasted with the newline string.  But when
printing to strings, like sprintln, that optimization isn't actually
taken, so it was getting the newline twice.

Add new tests with sprint and sprintln on string literals, then clean up
the code that does the optimization -- for streams only.

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