]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agoadd mismatch_complexity
Jonathan Lebon [Mon, 11 Nov 2013 17:19:35 +0000 (12:19 -0500)]
add mismatch_complexity

The mismatch_complexity variable allows us to only print out the most
complex kind of mismatch, and skip over simpler mismatches, in order to
keep the mismatch reporting as simple to understand as possible.

When assert_resolvability is false, mismatch_complexity simply remembers
the most complex mismatch we've met so far during each pass (e.g.
unresolved() is 0, mismatch(e) is 1, mismatch(tok, t1, t2) is 2, and
mismatch(tok, t, decl, index) is 3).

Once we turn on assert_resolvability, we check mismatch_complexity in
mismatch() and unresolved() to determine whether to print out an error
or not. If mismatch_complexity is higher than our own complexity, then
we don't print anything since we know that there is a better-suited
mismatch coming up.

10 years agoimplement resolved() and mismatch() and use them
Jonathan Lebon [Mon, 11 Nov 2013 17:05:42 +0000 (12:05 -0500)]
implement resolved() and mismatch() and use them

We finally complete the new function bodies. In resolved(), we add items
to the resolved_types vector, while in mismatch(), we retrieve from the
vector to print out exactly where the decl type was initially resolved.

10 years agonew resolved_type struct and mismatch/resolved functions
Jonathan Lebon [Mon, 11 Nov 2013 16:34:39 +0000 (11:34 -0500)]
new resolved_type struct and mismatch/resolved functions

The resolved_type struct holds all the information about a newly
resolved decl. The token 'tok' holds where the resolution occurred, and
'index' is the position of the function-argument/array-index of the
decl.

The vector resolved_types will hold all the decls we resolve. A new
resolved() function is introduced which will add elements to the vector,
while an analogous mismatch() function will be used to report mismatches
between type and resolved decl.

10 years agoremove resolved_toks and printed_toks
Jonathan Lebon [Mon, 11 Nov 2013 16:20:29 +0000 (11:20 -0500)]
remove resolved_toks and printed_toks

This patch reverts commit d5f0c423 (which introduced the "type was first
inferred here" message) in anticipation for a replacement.

10 years agoMakefile.am: give warning if %_topdir is not writeable
Jonathan Lebon [Tue, 12 Nov 2013 16:29:53 +0000 (11:29 -0500)]
Makefile.am: give warning if %_topdir is not writeable

10 years agoAdd tapset/arm64/aux_syscalls.stp
William Cohen [Mon, 11 Nov 2013 19:20:35 +0000 (14:20 -0500)]
Add tapset/arm64/aux_syscalls.stp

The AArch64 processor needs to have _arch_ptrace_argstr() function
defined so anything using the syscall.ptrace probe will function.

10 years agoAdd basic register access support for arm64
William Cohen [Mon, 11 Nov 2013 18:42:54 +0000 (13:42 -0500)]
Add basic register access support for arm64

The no dwarf syscalls tapset needs some code to access the syscall
parameters.  This is a first pass to add the support for the ARM64
architecture.

10 years agoFixed a typo introduced in commit 7acb3e34.
Miroslav Franc [Mon, 11 Nov 2013 14:55:24 +0000 (08:55 -0600)]
Fixed a typo introduced in commit 7acb3e34.

* runtime/linux/uprobes-common.c (stap_uprobe_change_plus): The outer if
  statement use curly braces to create a block, however the ending
  curly brace ended up outside macro conditional.

10 years agodon't require .config and Module.symvers for dyninst runtime
Adrian Negreanu [Fri, 8 Nov 2013 13:24:08 +0000 (15:24 +0200)]
don't require .config and Module.symvers for dyninst runtime

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
10 years agoRevert commit 65ddca0 since s390x can get get syscall arguments 7+.
David Smith [Fri, 8 Nov 2013 17:01:20 +0000 (11:01 -0600)]
Revert commit 65ddca0 since s390x can get get syscall arguments 7+.

* tapset/linux/nd_syscalls2.stp (nd_syscall.pselect7): Since the fix for
  PR15913, s390x systems can get arguments 7 (and following) off the
  stack. Revert commit 65ddca0 which hardcoded argument 7 to -1.
  (nd_syscall.compat_pselect7): Ditto.

10 years agostap.1: remove 'experimental' designation from regex/macro blurbs
Frank Ch. Eigler [Fri, 8 Nov 2013 15:37:02 +0000 (10:37 -0500)]
stap.1: remove 'experimental' designation from regex/macro blurbs

10 years agostapdyn: Tighten BPatch insertion sets
Josh Stone [Thu, 7 Nov 2013 23:30:42 +0000 (15:30 -0800)]
stapdyn: Tighten BPatch insertion sets

We were doing insertion sets in instrument_object_dynprobes(),
regardless of whether there was even a target match.  This sometimes
triggers bad corner cases in Dyninst when the finalize tries to go do
things in a nascent process, with no action actually needed.  While this
gets investigated in Dyninst, we can narrow down our insertion sets to
instrument_dynprobe_target(), where at least we know it's a match.

10 years agosystemtap.spec: specify /usr for udev rules on UsrMove systems
Jonathan Lebon [Thu, 7 Nov 2013 15:42:21 +0000 (10:42 -0500)]
systemtap.spec: specify /usr for udev rules on UsrMove systems

Hopefully rpmdiff will like that better.

10 years agoAdd basic print_regs() support for aarch64
William Cohen [Wed, 6 Nov 2013 12:29:08 +0000 (07:29 -0500)]
Add basic print_regs() support for aarch64

Signed-off-by: William Cohen <wcohen@redhat.com>
10 years agoAdd basic aarch64 support for kprobes
William Cohen [Sun, 27 Oct 2013 19:03:18 +0000 (15:03 -0400)]
Add basic aarch64 support for kprobes

Signed-off-by: William Cohen <wcohen@redhat.com>
10 years agoPR16132: staprun: fix a comment to not remove a not double not negative. not.
Frank Ch. Eigler [Thu, 7 Nov 2013 01:45:57 +0000 (20:45 -0500)]
PR16132: staprun: fix a comment to not remove a not double not negative.  not.

10 years agoPR16132: staprun: fix fallback for openat/open modes for debugfs trace%d
Frank Ch. Eigler [Wed, 6 Nov 2013 23:24:51 +0000 (18:24 -0500)]
PR16132: staprun: fix fallback for openat/open modes for debugfs trace%d

Previous code got confused as to how many trace%d files to open and
where.  Now we openat() only from the incoming staprun/stapio -F fd
directory, or open() right from /sys/kernel/debug/systemtap/..., with
no hanky panky between them.

10 years agoNEWS: add timestamp of 2.4 release
Frank Ch. Eigler [Wed, 6 Nov 2013 17:17:12 +0000 (12:17 -0500)]
NEWS: add timestamp of 2.4 release

10 years agoversion bump and autoreconf
Jonathan Lebon [Wed, 6 Nov 2013 17:11:25 +0000 (12:11 -0500)]
version bump and autoreconf

10 years agopre-release version bump release-2.4
Frank Ch. Eigler [Wed, 6 Nov 2013 16:33:23 +0000 (11:33 -0500)]
pre-release version bump

10 years agoPR16129: add task_work handling for utrace_death events
David Smith [Wed, 6 Nov 2013 16:18:04 +0000 (11:18 -0500)]
PR16129: add task_work handling for utrace_death events

* runtime/stp_utrace.c (utrace_report_work): New task_work callback
  for handling utrace_report_death events.
  (utrace_cleanup, utrace_task_alloc, utrace_free): Manage its cleanup.

10 years agoNEWS re. stap-server ssl: mention changes
Frank Ch. Eigler [Wed, 6 Nov 2013 15:31:44 +0000 (10:31 -0500)]
NEWS re. stap-server ssl: mention changes

10 years agostap-server ssl: enable all cipher suites manually
Frank Ch. Eigler [Wed, 6 Nov 2013 14:52:25 +0000 (09:52 -0500)]
stap-server ssl: enable all cipher suites manually

On some versions of NSS, NSS_SetDomesticPolicy doesn't work right,
so let's use lower-level functions with the appropriate (zero)
level of return-code checking.

10 years agostap-server ssl: enable all cipher suites
Frank Ch. Eigler [Wed, 6 Nov 2013 13:34:22 +0000 (08:34 -0500)]
stap-server ssl: enable all cipher suites

The "export" set of cipher suites is too limited and going away.

10 years agotapset: Decode SIGTRAP|0x80 from PTRACE_O_TRACESYSGOOD
Josh Stone [Wed, 6 Nov 2013 01:24:52 +0000 (17:24 -0800)]
tapset: Decode SIGTRAP|0x80 from PTRACE_O_TRACESYSGOOD

10 years agoCONFIG_UIDGID_STRICT_TYPE_CHECKS workaround, cont'd
Frank Ch. Eigler [Tue, 5 Nov 2013 21:07:54 +0000 (16:07 -0500)]
CONFIG_UIDGID_STRICT_TYPE_CHECKS workaround, cont'd

The stap runtime doesn't play that well with k[gu]id_t and namespaces.
$SUBJECT kconfig option highlights the extent to which we use [ug]id_t.
An earlier commit 857163157b8 papered over the problem to some extent;
the present commit adds anothet coat of slop to cover the cracks.

10 years agotestsuite: disable color_parsing staprun tests unless instaltest_p
Frank Ch. Eigler [Tue, 5 Nov 2013 16:29:18 +0000 (11:29 -0500)]
testsuite: disable color_parsing staprun tests unless instaltest_p

10 years agotestsuite: disable sdt_asm.exp unless installtest_p
Frank Ch. Eigler [Tue, 5 Nov 2013 16:26:42 +0000 (11:26 -0500)]
testsuite: disable sdt_asm.exp unless installtest_p

10 years agoFix typo in man/error::7stap
Masanari Iida [Tue, 5 Nov 2013 15:21:32 +0000 (00:21 +0900)]
Fix typo in man/error::7stap

Correct spelling typo in man/error::7stap

10 years agorevert previous commit and strengthen inode_uprobes_p instead
Jonathan Lebon [Tue, 5 Nov 2013 17:29:25 +0000 (12:29 -0500)]
revert previous commit and strengthen inode_uprobes_p instead

10 years agodon't test uprobes_filtering.exp on RHEL5/6
Jonathan Lebon [Tue, 5 Nov 2013 16:16:16 +0000 (11:16 -0500)]
don't test uprobes_filtering.exp on RHEL5/6

We don't want to run this test on RHEL5/6, where we compile our own
uprobes module (there's no filtering possible anyway, since these
kernels don't support UPROBE_HANDLER_REMOVE).

10 years agoupdate user_string_n_quoted.exp test case
Jonathan Lebon [Tue, 5 Nov 2013 15:17:12 +0000 (10:17 -0500)]
update user_string_n_quoted.exp test case

With commit 7bec2c2, the default behaviour of user_string_n_quoted() has
changed. The test case is now updated to test that
user_string_n_quoted() trims strings according to input length and that
user_string_n2_quoted() trims strings according to output length given
the inverse parameters.

10 years agoauthors bump
Frank Ch. Eigler [Mon, 4 Nov 2013 19:01:40 +0000 (14:01 -0500)]
authors bump

10 years agoFix BZ1020853 by fixing procfs probe compile problems on newer kernels.
David Smith [Mon, 4 Nov 2013 17:18:39 +0000 (11:18 -0600)]
Fix BZ1020853 by fixing procfs probe compile problems on newer kernels.

* runtime/procfs.c (_stp_mkdir_proc_module): Support kern_path(), along
  with vfs_path_lookup().
* buildrun.cxx (compile_pass): Added 'exportconf' for kern_path().

10 years agoMerge branch 'jlebon/levensh'
Jonathan Lebon [Fri, 1 Nov 2013 22:11:11 +0000 (18:11 -0400)]
Merge branch 'jlebon/levensh'

10 years agoNEWS: mention improved suggestions
Jonathan Lebon [Fri, 1 Nov 2013 22:09:55 +0000 (18:09 -0400)]
NEWS: mention improved suggestions

10 years agoimprove levenshtein performance
Jonathan Lebon [Fri, 1 Nov 2013 18:57:40 +0000 (14:57 -0400)]
improve levenshtein performance

Doing this simple bypass has drastic performance consequences. E.g. when
matching against small-ish strings, we see ~10 time speed improvements,
while with larger strings we see slightly more than twice the speed.

See comments for explanation

10 years agofix off-by-one error in levenshtein
Jonathan Lebon [Fri, 1 Nov 2013 18:54:22 +0000 (14:54 -0400)]
fix off-by-one error in levenshtein

Well, this is embarrassing... I swear I tested it back then! This should
greatly improve accuracy for especially shorter strings.

10 years agoclarify msg for unresolved global in foreach loop
Jonathan Lebon [Fri, 1 Nov 2013 17:07:28 +0000 (13:07 -0400)]
clarify msg for unresolved global in foreach loop

Instead of printing the foreach token when the global array is
unresolved, print the array token.

10 years agolevensh suggest unresolved script functions
Jonathan Lebon [Fri, 1 Nov 2013 15:36:05 +0000 (11:36 -0400)]
levensh suggest unresolved script functions

probe begin { user_string_m() }
              ^ suggests user_string_n, user_string, user_string2, ...

10 years agoimprove function arity mismatch error msg
Jonathan Lebon [Fri, 1 Nov 2013 15:19:55 +0000 (11:19 -0400)]
improve function arity mismatch error msg

The symbolic semantic_pass now prints a clearer error when a function
matches by name, but not by arity. Previously, there was no distinction
between referencing a non-existent function and one that exists but does
not match arity.

Upon arity mismatch, we print both where the function call occurred, and
where the function was defined.

10 years agosuggest trace alternatives on mismatch
Jonathan Lebon [Fri, 1 Nov 2013 13:39:24 +0000 (09:39 -0400)]
suggest trace alternatives on mismatch

probe kernel.trace("sched_switchz") -> suggests sched_switch

10 years agosuggest PLT alternatives on mismatch
Jonathan Lebon [Fri, 1 Nov 2013 13:29:38 +0000 (09:29 -0400)]
suggest PLT alternatives on mismatch

probe process("ls").plt("getent") --> suggests getenv

10 years agoremove suggest_functions from dwarf_builder class
Jonathan Lebon [Fri, 1 Nov 2013 13:27:50 +0000 (09:27 -0400)]
remove suggest_functions from dwarf_builder class

And rename it to suggest_dwarf_functions. This will allow us to use it
from other builders, as we will see in an upcoming patch.

10 years agoadd plt_funcs to module_info
Jonathan Lebon [Fri, 1 Nov 2013 13:24:21 +0000 (09:24 -0400)]
add plt_funcs to module_info

PLT functions seen in a module are added to its module_info so that we
can provide suggestions in an upcoming patch.

10 years agomove visited_modules from dwarf_query to base_query
Jonathan Lebon [Fri, 1 Nov 2013 13:21:49 +0000 (09:21 -0400)]
move visited_modules from dwarf_query to base_query

The visited_modules set is now part of base_query. This helps us
centralize the place where modules are added to the set (in
query_module) and will be needed for implementing suggestions for
non-dwarf-related probes.

10 years agolevensh suggest unresolved struct member
Jonathan Lebon [Thu, 31 Oct 2013 21:55:10 +0000 (17:55 -0400)]
levensh suggest unresolved struct member

List alternatives in Levenshtein score order.

probe process("ls").function("print_file_name_and_frills") {
   println($f->linknode)
}              ^ suggests linkmode, linkname, linkok

10 years agolevensh suggest unresolved dwarf locals
Jonathan Lebon [Thu, 31 Oct 2013 21:34:34 +0000 (17:34 -0400)]
levensh suggest unresolved dwarf locals

List alternatives in Levenshtein score order.

probe process("ls").function("main") {
   println($argd)
}          ^ suggests argc, argv

10 years agolevensh suggest tracepoint variables
Jonathan Lebon [Thu, 31 Oct 2013 21:18:53 +0000 (17:18 -0400)]
levensh suggest tracepoint variables

List alternatives in Levenshtein score order.

probe kernel.trace("sched_switch") {
   println($nexts)
}          ^ suggests $next

10 years agolevensh suggest never-assigned vars
Jonathan Lebon [Thu, 31 Oct 2013 21:09:43 +0000 (17:09 -0400)]
levensh suggest never-assigned vars

List alternatives in Levenshtein score order.

Never-assigned local vars in probes:

probe begin { var = 1; println(vor) }
                               ^ suggests var

Never-assigned local vars in functions:

function func() { var = 1; println(vor) } \
   probe begin { func() }          ^ suggests var

Never-assigned global vars:

global bla, blo \
   probe begin { blo = 1; println(bla) }
       ^ suggests blo

10 years agolevensh suggest unresolved probe points
Jonathan Lebon [Thu, 31 Oct 2013 19:38:29 +0000 (15:38 -0400)]
levensh suggest unresolved probe points

This patch adds Levenshtein suggestion to match_node::find_and_build().
Suggestions are made in three cases:
   - Unresolved double-glob (e.g. syscall.poen**)
   - Unresolved glob (e.g. syscall.poen*)
   - Unresolved no-glob (e.g. kernel.functoin("bla"))

Note that suggestions for globby functors are based on the prefix part
only (part of functor prior to the **) to increase meaningfulness.

Example outputs:

syscall.poen --> similar: open, chown, fork, iopl, mount
kernel.functoin --> similar: function, data, trace, mark, statement

syscall.poen** --> similar: open, chown, fork, iopl, mount
syscall.poen* --> similar: open, chown, fork, iopl, mount
syscall.*poen --> similar: open, chown, ppoll, capget, capset
syscall.**poen --> similar: open, capget, capset, chown, fchown

Non-globby functors in general give good results. Globby stuff can be
troublesome:

sys**poen --> similar: nfs, vfs, _nfs, _vfs, end

10 years agorefactor levenshtein suggesting
Jonathan Lebon [Thu, 31 Oct 2013 17:45:58 +0000 (13:45 -0400)]
refactor levenshtein suggesting

In anticipation for a wider use of levenshtein(), we factor out the
common part into a new function levenshtein_suggest(). We then change
suggest_functions() to use levenshtein_suggest().

10 years agoRemoved unused code in tapset-method.cxx
Lukas Berk [Fri, 1 Nov 2013 19:27:46 +0000 (15:27 -0400)]
Removed unused code in tapset-method.cxx

*tapset-method.cxx - remove the unused bmoption_escape function

10 years agoFlip user_string_n_quoted to limit the input count
Josh Stone [Thu, 31 Oct 2013 22:03:34 +0000 (15:03 -0700)]
Flip user_string_n_quoted to limit the input count

The documentation of that function implies that it's counting n from the
input string, but in fact that limit was being applied to the output,
including quotes and escaping.

Now _stp_text_str takes two length parameters to limit the input count
and output size separately.  A new user_string_n2_quoted() lets you
specify both of these lengths, and user_string_n_quoted now uses that to
limit input length, or output still in compatibility mode.

Several syscall tapsets which read user buffers of known length will now
use user_string_n2_quoted to fit that.  This was seen in syscall.write
which may not necessarily have any '\0' at the end of its buffer.

10 years agoFix typo in man/stap.1
Masanari Iida [Wed, 30 Oct 2013 02:34:59 +0000 (11:34 +0900)]
Fix typo in man/stap.1

Correct spelling typo in man/stap.1

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
10 years agodebuginfo man pages: mention elfutils & compressed-debuginfo
Frank Ch. Eigler [Thu, 31 Oct 2013 14:40:35 +0000 (10:40 -0400)]
debuginfo man pages: mention elfutils & compressed-debuginfo

10 years agolast_100_frees example: make it even more lockless
Frank Ch. Eigler [Wed, 30 Oct 2013 20:39:24 +0000 (16:39 -0400)]
last_100_frees example: make it even more lockless

jistone advised that a global var++ was a source of
contention.  So, use a timestamp instead to order
the operations.

10 years agoNEWS: mention duplicate error elimination
Jonathan Lebon [Wed, 30 Oct 2013 20:13:32 +0000 (16:13 -0400)]
NEWS: mention duplicate error elimination

10 years agolast_100_frees example: run lock-free
Frank Ch. Eigler [Wed, 30 Oct 2013 20:12:44 +0000 (16:12 -0400)]
last_100_frees example: run lock-free

Switch to using an aggregate array (using a counter as the <<< operand
and @max+ at the reader-sorting side).

10 years agoPR16058 style fixups for other nd_syscalls aliases
Frank Ch. Eigler [Wed, 30 Oct 2013 16:10:43 +0000 (12:10 -0400)]
PR16058 style fixups for other nd_syscalls aliases

Specifically, nd_syscall.rt_sigtimedwait and .truncate used the same
erroneous

   probe alias = foo1, foo2 { }
   probe foo1 = kprobe.function("foo") ? { }
   probe foo2 = kprobe.function("foo") ? { }

construct, whereas the optionality should appear at the top-level alias
level.

10 years agoexamples: regen indexes
Frank Ch. Eigler [Wed, 30 Oct 2013 15:58:30 +0000 (11:58 -0400)]
examples: regen indexes

10 years agoexamples: correct -d stap => -d `which stap` for fullpath correctness
Frank Ch. Eigler [Wed, 30 Oct 2013 15:58:02 +0000 (11:58 -0400)]
examples: correct -d stap => -d `which stap` for fullpath correctness

10 years agoexamples: add last_100_frees
Frank Ch. Eigler [Wed, 30 Oct 2013 15:57:48 +0000 (11:57 -0400)]
examples: add last_100_frees

10 years agoremove STAPREGEX_STANDALONE definition
Jonathan Lebon [Tue, 29 Oct 2013 21:01:26 +0000 (17:01 -0400)]
remove STAPREGEX_STANDALONE definition

10 years agoMerge branch 'PR16019'
Jonathan Lebon [Wed, 30 Oct 2013 16:01:27 +0000 (12:01 -0400)]
Merge branch 'PR16019'

10 years agoPR16019: treat errors from tapsets/functions as non-critical
Jonathan Lebon [Wed, 30 Oct 2013 15:12:45 +0000 (11:12 -0400)]
PR16019: treat errors from tapsets/functions as non-critical

Since we now include parsing errors in seen_errors, we get an increase
in num_errors() which we didn't have before. This would cause the
function passes_0_4() to stop at pass 1 even when parsing errors only
occurred in tapset/macro files (previously, we simply issued a warning
and kept going).

We now pass a new flag, errs_as_warnings, to the parsing methods so that
whenever any parsing errors occur while parsing tapset or macro files,
systemtap_session::print_error() will not count the error towards the
num_errors() value.

The net effect is that prior to pass 1b (user script parsing), any error
is printed (along with a warning) but not counted. Warnings are still
emitted, so that -W will still stop everything.

Thus, from the user's standpoint, there is no change in behaviour prior
to these series of patches.

10 years agoPR16019: also report number of warnings suppressed
Jonathan Lebon [Tue, 29 Oct 2013 21:37:57 +0000 (17:37 -0400)]
PR16019: also report number of warnings suppressed

This patch also makes warnings sensitive to verbosity, just as it is
done for errors.

10 years agoPR16019: have the session object report & colorize suppression
Frank Ch. Eigler [Tue, 29 Oct 2013 21:03:42 +0000 (17:03 -0400)]
PR16019: have the session object report & colorize suppression

* session.cxx (report_suppression): New function.
* main.cxx (main): Call it.

10 years agoPR16019: use PARSE_ERROR macro in call sites
Jonathan Lebon [Tue, 29 Oct 2013 19:07:04 +0000 (15:07 -0400)]
PR16019: use PARSE_ERROR macro in call sites

Same as previous, but for PARSE_ERROR.

10 years agoPR16019: use SEMANTIC_ERROR macro in call sites
Jonathan Lebon [Tue, 29 Oct 2013 18:52:33 +0000 (14:52 -0400)]
PR16019: use SEMANTIC_ERROR macro in call sites

This patch simply adapts all semantic_error throws to use the new
SEMANTIC_ERROR macro.

10 years agoPR16019: improve duplicate error elimination
Jonathan Lebon [Mon, 21 Oct 2013 13:35:48 +0000 (09:35 -0400)]
PR16019: improve duplicate error elimination

Previously, we relied on exact string matching when considering whether
to print an error or not. This had the disadvantage of not filtering out
whenever the same error occurred on many different lines. Also, error
chains, which often provided context, were cut off, causing errors to be
more cryptic.

With this series of patches, this is how behaviour is modified:
   1. Errors are filtered out based on their source, i.e. the function
      and line at which the error was thrown. This means that slightly
      different error messages are still considered equivalent and
      eligible for duplicate elimination.
   2. Errors that get passed the filter are always printed with thei
      full chain to provide maximum context.
   3. When in verbose mode (just one -v), filtering is completely turned
      off and all errors are printed out.

This patch simply installs the mechanisms through which these
modifications will take place in the next patches.

- main.cxx: print out number of suppressed errors on cleanup
- session.cxx: rework the print_error() functions to account for
  chaining
- session.h: new function and variable declarations and modify
  parse_error object to hold errsrc
- staptree.h: modify semantic_error object to hold errsrc
- util.h: add helper macros for throwing errors which include source

You can use the SEMANTIC_ERROR and PARSE_ERROR macros to ease error
throwing. These macros automatically pass the the function and line
number to the error constructor.

10 years agoFix PR16096 by fixing nd_syscall.execve on i686.
David Smith [Tue, 29 Oct 2013 21:35:40 +0000 (16:35 -0500)]
Fix PR16096 by fixing nd_syscall.execve on i686.

* tapset/linux/nd_syscalls.stp (nd_syscall.execve): Add 'asmlinkage()'
  call to get first argument right.

10 years agoMake the ARM _stp_store_deref and _stp_deref more like kernel ARM uaccess.h macros
William Cohen [Tue, 29 Oct 2013 19:00:58 +0000 (15:00 -0400)]
Make the ARM _stp_store_deref and _stp_deref more like kernel ARM uaccess.h macros

The ARM uaccess.h macros for put_user and get_user do an explicit
typecast of the address into an unsigned long.  This typecast is
important for the __stp_get_user_asm_half and __stp_put_user_asm_half
macros.  Without it these macros attempt to do pointer and get an
incorrect address for the second byte of a 16-bit value.

10 years agoRevert "Make the 32-bit ARM get_user() and put_user() work for 16-bit quantities"
William Cohen [Tue, 29 Oct 2013 18:26:17 +0000 (14:26 -0400)]
Revert "Make the 32-bit ARM get_user() and put_user() work for 16-bit quantities"

This reverts commit eeb0dd0473dab6514425c71b04d201f33e81aa1b.

10 years agoMake the 32-bit ARM get_user() and put_user() work for 16-bit quantities
William Cohen [Tue, 29 Oct 2013 16:44:49 +0000 (12:44 -0400)]
Make the 32-bit ARM get_user() and put_user() work for 16-bit quantities

The 32-bit ARM does not have instructions to perform 16-bit loads or
stores.  The __get_user_asm_half and __put_user_asm_half macros
sythesize those operations.  However, in most cases the pointers
passed into these macros are pointers to 16-bit types and the pointer
arithmetic will end up pointing at the next 16-bit quantity rather
than the second half (byte) of the 16-bit quantity.  The macros need
to explicitly typecast the pointers as pointers to 8-bit quantities to
make the pointer arithmetic work out properly.

10 years agoAdd a vmalloc_node() for systems without it
Josh Stone [Mon, 28 Oct 2013 23:13:36 +0000 (16:13 -0700)]
Add a vmalloc_node() for systems without it

10 years agoAdd an example for tracking shared futexes
Josh Stone [Mon, 28 Oct 2013 22:42:46 +0000 (15:42 -0700)]
Add an example for tracking shared futexes

The existing futexes.stp does show shared futexes, but only by the
$uaddr which is specific to any given process.  This futexes2.stp tries
to show shared futexes by the inode path+offset of the mapping.  I found
this useful in examining stapdyn's pthread_mutexes in shm.

This also adds an inode_path() tapset function which tries to locate the
vfsmount containing an inode in the current namespace, and if found uses
task_dentry_path() to get a full path.

10 years agoFix 'syscall.accept' probe alias.
David Smith [Mon, 28 Oct 2013 21:35:43 +0000 (16:35 -0500)]
Fix 'syscall.accept' probe alias.

* tapset/linux/syscalls.stp (syscall.accept): Make sure optional probe
  points are marked as optional at the top, since optionalness passes down
  along alias definitions, not up.

10 years agoRefix PR16058 by updating the old syscall.mmap2/nd_syscall.mmap2 probes.
David Smith [Mon, 28 Oct 2013 21:33:05 +0000 (16:33 -0500)]
Refix PR16058 by updating the old syscall.mmap2/nd_syscall.mmap2 probes.

* tapset/linux/i386/syscalls.stp: Make sure optional probe points are
  marked as optional at the top, since optionalness passes down along
  alias definitions, not up.
* tapset/linux/i386/nd_syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp:
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.

10 years agostap.1: document -W switch
Jonathan Lebon [Mon, 28 Oct 2013 21:06:48 +0000 (17:06 -0400)]
stap.1: document -W switch

10 years agoFix compile problem on systems with nss 3.13 (like f15).
David Smith [Mon, 28 Oct 2013 19:30:35 +0000 (14:30 -0500)]
Fix compile problem on systems with nss 3.13 (like f15).

* stapsslerr.h: Only support SEC_ERROR_LEGACY_DATABASE if the nss version
  is 3.14.1 or greater.

10 years agoNEWS: mention more lockless aggregates
Frank Ch. Eigler [Fri, 25 Oct 2013 19:17:36 +0000 (15:17 -0400)]
NEWS: mention more lockless aggregates

10 years agoAllow "read-mostly" stats to elide locks
Josh Stone [Fri, 25 Oct 2013 00:02:53 +0000 (17:02 -0700)]
Allow "read-mostly" stats to elide locks

In c_unparser::emit_lock_decls, we invert read/write locks for stats
types, since they only need a shared lock for writing updates but an
exclusive lock for aggregation to read.  However, we didn't invert our
view of vcv_needs_global_locks across all probes, so it was impossible
for stats to ever get counted as "read-mostly" and elide locks.

Now the sense of vcv_needs_global_locks.read/written is swapped for
stats too, so those that are only aggregated in lock-free probes
(begin/end) can be completely lock-free.

10 years agostapdyn: Print dbug/warn/error messages with libc vsnprintf
Josh Stone [Thu, 24 Oct 2013 23:47:17 +0000 (16:47 -0700)]
stapdyn: Print dbug/warn/error messages with libc vsnprintf

The kernel runtime uses vscnprintf for these, which roughly follows
C99 rules, but the dyninst runtime was using _stp_vsnprintf, which is
not quite the same.  Since some runtime code is shared, we need
compatible format strings, so just use libc's vsnprintf here.

Also, one shm_dbug was using %zi for off_t, which isn't always correct
since we #define _FILE_OFFSET_BITS 64, so use PRIi64 instead.

10 years agostapdyn: send context-free DBUG messages to stderr
Josh Stone [Thu, 24 Oct 2013 23:00:38 +0000 (16:00 -0700)]
stapdyn: send context-free DBUG messages to stderr

Some debug messages occur outside of probe context, like shm_dbug,
so they would get an error trying to allocate the print buffer.  In
the particular case of shm initialization, the transport memory
doesn't even exist yet!

Now if there's not an active context, DBUG just goes to stderr.

10 years agoFilter duplicates out of globbed process names
Josh Stone [Thu, 24 Oct 2013 22:44:19 +0000 (15:44 -0700)]
Filter duplicates out of globbed process names

For example, process("/lib64/libpthread*") matches libpthread-2.17.so
and libpthread.so.0, but the latter is just a symlink to the former.  We
already canonicalized those names, but still had double the probes.

* tapsets.cxx (dwarf_builder::build): Track canonicalized name in a set
  so we can skip globbed names that resolve to the same thing.

10 years agoFix canonicalize_file_name() leaks
Josh Stone [Thu, 24 Oct 2013 21:56:06 +0000 (14:56 -0700)]
Fix canonicalize_file_name() leaks

This function allocates memory, but in a few places we weren't freeing
it.  We have a resolve_path() to do this correctly for std::string-happy
code, and this patch adds free() for the rest.

10 years agotestsuite client_args.exp: sanitize $uname from test-case-result strings
Frank Ch. Eigler [Thu, 24 Oct 2013 15:29:04 +0000 (11:29 -0400)]
testsuite client_args.exp: sanitize $uname from test-case-result strings

10 years agoman: use SAMPLE macro in remaining docs
Jonathan Lebon [Thu, 24 Oct 2013 14:02:25 +0000 (10:02 -0400)]
man: use SAMPLE macro in remaining docs

To be more consistent with the other man pages, all the remaining pages
had their SAMPLE macro modified in the same way (see commit 895c959).

- dtrace.1: add SAMPLE macro and replace manual RS/RE with it
- error::pass1.7stap: fix description on same line as .SH
- error::process-tracking.7stap: use new macro
- stapex.3stap: ditto
- stapprobes.3stap: ditto

10 years agoAdd another option for the lazy benchmarker
Josh Stone [Thu, 24 Oct 2013 07:06:13 +0000 (00:06 -0700)]
Add another option for the lazy benchmarker

10 years agonew misc. script: tracepoint-diff
Frank Ch. Eigler [Wed, 23 Oct 2013 18:57:53 +0000 (14:57 -0400)]
new misc. script: tracepoint-diff

A shell script to compare the list of tracepoints known
to perf vs. to systemtap.

10 years agoexpose linux arch/x86/.../irq_vectors.h tracepoints
Frank Ch. Eigler [Wed, 23 Oct 2013 18:56:55 +0000 (14:56 -0400)]
expose linux arch/x86/.../irq_vectors.h tracepoints

These cute little fellas hide under arch/x86/include/asm/trace/*.h in
the source tree.

10 years agoRename the 'examples' symlink to 'EXAMPLES'
Josh Stone [Wed, 23 Oct 2013 17:01:33 +0000 (10:01 -0700)]
Rename the 'examples' symlink to 'EXAMPLES'

This avoids a conflict with the way systemtap.spec is munging the
examples for %doc (rhbz 1022483), and in caps it will also be closer to
the top of the naive sorting in gitweb.

10 years agostapvirt: use non-blocking streams
Jonathan Lebon [Mon, 21 Oct 2013 13:38:00 +0000 (09:38 -0400)]
stapvirt: use non-blocking streams

This was supposed to be part of the initial release (whoops!). The
current code is already capable of dealing with non-blocking streams.

10 years agonote in man/error::sdt last-ditch possibility of disabling <sys/sdt.h>
Frank Ch. Eigler [Mon, 21 Oct 2013 00:09:05 +0000 (20:09 -0400)]
note in man/error::sdt last-ditch possibility of disabling <sys/sdt.h>

10 years agoman pages: suppress hyphenation/filling for SEE ALSO list
Frank Ch. Eigler [Mon, 21 Oct 2013 00:04:24 +0000 (20:04 -0400)]
man pages: suppress hyphenation/filling for SEE ALSO list

... since this list often contains URLs and longer names

10 years agoadd error::sdt man page
Frank Ch. Eigler [Sun, 20 Oct 2013 23:57:36 +0000 (19:57 -0400)]
add error::sdt man page

Help folks who encounter <sys/sdt.h> parsing or compilation problems.

10 years agoFix PR16058 by updating the old syscall.mmap2/nd_syscall.mmap2 probe aliases.
David Smith [Fri, 18 Oct 2013 18:49:45 +0000 (13:49 -0500)]
Fix PR16058 by updating the old syscall.mmap2/nd_syscall.mmap2 probe aliases.

* tapset/linux/i386/syscalls.stp: Break the 'mmap2' probe alias down into
  subprobes, so that 'pgoff' can be converted to a number of bytes when
  necessary.
* tapset/linux/i386/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.

10 years agoanother irker test
Frank Ch. Eigler [Fri, 18 Oct 2013 15:58:51 +0000 (11:58 -0400)]
another irker test

10 years agonull commit for irker test
Frank Ch. Eigler [Fri, 18 Oct 2013 15:52:50 +0000 (11:52 -0400)]
null commit for irker test

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