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

10 years agoUpdate s390-specific syscall probes for newer kernels.
David Smith [Thu, 17 Oct 2013 21:31:28 +0000 (16:31 -0500)]
Update s390-specific syscall probes for newer kernels.

* tapset/linux/s390/syscalls.stp: Update 'syscall.getresgid16' and
  'syscall.getresuid16' probes for newer kernels (which have renamed
  parameters)

10 years agoFix PR15961 by avoiding use of symname(addr()) in syscall/nd_syscall tapsets.
David Smith [Thu, 17 Oct 2013 21:23:58 +0000 (16:23 -0500)]
Fix PR15961 by avoiding use of symname(addr()) in syscall/nd_syscall tapsets.

* tapset/linux/nd_syscalls2.stp (nd_syscall.compat_rt_sigprocmask): Switch
  from using 'symname(addr())' to 'ppfunc().
  (nd_syscall.uname): Ditto.
  (nd_syscall.rt_sigtimedwait): Break down into sub-probes to avoid
  'symname(addr())'.
  (nd_syscall.truncate): Ditto.
* tapset/linux/s390/nd_syscalls.stp (nd_syscall.mmap): Break down into
  sub-probes to avoid 'symname(addr())'.
  (nd_syscall.mmap2): Ditto.
* tapset/linux/s390/syscalls.stp (syscall.mmap): Break down into
  sub-probes to avoid 'symname(addr())'.
  (syscall.mmap2): Ditto.

10 years agoFix PR15913 by getting s390x arg 6 from the stack.
David Smith [Thu, 17 Oct 2013 18:49:23 +0000 (13:49 -0500)]
Fix PR15913 by getting s390x arg 6 from the stack.

* tapset/s390/registers.stp (_stp_get_kernel_stack_param): New function.
  (_stp_arg): Uses _stp_get_kernel_stack_param() to get stack parameters.

10 years agoFix PR16058 by updating the syscall.mmap2/nd_syscall.mmap2 probe aliases.
David Smith [Thu, 17 Oct 2013 16:23:32 +0000 (11:23 -0500)]
Fix PR16058 by updating the syscall.mmap2/nd_syscall.mmap2 probe aliases.

* tapset/linux/syscalls.stp: Convert '$pgoff', which is a number of pages,
  into a number of bytes.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/mmap.c: Add testing for a non-zero offset
  argument to mmap().

10 years agoman/stap.1: improve .SAMPLE macro
Jonathan Lebon [Thu, 17 Oct 2013 15:37:01 +0000 (11:37 -0400)]
man/stap.1: improve .SAMPLE macro

The .RE macro, used in the .ESAMPLE macro, restores the indentation
level to the default, not to what it was before the preceding .RS macro.
This meant that in already-indented regions (e.g. the .TP section of
--suppress-handler-errors or MAXMAPENTRIES), the text following .ESAMPLE
would be unindented one level too much.

The .SAMPLE macro now saves the current indentation level in a register
and the .ESAMPLE macro restores it. The macros were also modified so
that samples now have an empty line above and below to improve
legibility.

Old uses of .RS/.RE for samples were replaced by .SAMPLE/.ESAMPLE and
the printf examples section was unindented since the macro already
indents it once.

- man/stap.1: improve .SAMPLE macro, clean up usage
- man/stapvirt.1: improve .SAMPLE macro, use .PP instead of blank space
- man/stap-merge.1: improve .SAMPLE macro
- man/stap-prep.1: ditto
- man/stap-report.1: ditto

10 years agoPR16057: Fix task_dentry_path crossing mount points
Josh Stone [Thu, 17 Oct 2013 00:15:31 +0000 (17:15 -0700)]
PR16057: Fix task_dentry_path crossing mount points

There were a couple ways that task_dentry_path failed on kernels which
have struct mount, i.e. >= kernel-3.3.

* tapset/linux/dentry.stp (real_mount): The (vfsmnt > offset) test fails
  for most (all?) kernel pointers, as having the MSB set looks negative
  in signed long comparisons.  Explicitly allow "negative" pointers now.
  (task_dentry_path): The @cast(mnt, "mount")->mnt_parent got us to
  another struct mount, but we wanted the struct vfsmount.  This is
  available one step further in ->mnt_parent->mnt.

10 years agostapvirt.1: add tutorial section
Jonathan Lebon [Wed, 16 Oct 2013 18:09:52 +0000 (14:09 -0400)]
stapvirt.1: add tutorial section

A part of the tutorial that was created for PR13078 was added to the man
page for stapvirt.

- NEWS: remove mention of PR13078
- man/stapvirt.1: add tutorial section

10 years agotestsuite: handle some more cases of kill -PGRP -> -- -PRGRP
Frank Ch. Eigler [Wed, 16 Oct 2013 15:58:36 +0000 (11:58 -0400)]
testsuite: handle some more cases of kill -PGRP -> -- -PRGRP

10 years ago/bin/kill -INT -[exp_pid] not supported on Ubuntu which is having procps-ng
Naresh Kamboju [Wed, 16 Oct 2013 15:56:16 +0000 (11:56 -0400)]
/bin/kill -INT -[exp_pid] not supported on Ubuntu which is having procps-ng
3.3.3

 /bin/kill -INT -22504
 /bin/kill: invalid option -- '2'

Due to this reason test scripts modified to
 /bin/kill -INT -- -[exp_pid]

reference:
http://pastebin.com/81SVEGka
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689278
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/1077796

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
10 years agoNEWS: add blurb about cross-vm
Jonathan Lebon [Wed, 16 Oct 2013 15:35:52 +0000 (11:35 -0400)]
NEWS: add blurb about cross-vm

10 years agoautoreconf
Jonathan Lebon [Wed, 16 Oct 2013 14:30:20 +0000 (10:30 -0400)]
autoreconf

10 years agoMerge branch 'cross-vm'
Jonathan Lebon [Wed, 16 Oct 2013 14:29:51 +0000 (10:29 -0400)]
Merge branch 'cross-vm'

10 years agosystemtap.spec: add virthost and virtguest pkgs
Jonathan Lebon [Tue, 15 Oct 2013 20:53:25 +0000 (16:53 -0400)]
systemtap.spec: add virthost and virtguest pkgs

Supported host systems are: F19, RHEL7.
Supported guest systems are: the above + F18, RHEL5, RHEL6.

10 years agosystemtap.spec: use macro for init.d directory
Jonathan Lebon [Tue, 15 Oct 2013 20:52:01 +0000 (16:52 -0400)]
systemtap.spec: use macro for init.d directory

As described in <http://fedoraproject.org/wiki/Packaging:SysVInitScript#
Initscripts_on_the_filesystem>.

10 years agoadd guest support files for libvirt/unix schemes
Jonathan Lebon [Tue, 3 Sep 2013 16:29:47 +0000 (12:29 -0400)]
add guest support files for libvirt/unix schemes

For systemd systems, the following files are used:
   - stapsh@.service.in: template file for a service which automatically
     respawns stapsh on a given virtio-serial port
   - 99-stapsh.rules: udev rules file that instantiates (or terminates)
     the stapsh service upon plugging in/out of virtio-serial ports

For SYSV systems, the following files are used:
   - stapsh-daemon.in: libexec script file that automatically respawns
     stapsh on a given virtio-serial port
   - stapshd.in: init script to control stapsh-daemon instances
   - 99-stapsh-init.rules: udev rules file that forces a configuration
     reload upon plugging in/out of virtio-serial ports
   - virtio_console.modules: ensures that the virtio_console module is
     loaded at boot time if virtio-serial ports are detected. This is a
     workaround for RHEL5, in which the module is not auto-loaded, but
     does no harm in other systems such as RHEL6.

10 years agostap.1: add libvirt:// and unix:// to --remote option
Jonathan Lebon [Mon, 23 Sep 2013 17:54:53 +0000 (13:54 -0400)]
stap.1: add libvirt:// and unix:// to --remote option

10 years agostap: add HAVE_LIBVIRT and HAVE_LIBXML2 in feature list
Jonathan Lebon [Thu, 26 Sep 2013 18:39:42 +0000 (14:39 -0400)]
stap: add HAVE_LIBVIRT and HAVE_LIBXML2 in feature list

- configure.ac: make HAVE_LIBVIRT and HAVE_LIBXML2 conditional on
  PKG_CHECK_MODULES
- session.cxx: add HAVE_LIBVIRT and HAVE_LIBXML2 in feature list

10 years agoconfigure.ac: pass XML2/VIRT bits to config.h via AC_DEFINE
Frank Ch. Eigler [Thu, 26 Sep 2013 18:35:22 +0000 (14:35 -0400)]
configure.ac: pass XML2/VIRT bits to config.h via AC_DEFINE

10 years agoremote.cxx: add libvirt:// scheme
Jonathan Lebon [Tue, 17 Sep 2013 15:59:09 +0000 (11:59 -0400)]
remote.cxx: add libvirt:// scheme

This new scheme is handled by the new class libvirt_stapsh, which simply
calls stapvirt connect.

10 years agostapvirt: initial release
Jonathan Lebon [Fri, 16 Aug 2013 19:25:07 +0000 (15:25 -0400)]
stapvirt: initial release

The stapvirt binary is a tool for both users and stap. Users use it to
manage systemtap ports on their libvirt-managed domains. It allows them
to add, list, and remove ports. stap uses it to connect to a
libvirt-managed domain with a free systemtap port.

The stapvirt binary is only compiled if the libvirt-devel >= 1.0.2 and
the libxml-2.0 packages are installed.

- Makefile.am: build stapvirt if we HAVE_LIBVIRT and HAVE_LIBXML2
- configure.ac: PKG_CHECK_MODULES for libvirt and libxml2 and define
  HAVE_LIBVIRT and HAVE_LIBXML2 conditionals
- man/Makefile.am: include stapvirt man page if we HAVE_LIBVIRT and
  HAVE_LIBXML2
- man/stapvirt.1: created stapvirt man page
- stapvirt.c: created stapvirt source

10 years agostapsh: use SIGIO to monitor port status
Jonathan Lebon [Wed, 28 Aug 2013 16:13:50 +0000 (12:13 -0400)]
stapsh: use SIGIO to monitor port status

If the kernel supports it, a handler for SIGIO is installed. Upon any
event (e.g. host connection up/down), the handler updates a global
variable. This variable is used by host_connected() if possible, rather
than calling poll() everytime.

10 years agostapsh: tweak error msgs
Jonathan Lebon [Mon, 26 Aug 2013 16:20:24 +0000 (12:20 -0400)]
stapsh: tweak error msgs

Make error messages more consistent with the rest of SystemTap (i.e.
capitalize the first word). Also, make die() respect host_connected()
and print out strerror().

10 years agoremote.cxx: use data option for unix
Jonathan Lebon [Mon, 26 Aug 2013 16:01:19 +0000 (12:01 -0400)]
remote.cxx: use data option for unix

This commit actually enables the use of the new "data" option added in
commit 145fb2f. This is done by using a mini state machine. For now,
only the unix scheme uses this option. However, the upcoming libvirt
scheme will also make use of it.

The prefixing logic has also been revised. Now, cout is always flushed
so that e.g. printf("hello1\nhello2") will not only print out "hello1"
until ^C is done on stap. (This was most likely due to line-buffering).

Additionally, prefixing is now only done when necessary rather than
everytime (e.g. 'timer.s(1) { printf("hello") }' would add a prefix
before every 'hello').

Finally, prefixing now also accounts for multiple remotes, i.e. a new
line is automatically added and prefixed if data from a different remote
from the last was received.

- remote.cxx: add support for data commands and improve prefixing
- util.cxx: new split_lines() function
- util.h: split_lines() defn and new vector_has function

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