]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agoNEWS blurb about interned_string
Abegail Jakop [Tue, 18 Aug 2015 14:49:54 +0000 (10:49 -0400)]
NEWS blurb about interned_string

9 years agoadd string_ref to list of enabled features
Abegail Jakop [Mon, 17 Aug 2015 18:39:08 +0000 (14:39 -0400)]
add string_ref to list of enabled features

when outputting systemtap versions (stap -V), output BOOST_STRING_REF
in the list enabled features

9 years agoalternate interned_string if no boost::string_ref
Abegail Jakop [Fri, 14 Aug 2015 20:42:33 +0000 (16:42 -0400)]
alternate interned_string if no boost::string_ref

string_ref was only introduced in boost 1.53, meaning rhel 5 and 6
might not have a recent enough version. to account for this, if
string_ref is not available, fall back on an alternate definition
of interned_string that uses std::string instead.

9 years agoremove unused lex_cast()-ed args
Abegail Jakop [Wed, 12 Aug 2015 21:00:38 +0000 (17:00 -0400)]
remove unused lex_cast()-ed args

9 years agointerned-string conversion: some more function parameters
Frank Ch. Eigler [Mon, 10 Aug 2015 14:12:17 +0000 (10:12 -0400)]
interned-string conversion: some more function parameters

Saving some std::string round-trips.

9 years agointerned_string: construct from null char*
Frank Ch. Eigler [Sat, 8 Aug 2015 11:39:20 +0000 (07:39 -0400)]
interned_string: construct from null char*

Some of the tapset*cxx functions were used to representing empty
function / file names with NULL char*s.  As these are transitioned to
interned_strings, the latter's ctors must be willing to accept those
NULLs and convert them to empty strings.  (Adjusting all the callers
to pass "" instead of NULL in those slots is also possible.)

9 years agostringtable: turn off the INSTRUMENT option by default
Frank Ch. Eigler [Sat, 8 Aug 2015 03:07:52 +0000 (23:07 -0400)]
stringtable: turn off the INSTRUMENT option by default

9 years agointerned_string: drop magic c_str() implementation
Frank Ch. Eigler [Sat, 8 Aug 2015 02:53:26 +0000 (22:53 -0400)]
interned_string: drop magic c_str() implementation

It turns out that while it was right for boost::string_ref not to
provide it, we can, because our interned_string's backing stores
are full (read-only) std::strings, which always carry a \0.  This
shrinks down our interned_string to 2*sizeof(void*) bytes.

9 years agotapset-method.cxx: drop unused variable
Frank Ch. Eigler [Sat, 8 Aug 2015 02:53:17 +0000 (22:53 -0400)]
tapset-method.cxx: drop unused variable

9 years agoINTERNALS: update with some words about interned strings and visitors
Frank Ch. Eigler [Sat, 8 Aug 2015 02:05:52 +0000 (22:05 -0400)]
INTERNALS: update with some words about interned strings and visitors

9 years agoerror message formatting
Frank Ch. Eigler [Sat, 8 Aug 2015 01:44:23 +0000 (21:44 -0400)]
error message formatting

With the richer interned_string API, one can return to the previous
way of finding line boundaries in the input string.  While in the
area, we tweak spacing of parse error message lines.

9 years agostringtable: add diagnostic logging mode
Frank Ch. Eigler [Sat, 8 Aug 2015 00:19:50 +0000 (20:19 -0400)]
stringtable: add diagnostic logging mode

With INTERNED_STRING_INSTRUMENT set, a /tmp/hash.log file is written
out to record each string being interned.  Looking through that is a
good way of tuning the hash function, as well as what
staptree/etc. variables are reverted to std::string form.  (The hint
is that if strings are hardly ever interned in the log, then maybe
they are not reused either.  But that could instead be because they're
being reused exclusively in interned string_ref form, so don't need to
be rehashed.)

9 years agostring_ref cont'd, considering token::msg
Frank Ch. Eigler [Fri, 7 Aug 2015 19:43:14 +0000 (15:43 -0400)]
string_ref cont'd, considering token::msg

Experimentation indicates that the sizeof(interned_string)=24
is so much larger than that of an empty sizeof(std::string)=8
that for mostly-empty slots it's a loss!  A 1-byte std::string
causes a 26-byte malloc, so the interned_string is probably
good for nonempty strings.

9 years agoparser: eliminate needless probe-point-component token duplication
Frank Ch. Eigler [Fri, 7 Aug 2015 19:26:31 +0000 (15:26 -0400)]
parser: eliminate needless probe-point-component token duplication

parser::parse_probe_point created a new token unnecessarily, on the
off chance that a component had to be extended due to wildcards like

  probe foo*

Now this is done only if necessary, and even then not by creating
a new token but rewriting the content of a previous one.

9 years agostringtable tuning
Frank Ch. Eigler [Fri, 7 Aug 2015 18:53:03 +0000 (14:53 -0400)]
stringtable tuning

As guided by "perf stat -r ..." runs, a few microoptimizations on the
string table / interned-string facility.

9 years agostring_ref: mass interned_string conversion
Frank Ch. Eigler [Fri, 7 Aug 2015 03:09:33 +0000 (23:09 -0400)]
string_ref: mass interned_string conversion

Converting many many classes' use of std::string to interned_string.
Largely mechanical, and driven by the desire to (a) store long-lived
duplicate strings only once (in the stringtable), and (b) avoid
instantiating std::strings unnecessarily (in temporary variables
or function parameters).

9 years agostring_ref: switch over to interned_string class
Frank Ch. Eigler [Thu, 6 Aug 2015 22:26:27 +0000 (18:26 -0400)]
string_ref: switch over to interned_string class

Motivated by frustratingly easy-to-miss memory corruption errors of
the direct boost::string_ref model, switching gears to a new derived
class interned_string.  This one performs proper interning when
converting in from a std::string for all copy/assignment operations.
In many cases, it can simply replace std::string through automatic
conversions in/out, naturally paying a CPU / temporary-memory cost.

9 years agostring_ref cont'd: exploiting all over the place
Frank Ch. Eigler [Wed, 5 Aug 2015 19:32:01 +0000 (15:32 -0400)]
string_ref cont'd: exploiting all over the place

Replacing many std::string types, focusing on those stored in
high-cardinality data structures, with boost::string_ref.
Largely mechanical work, with valgrind runs identifying some
persistent trouble-spots of the form

      string_ref FOO = (some_temp_string_value);

which makes them dangle the moment the temp goes out of scope.

9 years agostring_ref usage correction: drop string_ref->to_string()->c_str() chain
Frank Ch. Eigler [Wed, 5 Aug 2015 17:37:10 +0000 (13:37 -0400)]
string_ref usage correction: drop string_ref->to_string()->c_str() chain

This construct generates stale char* pointers that valgrind notices.
We use a first-class temporary string object for these uses.  (They
should probably be rewritten in terms of string_ref native
operations.)

9 years agodwflpp.cxx: memory unleak
Frank Ch. Eigler [Thu, 6 Aug 2015 00:54:48 +0000 (20:54 -0400)]
dwflpp.cxx: memory unleak

The obstacks used for storing piecemeal-printf'd $context functions
could leak if inferior functions threw exceptions.  We now use a
RAII type widget to assure their destruction.

9 years agoc++11 compatibility tweaks for older code
Frank Ch. Eigler [Wed, 5 Aug 2015 16:51:39 +0000 (12:51 -0400)]
c++11 compatibility tweaks for older code

9 years agoconfigury: look for -std=c++11 support
Frank Ch. Eigler [Wed, 5 Aug 2015 16:32:30 +0000 (12:32 -0400)]
configury: look for -std=c++11 support

It turns out that c++11's unordered_set<> makes the stringtable
dramatically faster.  Since that is a c++11-only facility, we switch
the translator (stap) to conditionally compile with that flag.

9 years agostring_ref rework: use global stringtable
Frank Ch. Eigler [Wed, 5 Aug 2015 16:26:29 +0000 (12:26 -0400)]
string_ref rework: use global stringtable

Returning partly to an older model of parser input processing: the
parser::input_contents goes back to a plain string, which may be
modified gradually by $/@ expansion etc.  While string_refs cannot be
made based on that, they don't need to be either, since the
input_contents is a temporary member variable and will be disposed of
when the parser dies.

So we switch back to the prior general logic of
lexer::input_{put,get,peek}, which worked OK.  To populate token
content string_refs, we use a global stringtable (a *set<string>)
against which long-lived string_refs may be issued with a new intern()
call.  The input file contents are amongst those strings interned.
(Many other repeated string uses in the translator could probably
benefit from intern/string_ref'ing, and there are optimization
opportunities within the stringtable implementation proper.)

(While en route, mass-dropped a bunch of unnecessary namespace
prefixes in some affected files.  Sorry for the diff noise.)

9 years agorename string and string_ref vars used in lexer::scan()
Abegail Jakop [Wed, 29 Jul 2015 14:30:13 +0000 (10:30 -0400)]
rename string and string_ref vars used in lexer::scan()

9 years agochange file_contents and input_contents to string_ref
Abegail Jakop [Mon, 27 Jul 2015 16:20:12 +0000 (12:20 -0400)]
change file_contents and input_contents to string_ref

9 years agoparse::parse_probe_point(): store new token's content
Abegail Jakop [Wed, 22 Jul 2015 21:13:41 +0000 (17:13 -0400)]
parse::parse_probe_point(): store new token's content

in parse_porbe_point() the content for a new token is created by
appending to an existing token's content. the string for the new
token's content needs to be stored somewhere, so we'll store it in
the the probe_point, since we can't access the (private) stapfile.

9 years agostore file contents as strings in systemtap_session
Abegail Jakop [Wed, 22 Jul 2015 21:02:45 +0000 (17:02 -0400)]
store file contents as strings in systemtap_session

since we need input_contents and file_contents to last longer
than the lexer, store the input_contents in a  vector in a
systemtap_session. change lexer->input_contents and
stapfile->file_contents to string* so they will point to part of
some string in session->input_contents. will need to change to
string_ref in another commit

9 years agoadapt lexer::scan() for string_ref token->content
Abegail Jakop [Tue, 21 Jul 2015 17:36:11 +0000 (13:36 -0400)]
adapt lexer::scan() for string_ref token->content

parse.cxx: new append_to_content() and set_token_content() to hide
the logic of work of setting up a token's content.
staptree.h: a vector to contain all the mangled strings that tok->content
will point to

9 years agoparse.cxx: replace startswith(tok->content,...)
Abegail Jakop [Tue, 21 Jul 2015 15:57:55 +0000 (11:57 -0400)]
parse.cxx: replace startswith(tok->content,...)

boost::string_ref has a built-in starts_with() functions that
we'll use to replace the std::string  startswith() function.

9 years agoappend .to_string() to tok->content usages
Abegail Jakop [Tue, 21 Jul 2015 15:50:01 +0000 (11:50 -0400)]
append .to_string() to tok->content usages

since tok->content are now boost::string_refs, some portions of the
code don't play well with the fact that string_refs can't be
automatically converted into a std::string, so we need to manually add
in a to_string() call to do the conversion.
Note: can't use .data() since the string_ref is proabably not null terminated.

9 years agoparse.h: change token->content string to string_ref
Abegail Jakop [Tue, 21 Jul 2015 15:48:29 +0000 (11:48 -0400)]
parse.h: change token->content string to string_ref

Breaks a lot of things. Later commits will fix the compile issues
this commit causes.

9 years agoremove unnecessary token param in lexer::input_put
Abegail Jakop [Fri, 17 Jul 2015 21:37:24 +0000 (17:37 -0400)]
remove unnecessary token param in lexer::input_put

9 years agostore lex_cast-ed stap cmd line arguments
Abegail Jakop [Fri, 17 Jul 2015 19:39:31 +0000 (15:39 -0400)]
store lex_cast-ed stap cmd line arguments

session.*: store lex_cast() versions of the stap arguments passed
through the command line.
parse.cxx: if the scanner encounters [$|@]<NN> in a stap script, use
the pre-lex_cast() stap arguments instead of calling lex_cast() each
time the scanner encounters [$|@]<NN>.

9 years agodon't inject script args into input_contents
Abegail Jakop [Fri, 17 Jul 2015 17:39:29 +0000 (13:39 -0400)]
don't inject script args into input_contents

parse.cxx: instead of keeping track of a seperate set of file_contents
(lexer->input_contents) in which [$|@]<NN> are replaced by script args,
we'll keep file_contents and input_contents identical to one another
and parse the scripts args strings when we encouter [$|@]<NN>

9 years agoupdate-po i18n for zanata liveness checking
Frank Ch. Eigler [Fri, 14 Aug 2015 21:16:23 +0000 (17:16 -0400)]
update-po i18n for zanata liveness checking

9 years agoMention PR2111 fix in the NEWS file.
Martin Cermak [Fri, 14 Aug 2015 20:05:29 +0000 (22:05 +0200)]
Mention PR2111 fix in the NEWS file.

9 years agoUpdate NEWS
Felix Lu [Fri, 14 Aug 2015 17:57:09 +0000 (13:57 -0400)]
Update NEWS

- include /* stable */ embedded-c pragma details

9 years agoRemove manual memoization from systemtap example scripts
Felix Lu [Thu, 13 Aug 2015 20:51:21 +0000 (16:51 -0400)]
Remove manual memoization from systemtap example scripts

Stored values are now replaced with an explicit functioncall which
gets optimized by the translator.

9 years agoFix and improve testcases
Felix Lu [Fri, 14 Aug 2015 17:25:39 +0000 (13:25 -0400)]
Fix and improve testcases

- Modify stable_function testcase to test for functioncall arguments
- Add untested callee testcase to unprivileged_myproc

9 years agoPR12151: Check functioncall arguments
Felix Lu [Mon, 10 Aug 2015 18:52:55 +0000 (14:52 -0400)]
PR12151: Check functioncall arguments

Visitor will now go into functioncall arguments and transform any
stable functioncalls.

9 years agoPR12151: Fix recursion problem, add stable synthetic var reading functions
Felix Lu [Wed, 5 Aug 2015 17:55:53 +0000 (13:55 -0400)]
PR12151: Fix recursion problem, add stable synthetic var reading functions

elaborate.cxx - When checking for stable flag, does not follow
functioncall chains. All stable functions are now identified at beginning
of semantic_pass_opt_7.

tapsets.cxx - In non guru-mode, context variable reading functions
are cached.  Moved optimization step 7 after duplicate functioncall
pass to remove duplicate synthetic functions first.

9 years agoPR12151: Mark tapset functions with /* stable */ flag
Felix Lu [Wed, 5 Aug 2015 14:43:08 +0000 (10:43 -0400)]
PR12151: Mark tapset functions with /* stable */ flag

Added flags for pure functions with empty parameter list.

9 years agoPR12151: Loop optimizations
Felix Lu [Fri, 31 Jul 2015 18:05:40 +0000 (14:05 -0400)]
PR12151: Loop optimizations

Functioncalls are now lifted into block enclosing top level loop.

9 years agoAdd testcases for stable optimization
Felix Lu [Thu, 30 Jul 2015 20:09:05 +0000 (16:09 -0400)]
Add testcases for stable optimization

* testsuite/systemtap.base/stable* - Testing to make sure that
the result of optimized script matches nonoptimized.
Also checks that the embedded-c functions are called the correct
number of times.

9 years agoPR12151: Improve optimization to block level
Felix Lu [Tue, 21 Jul 2015 15:52:00 +0000 (11:52 -0400)]
PR12151: Improve optimization to block level

Try to memoize on a block to block basis

9 years agostap.1: draft document /* stable */
Frank Ch. Eigler [Mon, 20 Jul 2015 19:02:13 +0000 (15:02 -0400)]
stap.1: draft document /* stable */

Note rough semantics of new embedded-C function markup,
and its relationship to /* pure */.

9 years agoPR12151: Add new visitor
Felix Lu [Mon, 20 Jul 2015 15:37:03 +0000 (11:37 -0400)]
PR12151: Add new visitor

* elaborate.cxx - new visitor to support optimization

9 years agoFix PR2111 by autodocumenting syscall tapset.
Martin Cermak [Fri, 14 Aug 2015 13:58:08 +0000 (15:58 +0200)]
Fix PR2111 by autodocumenting syscall tapset.

* doc/SystemTap_Tapset_Reference/syscalls.py: Documentation generator.
* doc/SystemTap_Tapset_Reference/tapsets.tmpl: New syscalls section.
* doc/SystemTap_Tapset_Reference/Makefile.am: Generate syscall docs.
* Other updates are automake generated changes.

9 years agoFix listing_mode.exp
Felix Lu [Thu, 13 Aug 2015 13:41:22 +0000 (09:41 -0400)]
Fix listing_mode.exp

PR18075 changes caused listing_mode.exp to find untested probes
which are added in this commit.

9 years agoFix unprivileged_probes.exp by aligning it to PR18075 changes.
Martin Cermak [Thu, 13 Aug 2015 12:43:20 +0000 (14:43 +0200)]
Fix unprivileged_probes.exp by aligning it to PR18075 changes.

Commit 80e50fe71e0d98ee65198855c2223184492a069b brought new probes
that unprivileged_probes.exp wasn't aware of.  This change aligns
with documantation introduced in commit f0e06c0d391873a5b04aa8.

9 years agotestsuite C programs: fix some gcc warnings
Frank Ch. Eigler [Tue, 11 Aug 2015 15:46:54 +0000 (11:46 -0400)]
testsuite C programs: fix some gcc warnings

A few "undeclared function" warnings could make tests untested.
We ununtest a bunch.

9 years agoFix PR18769 by moving @__compat_task() macro.
Martin Cermak [Tue, 4 Aug 2015 14:58:56 +0000 (16:58 +0200)]
Fix PR18769 by moving @__compat_task() macro.

Moved the @__compat_task() macro from tapset/linux/syscalls.stpm
to tapset/macros.stpm so that both kernel and dyninst runtimes
can consume it.

9 years agoUpdate file mode for testsuite/buildok/stap_staticmarkers-detailed.stp
Martin Cermak [Mon, 3 Aug 2015 13:24:24 +0000 (15:24 +0200)]
Update file mode for testsuite/buildok/stap_staticmarkers-detailed.stp

Missing the 'execute' perm on stap_staticmarkers-detailed.stp causes
`ERROR: tcl error sourcing ./systemtap.pass1-4/buildok.exp` during
make installcheck.

9 years agoFix PR18711 by updating the netfilter code for new rhel-7.2 kernels.
Martin Cermak [Fri, 31 Jul 2015 15:40:18 +0000 (17:40 +0200)]
Fix PR18711 by updating the netfilter code for new rhel-7.2 kernels.

* buildrun.cxx (compile_pass): Add new netfilter autoconf test.
* runtime/linux/autoconf-netfilter-313b.c: New autoconf test.
* tapset-netfilter.cxx: (emit_module_decls): Add support for new
  netfilter code backported to kernel-3.10.0-284.el7.

9 years agosample scripts: add noptrace.txt, regen index
Frank Ch. Eigler [Tue, 28 Jul 2015 18:52:26 +0000 (14:52 -0400)]
sample scripts: add noptrace.txt, regen index

9 years agochecks for uprobes in the testsuite sdt_varname.exp
Snehal Phule [Thu, 23 Jul 2015 05:15:18 +0000 (10:45 +0530)]
checks for uprobes in the testsuite sdt_varname.exp

Signed-off-by:Snehal Phule <snehal@linux.vnet.ibm.com>

9 years agoSupport java-1.8.0-openjdk.
Martin Cermak [Wed, 22 Jul 2015 13:17:04 +0000 (15:17 +0200)]
Support java-1.8.0-openjdk.

9 years agoUpdate rename.c syscall test for 3.10.0-294.el7 kernels.
Martin Cermak [Thu, 16 Jul 2015 14:33:31 +0000 (16:33 +0200)]
Update rename.c syscall test for 3.10.0-294.el7 kernels.

On ppc64le, 'renameat2' syscall is unimplemented as defined in the
arch/powerpc/include/asm/systbl.h file. This change also allows
'renameat2' syscall to succeed when renaming a directory to a file
in case RENAME_EXCHANGE is defined.

9 years agoUpdate arch_compile_flag_{name,bits}(). The ppc64le is 64bit only.
Martin Cermak [Thu, 16 Jul 2015 14:29:18 +0000 (16:29 +0200)]
Update arch_compile_flag_{name,bits}(). The ppc64le is 64bit only.

9 years agosystemtap.spec changes for ppc64{be,le} java helper library symlinking
Lukas Berk [Wed, 15 Jul 2015 15:22:17 +0000 (11:22 -0400)]
systemtap.spec changes for ppc64{be,le} java helper library symlinking

systemtap.spec - remove special clauses ppc64{be,le} linking

9 years agoAdd ppc64le to java/Makefile.*
Lukas Berk [Wed, 15 Jul 2015 14:46:27 +0000 (10:46 -0400)]
Add ppc64le to java/Makefile.*

java/Makefile.am - add JAVA_ARCH override for ppc64le
java/Makefile.in - add JAVA_ARCH override for ppc64le

9 years agoUpdate the [nd_]syscall.clone probe aliases for rawhide.
David Smith [Tue, 14 Jul 2015 21:19:11 +0000 (16:19 -0500)]
Update the [nd_]syscall.clone probe aliases for rawhide.

* tapset/linux/syscalls.stp: Add '_do_fork' as an alternate probe point
  for syscall.fork. Kernel commit 3033f14ab78c32 renamed 'do_fork' to
  '_do_fork'.
* tapset/linux/nd_syscalls.stp: Ditto.

9 years agoPR18630: New testcase for dwarfless parameters from a uprobe.
Martin Cermak [Tue, 14 Jul 2015 06:05:50 +0000 (08:05 +0200)]
PR18630: New testcase for dwarfless parameters from a uprobe.

* tapset/s390/registers.stp: Remove constraint added by commit
  eefd579b blocking data acquistion from a uprobe. This is per
  PR18649#c1 and subsequent IRC chat with dsmith, the author
  of the constraint.
* testsuite/systemtap.base/uprobe_nd_params.exp: New testcase.

9 years agoPR18650: Fix longlong_arg() for powerpc uprobes.
Martin Cermak [Tue, 14 Jul 2015 06:03:53 +0000 (08:03 +0200)]
PR18650: Fix longlong_arg() for powerpc uprobes.

9 years agocoverity fixes: uninitialized class members
Frank Ch. Eigler [Mon, 13 Jul 2015 21:41:41 +0000 (17:41 -0400)]
coverity fixes: uninitialized class members

Pro tip: POD class members need explicit initialization.

9 years agosystemtap.spec: don't prereq prelink on recent fedoras
Frank Ch. Eigler [Sat, 11 Jul 2015 19:15:22 +0000 (15:15 -0400)]
systemtap.spec: don't prereq prelink on recent fedoras

prelink is deprecated, so while my heart will go on,
its stap support & testing won't.

9 years agoAdd a note to tapset/i386/registers.stp about grabbing the stack pointer.
David Smith [Fri, 10 Jul 2015 16:51:00 +0000 (11:51 -0500)]
Add a note to tapset/i386/registers.stp about grabbing the stack pointer.

9 years agoAdd a small syscall tapset fix found by source analysis.
David Smith [Fri, 10 Jul 2015 16:41:56 +0000 (11:41 -0500)]
Add a small syscall tapset fix found by source analysis.

* tapset/linux/syscalls.stp: Change the accept4 probe to use the
  @__syscall_nr_gate() macro instead of calling @__syscall_compat_gate().
  This generates better code.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls.stpm: Add __syscall_nr_gate() macro.
* testsuite/systemtap.syscall/execveat.c: Allow for syscall being
  non-implemented.
* testsuite/systemtap.syscall/getrandom.c: Ditto.
* testsuite/systemtap.syscall/memfd_create.c: Ditto.
* testsuite/systemtap.syscall/sched_attr.c: Ditto.

9 years agoBZ1241971: add --with-python3 to configury for /usr/bin/dtrace
Frank Ch. Eigler [Fri, 10 Jul 2015 14:52:47 +0000 (10:52 -0400)]
BZ1241971: add --with-python3 to configury for /usr/bin/dtrace

Preparing for a python3-only world.
Get off my lawn.

9 years agoFix PR18651: An nd_syscall tapset cleanup based on PR18597 fix.
Martin Cermak [Fri, 10 Jul 2015 14:58:53 +0000 (16:58 +0200)]
Fix PR18651: An nd_syscall tapset cleanup based on PR18597 fix.

9 years agocontinue gettextizing & configury & po update
Frank Ch. Eigler [Thu, 9 Jul 2015 15:05:49 +0000 (11:05 -0400)]
continue gettextizing & configury & po update

(As refreshed on f21.)

9 years agogettextize to gettext 0.19
Ivan Diorditsa [Fri, 3 Jul 2015 10:54:38 +0000 (13:54 +0300)]
gettextize to gettext 0.19

9 years agoFixed PR18634 by getting timer probes to compile on rawhide.
David Smith [Tue, 7 Jul 2015 19:01:27 +0000 (14:01 -0500)]
Fixed PR18634 by getting timer probes to compile on rawhide.

* runtime/linux/timer.c (_stp_hrtimer_init): If STAPCONF_HRTIMER_GET_RES
  isn't defined, meaning hrtimer_get_res() doesn't exist, just use the
  'hrtimer_resolution' variable.
* buildrun.cxx (compile_pass): Add an export test for hrtimer_get_res().
* translate.cxx (emit_common_header): Remove generated inclusion of
  linux/hrtimer.h.
* runtime/linux/timer.h: Add inclusion of linux/hrtimer.h.

9 years agoFixed BZ1240682 by fixing a rawhide compile problem.
David Smith [Tue, 7 Jul 2015 15:41:43 +0000 (10:41 -0500)]
Fixed BZ1240682 by fixing a rawhide compile problem.

* translate.cxx (translate_pass): Move the inclusion of runtime.h up
  before the declaration of the module refresh mutex, to avoid compilation
  problems on rawhide.

9 years agoPR18555: prefer linkage_name to match the symtab
Josh Stone [Mon, 6 Jul 2015 18:35:51 +0000 (11:35 -0700)]
PR18555: prefer linkage_name to match the symtab

DW_AT_name is usually only the same as the symbol table for C.  C++
names are mangled, which may be given by DW_AT_linkage_name.  So if we
want to compare a DWARF subprogram to the symbol table by name, we
should prefer the linkage name when it's available.

This mattered especially for ppc64le, where query_dwarf_func was trying
to apply the global/local symbol offset.  When we took a DWARF C++
function and tried to find that name in the symbol table for its offset,
there was no match, so the function wouldn't be resolved at all.

Now that lookup uses the linkage name.  If there's still no match, like
with a stripped symbol table, then it falls through to just use DWARF's
entrypc as usual.

This patch also maintains the raw "addr" and offset "entrypc" separately
for symbol table functions, so for instance update_symtab can still
compare the original address.

9 years agoExtend expect timeout for bz1027459.exp (wrt. Pass 2/syscall.*)
Martin Cermak [Fri, 3 Jul 2015 09:00:13 +0000 (11:00 +0200)]
Extend expect timeout for bz1027459.exp (wrt. Pass 2/syscall.*)

9 years agoSimplify a few syscall probes and handle RHEL5 kernels a bit better.
David Smith [Thu, 2 Jul 2015 19:18:52 +0000 (14:18 -0500)]
Simplify a few syscall probes and handle RHEL5 kernels a bit better.

* tapset/linux/nd_syscalls.stp (nd_syscall.truncate): Simplified with fix
  to long_arg() properly returning negative values.
  (nd_syscall.keyctl): Ditto.
* tapset/linux/nd_syscalls2.stp (nd_syscall.quotactl): Only skip calls if
  we're on a kernel >= 2.623, when sys32_quotactl() was introduced.
  (syscall.truncate): Simplified.
* tapset/linux/syscalls2.stp (syscall.quotactl): Only skip calls if we're
  on a kernel >= 2.623, when sys32_quotactl() was introduced.
  (syscall.truncate): Matches more closely with the nd_syscall version,
  which fixed a problem on RHEL5.
* tapset/linux/x86_64/syscalls.stp (syscall.get_thread_area): Added
  support for RHEL5 kernels.
  (syscall.set_thread_area): Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/fallocate.c: Properly handle ppc calls.
* testsuite/systemtap.syscall/keyctl.c: Handle keyctl() being
  non-implemented.
* testsuite/systemtap.syscall/readahead.c: Handle ppc problems and glibc <
  2.8 problems.
* testsuite/systemtap.syscall/readdir.c: Handle readdir() being
  non-implemented.
* testsuite/systemtap.syscall/rt_signal.c (main): Handle
  rt_tgsigqueueinfo() being non-implemented.
* testsuite/systemtap.syscall/uselib.c: Make sure we're on kernel >=
  2.6.22, since before that uselib() could call quiet_ni_syscall(), which
  we can't probe since it is in assembly.

9 years agoReplace '_stp_is_compat_task()' calls with the appropriate macro.
David Smith [Thu, 2 Jul 2015 13:55:30 +0000 (08:55 -0500)]
Replace '_stp_is_compat_task()' calls with the appropriate macro.

* tapset/linux/aux_syscalls.stp: Replace all _stp_is_compat_task() tapset
  code calls with the appropriate macro. This ensures they are all marked
  "pure".
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/s390/aux_syscalls.stp: Ditto.
* tapset/linux/syscalls.stpm: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.

9 years agoFixed PR18597 by returning negative values correctly from long_arg().
David Smith [Wed, 1 Jul 2015 17:27:21 +0000 (12:27 -0500)]
Fixed PR18597 by returning negative values correctly from long_arg().

* tapset/powerpc/registers.stp (_stp_arg2): New function that fixes the
  problem with _stp_arg() where long_arg() doesn't handle negative values
  correctly. Callers can also force a 64-bit returned value.
  (longlong_arg): Force a 64-bit return value.
* tapset/s390/registers.stp: Ditto.
* tapset/x86_64/registers.stp: Ditto.
* tapset/linux/nd_syscalls2.stp: Simplified nd_syscall.sync_file_range.
* tapset/linux/nd_syscalls.stp: Simplified nd_syscall.io_submit.
* testsuite/systemtap.syscall/pread.c: Add more 64-bit values to test.
* testsuite/systemtap.syscall/pwrite.c: Ditto.

9 years agoVarious fixes for test failures caused by implicit warnings.
Mark Wielaard [Tue, 30 Jun 2015 22:34:32 +0000 (00:34 +0200)]
Various fixes for test failures caused by implicit warnings.

Add various function and variable declarations and/or includes for
failures caused by new gcc warnings -Wimplicit-function-declaration
or -Wimplicit-int.

9 years agoInclude unistd.h in uprobe_stmt_num.c
Mark Wielaard [Tue, 30 Jun 2015 21:53:28 +0000 (23:53 +0200)]
Include unistd.h in uprobe_stmt_num.c

Fixes compile test failure because of new gcc warning:
warning: implicit declaration of function 'sleep'

9 years agoInclude stdlib.h in uprobe_stmt_num.c
Mark Wielaard [Tue, 30 Jun 2015 21:47:36 +0000 (23:47 +0200)]
Include stdlib.h in uprobe_stmt_num.c

Fixes compile test failure because of new gcc warning:
warning: implicit declaration of function 'srand'

9 years agoInclude string.h in pthreadprobes.c
Mark Wielaard [Tue, 30 Jun 2015 21:40:23 +0000 (23:40 +0200)]
Include string.h in pthreadprobes.c

Fixes compile test failure because of new gcc warning:
warning: implicit declaration of function 'strcmp'

9 years agounwind.c (compute_expr): Don't fallthrough after div/mod/shr.
Mark Wielaard [Tue, 30 Jun 2015 19:54:28 +0000 (21:54 +0200)]
unwind.c (compute_expr): Don't fallthrough after div/mod/shr.

When processing DW_OP_div, DW_OP_mod or DW_OP_shr compute_expr
would accidentially fallthrough to the next case statement causing
the DWARF value stack to contain wrong values.

9 years agoTwo small stat code fixes found by source analysis.
David Smith [Tue, 30 Jun 2015 20:24:54 +0000 (15:24 -0500)]
Two small stat code fixes found by source analysis.

* runtime/stat-common.c (_stp_stat_print_histogram_buf): Fixed small
  potential overflow problem by widening values.
* runtime/stat.c (_stp_stat_init): Fixed missing 'va_end' call in an error
  situation.

9 years agoPR18571: tapset support bpf and seccomp syscalls
Martin Cermak [Fri, 26 Jun 2015 08:22:37 +0000 (10:22 +0200)]
PR18571: tapset support bpf and seccomp syscalls

NEWS: Deprecate seccomp's 'uargs' in favor of 'uargs_uaddr'.
tapset/linux/aux_syscalls.stp: New _seccomp_op_str() and _bpf_cmd_str().
tapset/linux/nd_syscalls.stp: New probe nd_syscall.bpf.
tapset/linux/nd_syscalls2.stp: Update probe nd_syscall.seccomp.
tapset/linux/syscalls.stp: New probe syscall.bpf.
tapset/linux/syscalls2.stp: Update probe syscall.seccomp.
testsuite/buildok/aux_syscalls-embedded.stp: Test _seccomp_op_str(), _bpf_cmd_str().
testsuite/buildok/nd_syscalls-detailed.stp: Test probe nd_syscall.bpf.
testsuite/buildok/nd_syscalls2-detailed.stp: Update test for probe nd_syscall.seccomp.
testsuite/buildok/syscalls-detailed.stp: Test probe syscall.bpf.
testsuite/buildok/syscalls2-detailed.stp: Update test for probe syscall.seccomp.
testsuite/systemtap.syscall/bpf.c: New testcase.
testsuite/systemtap.syscall/seccomp.c: New testcase.

9 years agoFixed PR18598 by adding a build test case for tapset/stap_staticmarkers.stp.
David Smith [Thu, 25 Jun 2015 18:00:00 +0000 (13:00 -0500)]
Fixed PR18598 by adding a build test case for tapset/stap_staticmarkers.stp.

* testsuite/buildok/stap_staticmarkers-detailed.stp: New test case.

9 years agoFixed PR18577 by making 'stap -l **' faster.
David Smith [Thu, 25 Jun 2015 14:46:39 +0000 (09:46 -0500)]
Fixed PR18577 by making 'stap -l **' faster.

* tapsets.cxx (suggest_marks): Don't generate the suggestion list if we're
  in either of the listing modes (-l/-L) and the verbose level is less
  than 2.
  (suggest_plt_functions): Ditto.
  (suggest_dwarf_functions): Ditto.
* elaborate.cxx (suggest_functors): Ditto.
* elaborate.h: Updated suggest_functors declaration.
* tapset/linux/rpc.stp: Make some optional probes more optional.
* tapset/linux/scsi.stp: Ditto.
* tapset/linux/signal.stp: Ditto.
* tapset/linux/syscalls2.stp: Ditto.
* tapset/linux/nd_syscalls2.stp: Ditto.

9 years agoPR18075 documentation
Felix Lu [Wed, 24 Jun 2015 20:49:38 +0000 (16:49 -0400)]
PR18075 documentation

9 years agoPR18075 add callee.return probes
Felix Lu [Tue, 23 Jun 2015 19:57:48 +0000 (15:57 -0400)]
PR18075 add callee.return probes

9 years agoPR18462: Allow library macro deprecation
Martin Cermak [Tue, 23 Jun 2015 06:36:46 +0000 (08:36 +0200)]
PR18462: Allow library macro deprecation

Parts of the tapset code can get deprecated using conditionals as
described in the HACKING file. This patch extends this to library
macros, which can now get deprecated too. Patch includes example
macro deprecation and a testcase.

* NEWS: Mention '__int32_compat' library macro deprecation.
* parse.cxx: Allow library macro deprecation.
* tapset/linux/syscalls.stpm: Deprecate '__int32_compat' macro.
* testsuite/parseok/macros09.stp: New testcase.

9 years agoPR13664: test that map indexes don't propagate dwarf types
Josh Stone [Mon, 22 Jun 2015 20:26:38 +0000 (13:26 -0700)]
PR13664: test that map indexes don't propagate dwarf types

9 years agoruntime/unwind.c: Also sanity check DWARF regno for DW_CFA_restore[_extended].
Mark Wielaard [Mon, 22 Jun 2015 14:57:59 +0000 (16:57 +0200)]
runtime/unwind.c: Also sanity check DWARF regno for DW_CFA_restore[_extended].

When processCFI wanted to restore a register state to its initial value it
wasn't checking whether the register was actually interesting (or existing).
DWARF_REG_MAP might return a marker (9999) that we don't know or don't care
about this register. This was checked in all the set_*_rule functions, but
not in the case we reset the rule of the register. Add this check also for
DW_CFA_restore[_extended].

9 years agoFixed PR18563 by updating mbrwatch.meta.
David Smith [Fri, 19 Jun 2015 18:26:41 +0000 (13:26 -0500)]
Fixed PR18563 by updating mbrwatch.meta.

* testsuite/systemtap.examples/io/mbrwatch.meta: Update to ignore any
  devices called 'sr[0-0]', which on ppc64 aren't disk drives.

9 years agoFixed PR18562 by updating listing_mode.exp for systems without uprobes.
David Smith [Fri, 19 Jun 2015 18:08:23 +0000 (13:08 -0500)]
Fixed PR18562 by updating listing_mode.exp for systems without uprobes.

* testsuite/systemtap.base/listing_mode.exp: For systems without uprobes,
  such as ia64 and some s390x kernels, mark probes requiring uprobes as
  untested.

9 years agoPR17737 cont'd: switch to out-of-line xsl parameter file
Frank Ch. Eigler [Fri, 19 Jun 2015 14:04:33 +0000 (10:04 -0400)]
PR17737 cont'd: switch to out-of-line xsl parameter file

The "generate.toc" parameter is a PITA to pass on the xmlto command
line with --stringparam, because it's whitespace-laden and structured.
So instead we switch to the "xmlto -m FRAGMENT.xml" mechanism.

9 years agoscripts/update-docs: reduce effort
Frank Ch. Eigler [Fri, 19 Jun 2015 13:59:29 +0000 (09:59 -0400)]
scripts/update-docs: reduce effort

Do only a partial checkout and build only the docs, if possible.

9 years agoImproved spawned process cleanup in stmt_counting.exp and valid_pid.exp.
David Smith [Thu, 18 Jun 2015 17:56:12 +0000 (12:56 -0500)]
Improved spawned process cleanup in stmt_counting.exp and valid_pid.exp.

* testsuite/systemtap.base/stmt_counting.exp: Properly call "close" and
  "wait" after "spawn" call.
* testsuite/systemtap.base/valid_pid.exp: Ditto.

9 years agoFixed PR17831 by making kprobes_onthefly.exp more robust.
David Smith [Thu, 18 Jun 2015 17:46:43 +0000 (12:46 -0500)]
Fixed PR17831 by making kprobes_onthefly.exp more robust.

* testsuite/systemtap.onthefly/kprobes_onthefly.exp: Switch from probing
  'vfs.read' and 'vfs.read.return' to probing the underlying kernel
  function to avoid inlines, which confused the output.

9 years agoMark json-detailed.stp as an expected fail in buildok-dyninst.exp.
David Smith [Wed, 17 Jun 2015 18:34:40 +0000 (13:34 -0500)]
Mark json-detailed.stp as an expected fail in buildok-dyninst.exp.

* testsuite/systemtap.pass1-4/buildok-dyninst.exp: Mark json-detailed.stp
  as an expected fail since it requires procfs probes.

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