| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
Always emit vm callback probe for __stp_tf_vm_cb.
* runtime/task_finder.c (__stp_tf_vm_cb): Always expose, move _stp_dbug
statements under ifdef DEBUG_TASK_FINDER_VMA. Find and record
corresponding module when vm_path not NULL.
* runtime/task_finder_vma.c (struct __stp_tf_vma_entry): Add _stp_module.
(stap_add_vma_map_info): Add _stp_module argument and assign.
(__stp_tf_get_vma_entry_addr): New static function to get
the __stp_tf_vma_entry given an address.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a similar mechanism as marker probes for storing target
variables in locals of the probe body.
* tapsets.cxx (tracepoint_arg): Add fields to help $target access.
(tracepoint_var_expanding_visitor): Expand code to access target
variables - a $target for each tracepoint parameter, as well as
the special $$name and $$vars.
(tracepoint_derived_probe::tracepoint_derived_probe): Expand targets
(resolve_tracepoint_arg_type): Determine if a parameter is a type
that we can dereference, and store the underlying type.
(tracepoint_derived_probe::build_args): Resolve the types.
(tracepoint_derived_probe::emit_probe_context_vars): Emit $target
placeholders into the locals of the probe body.
(tracepoint_derived_probe_group::emit_module_decls): Initialize
$targets from the entry point parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (tracepoint_arg): New
(tracepoint_derived_probe): Add declaring header name and arg vector
(dwarf_type_name): Build a type string for a given type DIE
(tracepoint_derived_probe::build_args): Scan the function DIE for
the name and type of formal parameters required by the tracepoint.
(tracepoint_derived_probe::tracepoint_derived_probe): Call
build_args and determine the relevant header to include.
(tracepoint_derived_probe_group::emit_module_decls): For each
tracepoint, include its header and declare a probe entry point with
the right function signature.
(tracepoint_derived_probe_group::emit_module_init): Call the
registration for each tracepoint, and handle error unwinding.
(tracepoint_derived_probe_group::emit_module_exit): Unregister each.
|
|
|
|
|
|
| |
* tapsets.cxx (tracepoint_derived_probe): Create a skeleton probe
(tracepoint_derived_probe_group): Create a skeleton group
(tracepoint_query::handle_query_func): build a probe
|
|
|
|
|
|
|
| |
* tapsets.cxx (tracepoint_query): Iterate over the modules, CUs, and
functions in tracequery.ko looking for our hijacked tracepoint
declarations.
(tracepoint_builder::build): Run a tracepoint_query
|
|
|
|
|
|
|
|
|
|
| |
* session.h (systemtap_session): add tracepoint_derived_probes
* buildrun.cxx (make_tracequery): New - builds a kernel module that
hijacks the tracepoint declarations, so we can query debuginfo.
* buildrun.h: declare above
* tapsets.cxx (tracepoint_builder): New builder for tracepoint
probes. For now it just handles the initialization to build the
tracequery kernel module.
|
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwflpp::iterate_over_functions): Change arg from
void* to base_query*, and add explicit function-search parameters.
(query_cu): update caller
(query_dwarf_func): update callback signature
(Note: instead of passing around callback functions, it might be nicer
to use a virtual method in base_query...)
|
|
|
|
|
|
|
|
|
| |
We used to check & init module_cache in a few inconsistent places. Now
it is always handled in dwflpp::setup_user/setup_kernel.
* tapsets.cxx (dwflpp::setup_user): add module_cache check
(dwarf_builder::build): remove module_cache check
(dwarf_cast_expanding_visitor::visit_cast_op): ditto
|
|
|
|
| |
* tapsets.cxx (dwflpp::build): Use .label for .so instead of .statement(N)
|
|
|
|
|
| |
It also adds a private copy of access_process_vm to runtime/itrace.c
since that function is not consistently exported by all distros.
|
|\ |
|
| |
| |
| |
| | |
The gcc on Ubuntu doesn't like fprintf() without format arguments
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (dwflpp::build): Improve c+ method navigation.
Use .label for listing mode.
* systemtap.base/static_uprobes.exp: Test multiple invocations of the same
probe per block. (SW9770)
|
| |
| |
| |
| | |
* tapsets.cxx (iterate_over_cu_labels): Check dwarf_child result.
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
println(@cast(myptr, "task_struct")->pid)
println(@cast(myptr, "task_struct", "kernel")->pid)
Merge branch 'typecast', bump ChangeLog entries to push date
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will iterate over the module and its CUs looking for the type
definition, and then work with loc2c to dereference the pointer.
* loc2c.c (c_translate_argument): Create a dummy location to start
the address computation from a function parameter.
* translate.cxx (base_query, dwarf_query): Move some members from
base_query to dwarf_query, so the former can be more generic. Also
add a constructor using a module string instead of probe parameters.
(dwflpp::query_modules, dwflpp::iterate_over_modules): Use a generic
base_query instead of a dwarf_query.
(dwarf_cast_query): New query to scan the modules and CUs for a
matching type definition, and then produce a code fragment to deref
each component.
(dwarf_cast_expanding_visitor): Tries to replace @casts with a function
call to the result of a dwarf_cast_query.
(dwflpp::declaration_resolve): Search by name instead of by die.
(dwflpp::translate_components): Use the incoming vardie as the first
type die, so we don't assume that attr_mem has a DW_AT_type already.
(dwflpp::literal_stmt_for_pointer): Construct a C fragment that starts
with a pointer argument (THIS->pointer) and dereferences each member
component from there.
(*_derived_probe::register_patterns): Take a session parameter instead
of a match_node, so we can manipulate session-wide data.
(dwarf_derived_probe::register_patterns): Add a session code filter to
expand @casts with a dwarf_cast_expanding_visitor.
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (dwarf_var_expanding_visitor::visit_cast_op): While
expanding dwarf probes, provide the current module as a default to
@casts without a module name.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2009-02-12 David Smith <dsmith@redhat.com>
* tapsets.cxx (procfs_derived_probe_group::emit_module_decls):
Moved inclusion of procfs.c here from runtime/transport.c
2009-02-12 David Smith <dsmith@redhat.com>
* transport.c: Moved inclusion of procfs.c to
procfs_derived_probe_group::emit_module_decls() in tapsets.cxx.
|
|/
|
|
| |
blacklisted files
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This brings a new update_visitor that makes it easier to traverse the
parse tree and modify parts of it as necessary. I wrote this as part of
my in-progress work to allow @cast() expansion, but I was able to apply
it to the dwarf/etc. target variable expanders and to the optimization
stages. I think the resulting code is more predictable and easier to
follow...
Conflicts:
ChangeLog (bumped my commit dates to push dates...)
|
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (var_expanding_copy_visitor): This struct becomes
var_expanding_visitor and inherits from update_visitor instead of
deep_copy_visitor. Each of the probe-type variants of this are also no
longer copiers.
|
| |
| |
| |
| |
| |
| |
| | |
* staptree.h (require, provide): Simplify stack operations with less
pointer magic, and move to be deep_copy_visitor members.
* staptree.h (deep_copy_visitor::deep_copy): Templatize
* staptree.cxx, tapsets.cxx: Refactor require/provide callers
|
|/
|
|
| |
kernels
|
|
|
|
| |
non-trap based probes"
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This change just inserts 'static' on runtime, tapset, and generated C
functions and globals, so the compiler can do a better job of
optimizing.
My tests with small scripts show ~10% reduction in compile time and ~20%
reduction in module size. Larger scripts may show less benefit, but I
expect purely positive results.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|