]> sourceware.org Git - systemtap.git/log
systemtap.git
8 years agoExtend global_end.exp to cover private globals too.
Martin Cermak [Wed, 11 Nov 2015 09:40:02 +0000 (10:40 +0100)]
Extend global_end.exp to cover private globals too.

8 years agoFix synthetic probes generation for written and unread private globals.
Martin Cermak [Wed, 11 Nov 2015 09:23:16 +0000 (10:23 +0100)]
Fix synthetic probes generation for written and unread private globals.

Mangling a private global happens based on the name of the file where the
variable got defined.  Stap automatically prints written and unread globals
and private globals at the end of the session.  For autogeneration purposes
of respective derived synthetic probes, we need to keep track of the file
where given variable got defined.

8 years agoAvoid undefined behavior in get_number_param
Josh Stone [Wed, 11 Nov 2015 02:03:08 +0000 (18:03 -0800)]
Avoid undefined behavior in get_number_param

An uninitialized assignment led the compiler to assume it must be
initialized after all, which led to an optimization reversing the
conditions of an '&&'.  This triggered valgrind when the condition
actually was uninitialized after all.  See GCC PR68281.

Ditch the long and long long get_number_param for just int64_t, which is
just a pass-through to get_param.  A few fields are now int64_t to
match, so they can never truncate input values on 32-bit systems.  The
other Dwarf_Addr get_number_param is now careful to only copy good
values from get_param.

Just to be paranoid, all base_query and dwarf_query POD members are now
zeroed in the initializer lists, even when the constructor will set a
better value right away.

8 years agoMark selected internal tapset global vars as '@__private30'.
Martin Cermak [Tue, 10 Nov 2015 07:32:05 +0000 (08:32 +0100)]
Mark selected internal tapset global vars as '@__private30'.

Mark tapset global vars, that are only intended to be used
internally within given tapset, as '@__private30'.  This
restriction appears to have no imparct from the testsuite
perspective.  However, it's still possible that some user
script may rely on one of those.  This restriction can be
worked around using 'stap --compatible=2.9' setting.

8 years agoFix parsing multiple, comma separated, private global vars.
Martin Cermak [Tue, 10 Nov 2015 07:20:26 +0000 (08:20 +0100)]
Fix parsing multiple, comma separated, private global vars.

8 years agoFix several uninitialized class members
Josh Stone [Tue, 10 Nov 2015 02:37:37 +0000 (18:37 -0800)]
Fix several uninitialized class members

Reported by Coverity as UNINIT_CTOR.

8 years agoFix the uselib syscall testcase by updating the expected output.
Martin Cermak [Mon, 9 Nov 2015 08:37:14 +0000 (09:37 +0100)]
Fix the uselib syscall testcase by updating the expected output.

8 years agoMark internal tapset functions as '@__private30' where possible.
Martin Cermak [Sat, 7 Nov 2015 14:43:29 +0000 (09:43 -0500)]
Mark internal tapset functions as '@__private30' where possible.

Add '@__private30' macro that gives 'private' keyword for compatibility
mode 3.0 and higher. Mark internal tapset functions as private using
it where possible. Testcases examining private tapset functions must
now use the --compatible=2.9 option.

8 years agoPrefix global functions in the generated code.
Martin Cermak [Thu, 5 Nov 2015 20:50:55 +0000 (15:50 -0500)]
Prefix global functions in the generated code.

Add '__global_' prefix to global functions in the generated code.
Treat selected internal synthetic functions as private.
Fix using a private function in user script and test-cover it.

* elaborate.cxx: Correctly match global function names to respective
  functiondecls. Match synthetic private functions coming from
  tapset-procfs.cxx (*_procfs_value_*), and tapsets.cxx
  (_sdt_arg_get_addr_) to respective functiondecls.
* main.cxx: Update the --dump-functions feature to correctly deal with
  new internal function names.
* parse.cxx: Add the "__global_" prefix to global functions in the
  generated code.
* staptree.cxx: Update functiondecl::printsig() so that it outputs
  unmangled function name.
* tapset-procfs.cxx: Treat internal synthetic functions
  '*_procfs_value_get*', '*_procfs_value_set*', '*_procfs_value_append*'
  as private.
* tapsets.cxx: Treat internal synthetic functions '*_sdt_arg_get_addr_*'
  as private.
* optim_arridx.exp: Adapt the testcase to new naming.
* private.exp: Add subtest examining use of a private function in
  user script.

8 years agoFix the 'if.exp' testcase so that the second test result matters.
David Smith [Thu, 5 Nov 2015 16:52:10 +0000 (10:52 -0600)]
Fix the 'if.exp' testcase so that the second test result matters.

* testsuite/systemtap.base/if.exp: Make sure we look for the
  'all_pass_string' twice, since the test case prints it twice.

8 years agoAdd testcases for variables scope.
Zhou Wenjian [Thu, 5 Nov 2015 16:44:25 +0000 (10:44 -0600)]
Add testcases for variables scope.

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

8 years agoman/stap.1: hold forth on DEPRECATION
Frank Ch. Eigler [Wed, 4 Nov 2015 18:09:16 +0000 (13:09 -0500)]
man/stap.1: hold forth on DEPRECATION

Explain that our deprecation is done for the users' benefit.

8 years agoHide "__global_" mangling from the module parameters
Josh Stone [Tue, 3 Nov 2015 19:42:27 +0000 (11:42 -0800)]
Hide "__global_" mangling from the module parameters

This mangling is an implementation detail of the module, and we don't
want to introduce a version dependency for staprun and stapdyn which
understand this.  Leave the parameter names unmangled and simply map
them to the mangled variable internally.

This also makes sure we don't expose the new private variables as
parameters at all, not even in mangled form.

8 years agoMake private functions play well with default optimizations.
Martin Cermak [Tue, 3 Nov 2015 15:16:36 +0000 (10:16 -0500)]
Make private functions play well with default optimizations.

Without this update, duplicate_function_remover::visit_functioncall()
would treat two different private functions of the same name as one
("Changing B reference to A reference"). This would happen with default
optimizations (without -u). This fix is analogical to b834d412e356
(mcermak/private branch) which does similar thing for private globals.

8 years agoExtend testcase private.exp to cover PR10607 scenario.
Martin Cermak [Tue, 3 Nov 2015 08:19:55 +0000 (03:19 -0500)]
Extend testcase private.exp to cover PR10607 scenario.

8 years agoMake test outut easier to compare among runs (PR19135).
Martin Cermak [Tue, 3 Nov 2015 07:55:09 +0000 (02:55 -0500)]
Make test outut easier to compare among runs (PR19135).

Drop PIDs and auxiliary counters from output of listing_mode.exp
valid_pid.exp and bench.exp. With this update test outputs are easier
to compare between testsuite runs and still well debuggable.

8 years agoMake a few small tweaks to modules_out_of_tree.exp.
David Smith [Mon, 2 Nov 2015 22:24:20 +0000 (16:24 -0600)]
Make a few small tweaks to modules_out_of_tree.exp.

* testsuite/systemtap.base/modules_out_of_tree.exp: A few tweaks, move all
  the generated files to a new temporary directory and don't remove the
  temporary directory if we're in verbose mode.

8 years agosystemtap.spec: partial revert of latex2html configury cleanup
Frank Ch. Eigler [Mon, 2 Nov 2015 18:56:52 +0000 (13:56 -0500)]
systemtap.spec: partial revert of latex2html configury cleanup

We don't run latex2html, but a few of our .tex files include
\usepackage{html} - which is provided by latex2html.

8 years agosystemtap.spec: tex package typo fix
Frank Ch. Eigler [Mon, 2 Nov 2015 18:34:57 +0000 (13:34 -0500)]
systemtap.spec: tex package typo fix

8 years agosystemtap.spec: also require tex(graphicsx.sty)
Frank Ch. Eigler [Mon, 2 Nov 2015 18:33:08 +0000 (13:33 -0500)]
systemtap.spec: also require tex(graphicsx.sty)

This explicit dependency has only recently become necessary.

8 years agoSet input.check_compatible at the lexer ctor time.
Martin Cermak [Mon, 2 Nov 2015 16:11:54 +0000 (17:11 +0100)]
Set input.check_compatible at the lexer ctor time.

Before this update input.check_compatible has been set after lexer
ctor finished. This was too late for has_version() to work properly
within the lexer ctor.

8 years agoFix operator precedence issue introduced by commit 6469522cf.
Martin Cermak [Mon, 2 Nov 2015 15:40:22 +0000 (16:40 +0100)]
Fix operator precedence issue introduced by commit 6469522cf.

8 years agoDrop the --compatible part of the private.exp testcase.
Martin Cermak [Mon, 2 Nov 2015 15:21:04 +0000 (10:21 -0500)]
Drop the --compatible part of the private.exp testcase.

Can go back in once some system tapset starts relying on the "private"
keyword.

8 years agoTestsuite additions and fixes for the "private" keyword feature.
Martin Cermak [Fri, 30 Oct 2015 17:17:16 +0000 (18:17 +0100)]
Testsuite additions and fixes for the "private" keyword feature.

* testsuite/systemtap.base/modargs.exp: Fix the testcase.
* testsuite/systemtap.base/optim_arridx.exp: Ditto.
* testsuite/systemtap.onthefly/affection.exp: Ditto.
* testsuite/systemtap.base/private.{exp,stp}: New testcase.

8 years agoDocument the "private" keyword feature.
Martin Cermak [Fri, 30 Oct 2015 17:15:09 +0000 (18:15 +0100)]
Document the "private" keyword feature.

Add documentation for changes brought by commit 38bf68a81d.

8 years agoIntroduce "private" keyword for tapsets and user scripts.
Martin Cermak [Fri, 30 Oct 2015 17:03:19 +0000 (18:03 +0100)]
Introduce "private" keyword for tapsets and user scripts.

With this update global variables and functions may be marked "private"
limiting their scope to a tapset or usersctipt file per PR19136.

* NEWS: Add entry.
* elaborate.cxx: Match names to decls within find_var(), update
  generation of synthetic probes within add_global_var_display().
* parse.cxx: Recognize the "private" keyword.
* stapdyn/mutator.cxx: Pass global variable names to the dyninst
  runtime with "__global_" prefix.
* staprun/staprun_funcs.c: Pass global variable names to the kernel
  runtime with "__global_" prefix.
* tapset-utrace.cxx, tapsets.cxx: Prefix internal globals that are
  bypassing the parser.
* util.cxx, util.h: Add detox_path() as a support function.

8 years agodocs: add tex(nomencl.sty) dependency
Frank Ch. Eigler [Thu, 29 Oct 2015 14:15:27 +0000 (10:15 -0400)]
docs: add tex(nomencl.sty) dependency

nomencl.sty is available from at least RHEL5 onward, so let's not bundle it.

8 years agoForget about latex2html in configury; we don't use it in builds any more.
Frank Ch. Eigler [Thu, 29 Oct 2015 13:54:29 +0000 (09:54 -0400)]
Forget about latex2html in configury; we don't use it in builds any more.

8 years agoFix the shamed -Werror bug link
Josh Stone [Thu, 29 Oct 2015 01:06:10 +0000 (18:06 -0700)]
Fix the shamed -Werror bug link

8 years agostap: buildrun's -Werror is not really optional
Josh Stone [Thu, 29 Oct 2015 00:43:23 +0000 (17:43 -0700)]
stap: buildrun's -Werror is not really optional

We really, really do want -Werror in kbuild invocations, else things
like "warning: passing argument from incompatible pointer type" will be
allowed, and that's almost certainly a fatal problem for kernel code.

This particular warning first shows up in stapconf checks for tracepoint
features, which then leads to uncompilable code elsewhere, so at least
it fails nicely.  But we don't want *any* warnings to sneak through.
The string in buildrun.cxx is now slightly obfuscated so it may escape
Gentoo's blunt sed removal.

This also removes the undocumented, obfuscated, *evil* option from the
command which omitted -Werror.  If you're really so sure that you don't
need it, you must now talk to this guy:

 ______________
< I <3 -Werror >
 --------------
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \
           /     /  \/_/    //   |  \  \
           @_^_@'/   \/_   //    |   \   \
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~

8 years agoPR14431 cont'd: syscalls testsuite fallout
Frank Ch. Eigler [Tue, 27 Oct 2015 22:34:27 +0000 (18:34 -0400)]
PR14431 cont'd: syscalls testsuite fallout

jistone helpfully noted that the innocuous tapset changes broke the
syscall testsuite, since the latter looks for particular idiosyncratic
hex patterns.  Lovingly adjusting them, a single line at a time, until
[7]f+ turns into the newly consistentified 0x[7]f+, etc.

8 years agoPR14431 cont'd: user_string_n2_quoted()
Frank Ch. Eigler [Tue, 27 Oct 2015 22:33:01 +0000 (18:33 -0400)]
PR14431 cont'd: user_string_n2_quoted()

Turn this lower-level tapset function into a pure-script alternative
that uses the same new standard 0xHEX notation for failed accesses
that the {user,kernel}_string_quoted() ones do.

8 years agotestsuite: wrap /usr/bin/stress invocations in /usr/bin/timeout -k
Frank Ch. Eigler [Tue, 27 Oct 2015 22:26:24 +0000 (18:26 -0400)]
testsuite: wrap /usr/bin/stress invocations in /usr/bin/timeout -k

On some platforms (I'm winking at you, rawhide!), stress(1) could get
into a hung state when running under stap probes, even though it was
given the "-t TIMEOUT" parameter.  Now we wrap it in timeout(1), which
makes sure that stress won't last forever.

8 years agoruntime: reject overlong UTF-8, output as raw octal instead
Josh Stone [Wed, 28 Oct 2015 00:42:32 +0000 (17:42 -0700)]
runtime: reject overlong UTF-8, output as raw octal instead

Since string_quoted is meant to unambiguously represent its output, it's a
bad idea to let different UTF-8 byte sequences lead to the same Unicode
code point.  This can only happen if you allow 0-padded UTF-8 that ends up
longer than necessary.  It's especially bad if you let long zero encodings
like 0xC0 0x80 be treated as a string terminator!

If any UTF-8 was decoded from more bytes than its value should have needed,
just write it verbatim with octal escapes instead.

8 years agoruntime: simplify byte counts in _stp_decode_utf8
Josh Stone [Wed, 28 Oct 2015 00:26:19 +0000 (17:26 -0700)]
runtime: simplify byte counts in _stp_decode_utf8

8 years agoruntime: share code for \u and \U escaped output
Josh Stone [Wed, 28 Oct 2015 00:24:29 +0000 (17:24 -0700)]
runtime: share code for \u and \U escaped output

8 years agoexamples: add callgraph.stp simple sample
Frank Ch. Eigler [Tue, 27 Oct 2015 19:17:43 +0000 (15:17 -0400)]
examples: add callgraph.stp simple sample

8 years agoMake a small change to runtime/stp_string.c to avoid RHEL5 compile errors.
David Smith [Tue, 27 Oct 2015 18:56:28 +0000 (13:56 -0500)]
Make a small change to runtime/stp_string.c to avoid RHEL5 compile errors.

* runtime/stp_string.c (_stp_decode_utf8): Add some initializations to
  make RHEL5's compiler happy.

8 years agoUpdate the mmreclaim.stp example's "meta" file.
David Smith [Tue, 27 Oct 2015 18:54:19 +0000 (13:54 -0500)]
Update the mmreclaim.stp example's "meta" file.

* testsuite/systemtap.examples/memory/mmreclaim.meta (test_support): Relax
  test support requirements, only checking for any tracepoint that looks
  like "mm_*reclaim*".

8 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Mon, 26 Oct 2015 21:03:09 +0000 (16:03 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

8 years agoUpdate the mmreclaim.stp example scripts.
David Smith [Mon, 26 Oct 2015 21:02:34 +0000 (16:02 -0500)]
Update the mmreclaim.stp example scripts.

* testsuite/systemtap.examples/memory/mmreclaim.stp: Update script for
  newer kernels (RHEL7+).

8 years agoruntime: produce unicode escapes in _stp_text_str
Josh Stone [Fri, 23 Oct 2015 20:11:59 +0000 (13:11 -0700)]
runtime: produce unicode escapes in _stp_text_str

Instead of just writing raw octal escapes, detect and decode well-formed
UTF-8 sequences and write them as \uXXXX or \UXXXXXXXX.

8 years agoforktracker: add TIDs to the trace
Josh Stone [Fri, 23 Oct 2015 19:22:22 +0000 (12:22 -0700)]
forktracker: add TIDs to the trace

It can be confusing for users to see that a PID forked into the same PID,
but really this is just a new thread in that process.  Printing the TIDs
makes this more obvious.

8 years agoruntime/dyninst: add a dummy _stp_is_compat_task()
Josh Stone [Fri, 23 Oct 2015 19:20:20 +0000 (12:20 -0700)]
runtime/dyninst: add a dummy _stp_is_compat_task()

Fixes buildok/arch_bytes.stp.

8 years agoUpdate the mmfilepage.stp and net_xmit_json.stp example scripts.
David Smith [Fri, 23 Oct 2015 18:48:12 +0000 (13:48 -0500)]
Update the mmfilepage.stp and net_xmit_json.stp example scripts.

* testsuite/systemtap.examples/memory/mmfilepage.stp: Update script for
  newer kernels (RHEL7+).
* testsuite/systemtap.examples/memory/mmfilepage.meta (test_support):
  Relax support requirements.
* testsuite/systemtap.examples/network/net_xmit_json.stp: Make the
  "net_dev_start_xmit" tracepoint optional, since it doesn't exist in some
  kernels.
* testsuite/systemtap.examples/network/net_xmit_json.meta: Ditto.
* testsuite/systemtap.examples/profiling/fileline-profile.meta: Correct
  typo so that the script gets built.

8 years agoUpdate the 'autofs4' example script for current kernels.
David Smith [Thu, 22 Oct 2015 21:00:30 +0000 (16:00 -0500)]
Update the 'autofs4' example script for current kernels.

* testsuite/systemtap.examples/network/autofs4.stp: Update for kernels >
  RHEL5-era kernels.
* testsuite/systemtap.examples/network/autofs4.meta (test_support): Remove
  'test_support' line since the script should work everywhere now.

8 years agoAdd testcases for prologue and epilogue style aliases.
Zhou Wenjian [Thu, 22 Oct 2015 16:20:16 +0000 (11:20 -0500)]
Add testcases for prologue and epilogue style aliases.

8 years agoruntime: handle the edges of utf-lengths better
Josh Stone [Thu, 22 Oct 2015 01:34:50 +0000 (18:34 -0700)]
runtime: handle the edges of utf-lengths better

The edge cases of UTF-8 lengths in _stp_convert_utf32 were using "<"
instead of "<=", causing some values to output overlong encodings.
(Some of these are noncharacters anyway, but they're still encodable.)

8 years ago/*stable*/ embedded-c functions: restore check for arity-0
Frank Ch. Eigler [Wed, 21 Oct 2015 20:11:14 +0000 (16:11 -0400)]
/*stable*/ embedded-c functions: restore check for arity-0

During the various rewrites, this check got lost, and caused
arity-1 putatively-/*stable*/ functions to be recognized in
pass 2 but cause a SEGV in pass 3.

8 years agoPR14431: improve quoting of pretty-printed strings in $foo$$
Frank Ch. Eigler [Wed, 21 Oct 2015 18:02:57 +0000 (14:02 -0400)]
PR14431: improve quoting of pretty-printed strings in $foo$$

Switch to using {kernel,user}_string_quoted() for expansion of
char-ish $var$ expansions.  Required adding utf16/32 wrappers
for same, made easier by new tapset function string_quoted().

8 years agoUpdate the testsuite rpm requires for a couple of examples.
David Smith [Tue, 20 Oct 2015 21:27:53 +0000 (16:27 -0500)]
Update the testsuite rpm requires for a couple of examples.

* systemtap.spec: Make the testsuite rpm require "perf", since some of the
  example "meta" files use it.

8 years agoUpdate the fslatency-nd.stp and fsslower-nd.stp examples for newer kernels.
David Smith [Tue, 20 Oct 2015 21:25:36 +0000 (16:25 -0500)]
Update the fslatency-nd.stp and fsslower-nd.stp examples for newer kernels.

* testsuite/systemtap.examples/lwtools/fslatency-nd.stp: Updated for newer
  kernels, without the kernel functions "do_sync_read", "do_sync_write",
  and "sock_aio_write".
* testsuite/systemtap.examples/lwtools/fsslower-nd.stp: Ditto.

8 years agoAnother fullpath_struct_path() @cast search fix (PR19120).
David Smith [Tue, 20 Oct 2015 18:36:37 +0000 (13:36 -0500)]
Another fullpath_struct_path() @cast search fix (PR19120).

* tapset/linux/dentry.stp (fullpath_struct_path): Fix the @cast() module
  path search so we look for "<linux/path.h>" in the kernel, not in
  userspace.

8 years agoFixed PR19120 by rearranging the list of modules to search in @cast().
David Smith [Tue, 20 Oct 2015 18:19:42 +0000 (13:19 -0500)]
Fixed PR19120 by rearranging the list of modules to search in @cast().

* tapset/linux/dentry.stp (fullpath_struct_path): Rearrange the list of
  modules to search for 'struct path' so that looking in "<linux/path.h>"
  comes last, so that RHEL5-era kernels don't make it that far. That
  include file doesn't exist on RHEL5-era kernels, which causes kbuild
  warnings.

8 years agoUpdate several of the example scripts for better kernel coverage.
David Smith [Tue, 20 Oct 2015 17:45:59 +0000 (12:45 -0500)]
Update several of the example scripts for better kernel coverage.

* testsuite/systemtap.examples/network/tcp_trace.stp: Handle change in the
  tcp_sock structure in newer kernels.
* testsuite/systemtap.examples/process/pfiles.stp: Add changes for
  RHEL6-era kernels and kernels >= 4.0.
* testsuite/systemtap.examples/process/pstree.stp: Handle kernels < 3.7.
* testsuite/systemtap.examples/process/rlimit_nofile.stp: Add a fallback
  for when the kernel function __alloc_fd() doesn't exist.
* testsuite/systemtap.examples/process/schedtimes.stp: Handle newer
  kernels where the "sched_wakeup" tracepoint doesn't have a 'success'
  argument.
* testsuite/systemtap.examples/profiling/fileline-profile.stp: Handle
  32-bit kernels better by making the global array smaller.
* testsuite/systemtap.examples/profiling/pf3.stp: Ditto.
* testsuite/systemtap.examples/profiling/pf4.stp: Ditto.
* testsuite/systemtap.examples/io/slowvfs.meta: Add 'test_support' line.
* testsuite/systemtap.examples/process/procmod_watcher.meta: Ditto.

8 years agoStandardize and fix mm's exe_file handling for kernels >= 4.1.
David Smith [Wed, 14 Oct 2015 21:03:52 +0000 (16:03 -0500)]
Standardize and fix mm's exe_file handling for kernels >= 4.1.

* runtime/task_finder_vma.c (stap_find_exe_file): Rewrite
  stap_find_exe_file() to handle kernels >= 4.1.
* runtime/linux/task_finder.c (__stp_get_mm_path): Call the net
  stap_find_exe_file(), which handles locking the mm.
* runtime/linux/task_finder.c (__stp_get_mm_path): Ditto.
* runtime/linux/uprobes-inode.c (stapiu_get_task_inode): Ditto.
* tapset/linux/task.stp (task_exe_file): Ditto.

8 years agoFixed PR6525 by adding functions to get a task's cwd and exe path.
David Smith [Mon, 12 Oct 2015 16:17:00 +0000 (11:17 -0500)]
Fixed PR6525 by adding functions to get a task's cwd and exe path.

* tapset/linux/task.stp (task_cwd_path:long): New function.
  (task_exe_file): Ditto.
* buildrun.cxx (compile_pass): Add export test for "get_mm_exe_file()".
* testsuite/systemtap.base/task_paths.exp: New test case.
* testsuite/systemtap.base/task_paths.stp: New test file.
* testsuite/buildok/task-embedded.stp: Added compile tests for new
  functions.

8 years agoUpdate systemtap.apps tests.
Stan Cox [Fri, 9 Oct 2015 15:47:21 +0000 (11:47 -0400)]
Update systemtap.apps tests.

* (python.exp):  Untest by noting that this test was replaced by
  the example suite python test.
* (xulrunner.exp):  Untest if gtk+-2.0 configure requirement fails
* (py?example.meta):  Require python debuginfo
* (python.stpm):  Update python3-lib version.

8 years agoNew testcase: systemtap.stress/tapset_functions.exp.
Martin Cermak [Fri, 9 Oct 2015 11:28:32 +0000 (13:28 +0200)]
New testcase: systemtap.stress/tapset_functions.exp.

8 years agoAlign nd_syscall.mmap* and syscall.mmap* convenience vars lists.
Martin Cermak [Fri, 9 Oct 2015 11:09:58 +0000 (13:09 +0200)]
Align nd_syscall.mmap* and syscall.mmap* convenience vars lists.

* NEWS: Mention deprecations.
* tapset/linux/aux_syscalls.stp: Deprecate: get_mmap_args().
* tapset/linux/s390/aux_syscalls.stp: Deprecate get_32mmap_args().
* tapset/linux/s390/nd_syscalls.stp: Provide missing convenience vars.
* tapset/linux/x86_64/nd_syscalls.stp: Provide missing convenience vars.
* tapset/linux/x86_64/syscalls.stp: Use convenience vars in argstr.

8 years agosystemtap configury version bump for future v3.0
Frank Ch. Eigler [Fri, 9 Oct 2015 03:30:41 +0000 (23:30 -0400)]
systemtap configury version bump for future v3.0

8 years agoUpdate systemtap.apps tests.
Stan Cox [Fri, 9 Oct 2015 02:33:57 +0000 (22:33 -0400)]
Update systemtap.apps tests.

* (mysql.exp, postgres.exp, xulrunner.exp):  Update version,
  adjust test thresholds.

8 years agorelease 2.9 date-stamp fix release-2.9
Frank Ch. Eigler [Fri, 9 Oct 2015 01:43:34 +0000 (21:43 -0400)]
release 2.9 date-stamp fix

8 years agotestsuite callee.exp: Hunt for the last FAIL:
Frank Ch. Eigler [Fri, 9 Oct 2015 01:17:09 +0000 (21:17 -0400)]
testsuite callee.exp: Hunt for the last FAIL:

The hunt is not successful (1 FAIL:), but the tcl code is being
gradually simplified and more diagnostics emitted to help find the
culprit.

8 years agoon-the-fly testsuite: stablify
Frank Ch. Eigler [Fri, 9 Oct 2015 01:15:03 +0000 (21:15 -0400)]
on-the-fly testsuite: stablify

Remove the "-g" flag from both {k,u}probe tests; it's not needed, and
for the kernel case can trigger weird hangs due to overriding of the
blacklist.  Relax the output matching patterns, perhaps due to
different ordering of task workqueues in 4.3.0-rc.  Produce more
diagnostics upon failure.

8 years agoioblock tapset updates for linux-4.3-rc
Frank Ch. Eigler [Thu, 8 Oct 2015 19:23:29 +0000 (15:23 -0400)]
ioblock tapset updates for linux-4.3-rc

Update for linux commit 4246a0b63 and a thinko in
embedded-C to script function conversion.

8 years agoFix nd_syscall.(compat_sysctl|sysctl32).return probe.
Martin Cermak [Thu, 8 Oct 2015 17:15:46 +0000 (19:15 +0200)]
Fix nd_syscall.(compat_sysctl|sysctl32).return probe.

8 years agotestsuite/tapset tweaks for 4.3.0-rc
Frank Ch. Eigler [Thu, 8 Oct 2015 15:38:28 +0000 (11:38 -0400)]
testsuite/tapset tweaks for 4.3.0-rc

8 years agoUpdate the syscalls documentation (based on kernel-4.3.0-0.rc4.git1.1.fc24).
Martin Cermak [Thu, 8 Oct 2015 15:15:59 +0000 (17:15 +0200)]
Update the syscalls documentation (based on kernel-4.3.0-0.rc4.git1.1.fc24).

8 years agoImprove the nfsdtop.stp example script.
David Smith [Thu, 8 Oct 2015 14:38:51 +0000 (09:38 -0500)]
Improve the nfsdtop.stp example script.

* testsuite/systemtap.examples/network/nfsdtop.stp: By default, now
  returns 'dirname/filename' for the last files looked up for each
  client. With any command line argument, returns the full pathname.

8 years agokprobe probes: protect kallsyms_on_each_symbol with rcu lock
Frank Ch. Eigler [Wed, 7 Oct 2015 21:18:26 +0000 (17:18 -0400)]
kprobe probes: protect kallsyms_on_each_symbol with rcu lock

* kprobe_derived_probe_group::emit_module_init: Wrap
  kallsyms_on_each_symbol in rcu lock, to prevent lockdep
  warning.

8 years agotapset: syscall.fadvise64_64.return
David Smith [Wed, 7 Oct 2015 19:01:20 +0000 (15:01 -0400)]
tapset: syscall.fadvise64_64.return

Tolerate occasionally mis-dwarf'd sys_fadvise64_64 function by
permitting the .return probe to resolve without a $return value.
Convert to if @defined()-based hack.

8 years agoelaboration: decorate more pass-2 errors with probe derivation chain / function name
Frank Ch. Eigler [Wed, 7 Oct 2015 18:50:45 +0000 (14:50 -0400)]
elaboration: decorate more pass-2 errors with probe derivation chain / function name

semantic_pass_types() carries out $context variable resolution, but
didn't identify what probe the $variable might have come from.  This
is especially tricky if the derived_probe is many wildcarding/aliasing
levels away from the input probe point.  We now print per-probe (or
analogous per-function) naming during the semantic_pass_types loops
via semantic_error chaining.

8 years agoFix PR19057 by making _is_reset() more robust.
David Smith [Wed, 7 Oct 2015 16:56:01 +0000 (11:56 -0500)]
Fix PR19057 by making _is_reset() more robust.

* tapset/linux/tcpmib.stp (_is_reset): Make more robust by using
  kderef_buffer() on the tcp header we're reading.

8 years agoMove s390x's get_32mmap_args() to its proper place.
David Smith [Wed, 7 Oct 2015 15:44:25 +0000 (10:44 -0500)]
Move s390x's get_32mmap_args() to its proper place.

* tapset/linux/s390/aux_syscalls.stp: Move get_32mmap_args() here.
* tapset/linux/s390/nd_syscalls.stp: Move get_32mmap_args() to
  aux_syscalls.stp.

8 years agoFix PR19000 by making task_ns_pid() and task_ns_tid() more robust.
David Smith [Wed, 7 Oct 2015 15:14:15 +0000 (10:14 -0500)]
Fix PR19000 by making task_ns_pid() and task_ns_tid() more robust.

* runtime/linux/namespaces.h (from_target_pid_ns): Make sure the task
  struct is valid before using it. The task_ns_pid() and task_ns_tid()
  tapset functions call from_target_pid_ns().
  (_stp_task_struct_valid): New function.

8 years agoAdded comments and whitespace in runtime/linux/namespaces.h.
David Smith [Wed, 7 Oct 2015 14:27:15 +0000 (09:27 -0500)]
Added comments and whitespace in runtime/linux/namespaces.h.

8 years agoRHBZ1269062 redux, less quote elevator_name
Frank Ch. Eigler [Tue, 6 Oct 2015 20:41:02 +0000 (16:41 -0400)]
RHBZ1269062 redux, less quote elevator_name

dsmith pointed out that switching to a quoted string is not always the
right thing to do, esp. from a backward compatibility point of view.
We now formalize a policy guideline in DEVGUIDE that *_string2 be used
when pointers should be valid but might be 0, which is the situation
with these probe points.

8 years agoFix buildability of task_fd_lookup() on 32-bit systems.
Martin Cermak [Tue, 6 Oct 2015 19:42:49 +0000 (21:42 +0200)]
Fix buildability of task_fd_lookup() on 32-bit systems.

8 years agoRHBZ1269062: quote ioscheduler.* elevator_name value
Frank Ch. Eigler [Tue, 6 Oct 2015 14:56:06 +0000 (10:56 -0400)]
RHBZ1269062: quote ioscheduler.* elevator_name value

It was reported that the $q->elevator->elevator_name could be 0.

8 years agoFix PR19070 by applying /* pragma:uprobes */ to __ustack_raw().
Martin Cermak [Tue, 6 Oct 2015 12:29:33 +0000 (14:29 +0200)]
Fix PR19070 by applying /* pragma:uprobes */ to __ustack_raw().

8 years agoFix PR19069 by conditionally including linux/user_namespace.h.
Martin Cermak [Tue, 6 Oct 2015 07:49:46 +0000 (09:49 +0200)]
Fix PR19069 by conditionally including linux/user_namespace.h.

8 years agoFix PR19065 by making task_fd_lookup() more robust.
David Smith [Mon, 5 Oct 2015 18:10:49 +0000 (13:10 -0500)]
Fix PR19065 by making task_fd_lookup() more robust.

* tapset/linux/task.stp (task_fd_lookup): No longer write to the
  task_struct memory. We check to make sure the memory is valid to read
  from, but that doesn't mean it is valid to write to.

8 years agoAdd another fix for PR19000 by doing more pointer validation in task.stp.
David Smith [Mon, 5 Oct 2015 16:19:11 +0000 (11:19 -0500)]
Add another fix for PR19000 by doing more pointer validation in task.stp.

* tapset/linux/task.stp (task_gid): Add more pointer validation.
  (task_egid): Ditto.
  (task_uid): Ditto.
  (task_euid): Ditto.

8 years agoFix compile-time issues for a few _struct_compat_*_u() functions.
Martin Cermak [Mon, 5 Oct 2015 13:58:36 +0000 (15:58 +0200)]
Fix compile-time issues for a few _struct_compat_*_u() functions.

* tapset/linux/aux_syscalls.stp: Fix _struct_compat_itimerspec_u(),
  and _struct_itimerval_u() so that they compile on non CONFIG_COMPAT
  systems. Fix _struct_sched_attr_u() so that it compiles on kernels
  not having struct sched_attr, i.e. when kernel_v < "3.14".
* testsuite/buildok/aux_syscalls-embedded.stp: Remove unneeded
  constraint for _struct_sched_attr_u() testing.

8 years agoFix PR17920 by adding task_fd_lookup().
David Smith [Fri, 2 Oct 2015 16:55:19 +0000 (11:55 -0500)]
Fix PR17920 by adding task_fd_lookup().

* tapset/linux/task.stp (task_fd_lookup): New function.
* tapset/linux/dentry.stp (fullpath_struct_file): Ditto.
* testsuite/buildok/dentry-embedded.stp: Added compile test for
  fullpath_struct_file().
* testsuite/buildok/task-embedded.stp: Added compile test for
  task_fd_lookup().
* testsuite/systemtap.base/task_fd_lookup.exp: New testcase for
  task_fd_lookup.
* testsuite/systemtap.base/task_fd_lookup.stp: Ditto.
* testsuite/systemtap.base/task_fd_lookup.c: Ditto.

8 years agoFix PR19021 by adding support for synthetic filesystems to task_dentry_path().
David Smith [Fri, 2 Oct 2015 15:36:35 +0000 (10:36 -0500)]
Fix PR19021 by adding support for synthetic filesystems to task_dentry_path().

* tapset/linux/dentry.stp (task_dentry_path): Add better support for
  synthetic filesystems, like pipes, sockets, etc.
  (fullpath_struct_path): Add better RHEL5 support.

8 years agoExplicitly set the return type for __stack_raw() and __ustack_raw().
Martin Cermak [Fri, 2 Oct 2015 14:48:54 +0000 (16:48 +0200)]
Explicitly set the return type for __stack_raw() and __ustack_raw().

Missing return type defs may cause "unresolved type" error when
calling a function without enough context for type inference to work
like e.g. `stap -e 'probe oneshot{println(__stack_raw(0))}'`.

8 years agoFix PR19045 by updating _stp_text_str() (called by kernel_string_quoted()).
David Smith [Thu, 1 Oct 2015 21:03:08 +0000 (16:03 -0500)]
Fix PR19045 by updating _stp_text_str() (called by kernel_string_quoted()).

* runtime/stp_string.c (_stp_text_str): Use _stp_read_address() to read
  kernel memory also, not just user memory. This should keep us safe from
  invalid pointers.

8 years agoFix PR19043 by updating __bio_ino(), __rqstp_gid() and __rqstp_uid().
David Smith [Thu, 1 Oct 2015 18:50:21 +0000 (13:50 -0500)]
Fix PR19043 by updating __bio_ino(), __rqstp_gid() and __rqstp_uid().

* tapset/linux/nfsd.stp (__rqstp_uid): Make sure all pointers are valid
  before using them.
  (__rqstp_gid): Ditto.
* tapset/linux/ioblock.stp (__bio_ino): Ditto.
  (bio_rw_num): Rewrite using embedded-C.

8 years agoFix pstrace() to prevent it from cycling on s390 with invalid input.
Martin Cermak [Thu, 1 Oct 2015 12:51:12 +0000 (14:51 +0200)]
Fix pstrace() to prevent it from cycling on s390 with invalid input.

On s390 reading zero address doesn't cause read fault and thus e.g.
pstrace(0) was cycling until MAXACTION got reached.

8 years agoSpecify argument type for _madvice_advice_str:string(behavior:long).
Martin Cermak [Thu, 1 Oct 2015 12:01:14 +0000 (14:01 +0200)]
Specify argument type for _madvice_advice_str:string(behavior:long).

This makes stap --dump-functions report the correct argument type
for _madvice_advice_str().

8 years agorelease date
Felix Lu [Wed, 30 Sep 2015 19:58:52 +0000 (15:58 -0400)]
release date

8 years agoupdate AUTHORS file
Felix Lu [Wed, 30 Sep 2015 13:55:17 +0000 (09:55 -0400)]
update AUTHORS file

8 years agorelease: update po files
Felix Lu [Wed, 30 Sep 2015 13:51:39 +0000 (09:51 -0400)]
release: update po files

8 years agotestsuite plt.c: suppress another compiler warning
Frank Ch. Eigler [Tue, 29 Sep 2015 20:19:23 +0000 (16:19 -0400)]
testsuite plt.c: suppress another compiler warning

8 years agotestsuite wakeup.*: standardize more
Frank Ch. Eigler [Tue, 29 Sep 2015 15:27:52 +0000 (11:27 -0400)]
testsuite wakeup.*: standardize more

Eliminating the timer.s() wait, putting in a fixed 'sleep NN'
into the -c CMD string makes stopping condition clearer and
overall CMD exit value fixed (0).

8 years agotestsuite wakeup.*:
Frank Ch. Eigler [Tue, 29 Sep 2015 15:14:13 +0000 (11:14 -0400)]
testsuite wakeup.*:

On a rawhide smp box, it was possible to see corrupted lines of text
from this test's multiple concurrent outputs, and thus lose counts.
The strings are revised, and exit timing managed mroe carefully,
to make the run more repeatable.

8 years agotestsuite plt.c: correct compiler warnings
Frank Ch. Eigler [Tue, 29 Sep 2015 13:44:13 +0000 (09:44 -0400)]
testsuite plt.c: correct compiler warnings

8 years agoSet up kfails for testsuite/buildok/stap_staticmarkers-detailed.stp.
David Smith [Fri, 25 Sep 2015 17:25:41 +0000 (12:25 -0500)]
Set up kfails for testsuite/buildok/stap_staticmarkers-detailed.stp.

* testsuite/systemtap.pass1-4/buildok.exp: For
  buildok/stap_staticmarkers-detailed.stp, kfail if we don't have uprobes
  or if we're not running as root. Only root can read "staprun".

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