| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With most of the implementations, kread/kwrite call deref/store_deref,
and so it makes sense to have lookup_bad_addr in the latter as an
underlying address check.
However, in the STAPCONF_PROBE_KERNEL case that uses probe_kernel_read
and probe_kernel_write, the roles are reversed, so lookup_bad_addr needs
to be in kread/kwrite.
Also note that __deref_bad and __store_deref_bad should only be used in
cases that can be determined at compile time. These turn into invalid
symbols which prevent the module from loading. (They might be better
replaced with compile-time assertions.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The kernel lockdep checking found a possible deadlock if a forced rmmod
tried to destroy _stp_work_queue at the same time that the work queue
was unregistering tracepoints. An unlikely scenario, but still
possible.
Now the work queue will just issue a STP_REQUEST_EXIT down to usermode,
and usermode will echo back an STP_EXIT that triggers the actual probe
cleanup. This way the unregistrations are happening in exactly the same
context as the registrations were.
|
|/ |
|
|
|
|
|
| |
* testsuite/systemtap.base/sdt.exp: Add additional_flags -ansi together
with -pedantic.
|
|
|
|
| |
* testsuite/systemtap.base/sdt.exp: Add -O2, -O3.
|
|
|
|
|
| |
* testsuite/lib/stap_run2.exp: Add stap_run3, called from stap_run2.
* testsuite/systemtap.base/sdt.exp: Use stap_run3, for distinct test names.
|
|
|
|
|
|
|
| |
Instead of registering tracepoints with the deeply-nested if-tree, which
was cluttering the module_init/exit, this now emits normalized reg/unreg
functions for each tracepoint probes. Now the module_init/exit can be a
simple loop like all of the other probe types.
|
|
|
|
|
|
|
|
|
| |
This checks that kernel.trace("*") will compile, with all context
variables accessed as well. For kernels without tracepoints, it will
just hit a "begin" and quit.
This doesn't ensure that kernel.trace("*") will always find something
when it should, though...
|
|
|
|
|
|
| |
The new semok testcase exposed that the module splitting wasn't properly
setting substr boundaries. Instead of passing the end position, it's
supposed to pass the number of characters (end - begin). Oops.
|
| |
|
|
|
|
|
|
| |
Replaced cpp VA_ARGS in sdt.h with explicit enumeration of arguments
(since with -pedantic, cpp has no varargs), and added a few more
cflags variants to the sdt.exp test case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol):
Substitute erroneous target symbol with literal 0 if session level
flag, skip_badvars is set.
* session.h (struct systemtap_session):
New flag: skip_badvars.
* main.cxx:
Command line argument --skip-badvars added.
* stap.1.in:
Entry for new option --skip-badvars.
* NEWS:
Added blurb for new option now available.
* testsuite/semok/badvar.stp:
Test case to check added functionality.
|
|
|
|
| |
* testsuite/systemtap.base/sdt.h: Add extra_flags and g++ as a test language.
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 9936
* stap-find-servers (configuration): Set timeout to 10 seconds.
(find_servers): Run avahi-browse in the background and wait for
$timeout seconds for it to finish. Kill it if it does not finish.
Use a temp file for avahi-browse output.
(match_server): Use -t $timeout on read commands.
* stap-start-server: Check for $server_pid as a running process and
for avahi-publish-service running as a child of $server_pid in order
to confirm that the server is running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to enable displaying the arguments of
marker probe for listing mode -L. The output is like,
$stap -L 'kernel.mark("*")'
kernel.mark("core_marker_format").format("name %s format %s") $arg1:string $arg2:string
kernel.mark("jbd2_checkpoint").format("dev %s need_checkpoint %d") $arg1:string
$arg2:long
kernel.mark("jbd2_end_commit").format("dev %s transaction %d head %d") $arg1:string $arg2:long $arg3:long
kernel.mark("jbd2_start_commit").format("dev %s transaction %d") $arg1:string $arg2:long
Note: It's also possible to figure out the arguments according to the format.
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is to enable displaying arguments of tracepoint
probe in listing mode -L. The example output is like
$stap -L 'kernel.trace("block_bio*")'
kernel.trace("block_bio_bounce") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_backmerge") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_complete") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_queue") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_frontmerge") $q:struct request_queue* $bio:struct bio*
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A few places in this tapset were using a pattern like this:
i_sb = @cast(foo, "inode")->i_sb
return @cast(foo, "super_block")->bar
The type of i_sb is already known, so I just merged this to:
return @cast(foo, "inode")->i_sb->bar
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The nfs, rpc, and scsi tapsets use @cast on types that may be compiled
into a kernel module or into the main kernel binary. The @cast search
path separated with colons lets us search both the kernel and the module.
For a couple of cases, I also merged sequential @casts that work just
fine as a single cast with a multiple-level dereference.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sometimes @cast()ing can fail if the type needed may or may not be
defined in a kernel module. This patch lets @cast take a colon-
separated list of modules to search for the type definition.
* tapsets.cxx (dwarf_cast_query): Simplify. Take the module and
the code result as reference parameters, and use code.empty() as
the sign that the type isn't resolved yet.
(dwarf_cast_expanding_visitor::visit_cast_op): Split e->module by
colon into substrings, and loop until the type is resolved.
|
|/
|
|
| |
* includes/sys/sdt.h: Couple asm with its arg declaration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some time ago we loosened up the code for all probe types to allow
interrupts during the handler. However, when probing something like
kernel.trace("*"), you get a mix of probes in and out of the interrupt
path, and it becomes much more common to have probes skipped due to
interrupt reentrancy.
The common_probe_entryfn_prologue and common_probe_entryfn_epilogue
functions had an interruptible flag, but this was no longer used
anywhere. I removed this flag, but then reused the logic to check an
INTERRUPTIBLE macro instead. Now users can use -DINTERRUPTIBLE=0 to
prevent interrupt reentrancy in their script, at the cost of a bit more
overhead to toggle the interrupt mask.
|
| |
|
|
|
|
| |
* include/sys/sdt.h: Initialize args when declaring. Use alternate keywords.
|
|
|
|
|
|
| |
For parity with the DWARF probes, this makes tracepoints also define
$$parms, which has the same value as $$vars (since tracepoints are
missing the concept of $$locals).
|
|
|
|
|
| |
The probe_point clear was nested in the overload processing code, I
believe accidentally. This just makes it always cleared on probe exit.
|
|
|
|
|
| |
This now checks that CONTEXT->regs actually exists, and that the
requested offset is in the correct range.
|
|
|
|
|
| |
* testsuite/systemtap.base/sdt.exp: Enable stap_run2 when installtest_p.
* testsuite/systemtap.base/sdt.stp: Fixed all arg to $arg typos.
|
| |
|
|
|
|
|
|
| |
* testsuite/systemtap.base/sdt.exp: New test file.
* testsuite/systemtap.base/sdt.stp: Likewise.
* testsuite/systemtap.base/sdt.c: Likewise.
|
|
|
|
| |
* includes/sys/sdt.h: Add #include <sys/types.h>.
|
|
|
|
| |
* includes/sys/sdt.h: Assign args, after declaration.
|
|
|
|
| |
includes/sys/sdt.h: Replace c++ comments with plain C comments.
|
|
|
|
|
| |
* testsuite/lib/stap_run2.exp: Compare found and expected number of lines.
* testsuite/systemtap.*/*.exp (result_string): Make number of lines exact.
|
|
|
|
|
| |
* includes/sys/sdt.h (STAP_PROBE_STRUCT_ARG): Remove ending semi-colon.
(STAP_LABEL_REF): Likewise.
|
|\ |
|
| |
| |
| |
| | |
avoid SEGV
|
| | |
|
| |
| |
| |
| |
| | |
After linux-next commit f2a8205c, it takes two parameters again,
so we autoconf for it rather than use KERNEL_VERSION ifdefs.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (query_dwarf_func): die_has_pc (dwarf_haspc) does not expect a
module_start for shared objects so don't call module_address_to_global for the
statement address.
* testsuite/systemtap.base/labels.exp: Add tests for executable .statement(N),
shared object .label("L") and so .statement(N).
|
|/ |
|
|
|
|
|
|
|
|
|
| |
If stap is run with "-t -DDEBUG_REENTRANCY", additional warnings will
be printed for every reentrancy event, including the probe points of
the resident and interloper probes.
* tapsets.cxx (common_probe_entryfn_prologue): Add "new_pp" argument,
update all callers. Print reentrancy details if needed.
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The tracepoint API provides tracepoint_synchronize_unregister() as a way
to guarantee that all tracepoint handlers are inactive. This is
necessary after unregistering to allow the module to safely unload.
* tapsets.cxx (tracepoint_derived_probe_group::emit_module_init):
Call synchronize after unregistering tracepoints.
(tracepoint_derived_probe_group::emit_module_exit): Ditto.
|