| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* runtime/runtime.h: Include task_finder.c.
* runtime/sym.c: Always define task_finder callbacks for usage in tapsets.
* runtime/task_finder.c: Define dummy stap_task_finder_target when
! defined(CONFIG_UTRACE).
* tapsets.cxx: Never include task_finder.c directly.
|
|
|
|
|
|
| |
* tapsets.cxx(dwflpp::iterate_over_cu_labels): New parameter function.
Do wildcard match for function.
* testsuite/systemtap.base/labels.exp: Test .label function handling.
|
|\ |
|
| |
| |
| |
| | |
* tapsets.cxx (dwflpp::iterate_over_cu_labels): Compare with strcmp not strncmp.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-08 David Smith <dsmith@redhat.com>
* tapsets.cxx (itrace_derived_probe_group::emit_module_decls):
Added inclusion of task_finder.c back. Unconditionally including
it when not needed causes all systemtap scripts to fail on kernels
with no utrace support.
(utrace_derived_probe_group::emit_module_decls): Ditto.
(uprobe_derived_probe_group::emit_module_decls): Ditto.
* runtime/runtime.h: Removed unconditional inclusion of
task_finder.c.
|
|
|
|
|
|
| |
* tapsets.cxx (hrtimer_derived_probe): Take scale argument, add
interval/scale to semantic_error message.
(timer_builder): Set and pass scale.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-07 David Smith <dsmith@redhat.com>
PR 9940.
* tapsets.cxx (emit_vma_callback_probe_decl): Initialized new
callbacks.
(utrace_derived_probe_group::emit_probe_decl): Ditto.
(uprobe_derived_probe_group::emit_module_decls): Uses new
callback. Makes sure mapping is executable before trying to set a
probe in it.
(itrace_derived_probe_group::emit_module_init): Calls
_stp_sym_init().
(utrace_derived_probe_group::emit_module_init): Ditto.
(uprobe_derived_probe_group::emit_module_init): Ditto.
* runtime/sym.c: Moved task_finder_vma.c inclusion here from
task_finder.c.
(_stp_sym_init): New function.
(_stp_tf_mmap_cb): New function that replaces _stp_tf_vm_cb.
(_stp_tf_munmap_cb): Ditto.
* runtime/task_finder.c: Removed task_finder_vma.c inclusion.
Split vm_callback into 3 callbacks: mmap_callback,
munmap_callback, and mprotect_callback.
(stap_register_task_finder_target): Initializes new events
variables for the new callbacks.
(__STP_TASK_VM_BASE_EVENTS): No longer specifies syscall entry
events.
(__stp_call_mmap_callbacks): New function.
(__stp_call_mmap_callbacks_with_vma): Ditto.
(__stp_call_munmap_callbacks): Ditto.
(__stp_call_mprotect_callbacks): Ditto.
(__stp_call_vm_callbacks): Removed.
(__stp_utrace_task_finder_target_quiesce): Calls
__stp_call_mmap_callbacks() instead of __stp_call_vm_callbacks().
(__stp_utrace_task_finder_target_syscall_entry): Removed
function.
(__stp_utrace_task_finder_target_syscall_exit): Reports raw
mmap()/mprotect()/munmap() events.
|
|
|
|
|
|
|
|
|
|
| |
We already stash the context variables for markers and tracepoints into
the locals for the probe body, but then we were using separate functions
to read those locals for each particular probe body.
This patch instead teaches the unparser how to emit the local name
directly for those context variables. The resulting code from the
translator is much simpler now.
|
|
|
|
|
| |
* tapsets.cxx (many foo-translate-bar): Add const target_symbol*
parameter, for ->tok use when constructing semantic_errors.
|
|
|
|
|
|
| |
We were doing this in pass-3, which means it was never set for cached
runs, and so staprun didn't get the -u flag. Now need_probes is set as
soon as a uprobe_derived_probe is saved into the session in pass-2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached patch is version 2 for the problem I reported earlier
today.
Frank, is this more what you had in mind? With this patch, there's no
need for the user to look at the system log. Error messages are sent to
stderr:
ERROR: insn probe init: arch does not support block step mode
ERROR: probe process("/test").function("doit1@/test.c:22").return registration error (rc -1)
-Maynard
|
|
|
|
| |
* tapsets.cxx (utrace_derived_probe_group::emit_module_init): Correct #endif.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
* includes/sys/sdt.h (STAP_UNINLINE): New.
(STAP_UNINLINE_LABEL): New.
static_uprobes.exp: Match using charset instead of .*
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (dwarf_builder::build): Add .mark name wildcard check.
Customize -l handling.
* testsuite/systemtap.base/static_uprobes.exp: Test .mark name wildcard.
|
| |
| |
| |
| | |
* tapsets.cxx (validate_elf): Reorganize glob matching for x86 and ppc.
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (dwarf_query): Add has_mark.
(query_cu): Use for beginning of statement check.
(dwarf_builder::build): Set has_mark.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
$data
* translate.cxx (dump_unwindsyms): Also emit STT_OBJECT symbols,
therefore .data etc. sections into stap-symbols.h.
* tapsets.cxx (iterate_over_modules): Omit a dwfl_getmodules()
RC-checking assertion that blocked meaningful $context var
error messages.
(dwflpp::emit_address): Bypass dwfl_module_relocate_address()
for kernel symbols as it has been unreliable; subtract sess.sym_stext
manually.
* testsuite/buildok/seventeen.stp: Extend test with module $global.
|
| |
| |
| |
| |
| | |
* tapsets.cxx (stringhash): Go to __gnu_cxx.
(dwarf_cast_expanding_visitor::visit_cast_op): Use ~0 for all-ones.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (tracepoint_extra_headers): New function to return
needed header file names.
(emit_module_decls): Emit them.
* buildrun.cxx (make_tracequery): Emit them.
* testsuite/systemtap.base/tracepoints.exp: Rewrite to exercise
building each tracepoint.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* includes/sys/sdt.h (STAP_PROBEN): Revive the STAP_LABEL macro to
prevent inlining to keep probe parameters visible. Use +rm
constraints.
* tapsets.cxx (build): Use .probes section for all uses of static
probes.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Will be defined by new ucontext symbol stapset.
* tapset.cxx: Wrap all vma callbacks in STP_NEED_VMA_TRACKER.
* testsuite/systemtap.context/usymbols.exp: Define STP_NEED_VMA_TRACKER
explicitly for now.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
To use tracepoints, we build a "tracequery" module that compiles
debuginfo for all available tracepoints in the user's kernel. That's a
bit of a cumbersome step to do during pass-2 though. This change adds
tracequery caching so we only need to compile it once.
|
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (common_probe_entryfn_prologue): Become conditional on
!INTERRUPTIBLE.
* translate.cxx (emit_module_exit): Still print skipped_count_reentrant
with -t, even if skipped_count was zero.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): Emit vma
callbacks.
(uprobe_derived_probe_group::emit_module_init): Activate vma callbacks.
* testsuite/systemtap.context/usymbols.exp: Track through uprobes,
so as to make sure we have the symbols.
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (itrace_derived_probe_group::emit_module_decls): Emit vma
callbacks.
(itrace_derived_probe_group::emit_module_init): Activate vma callbacks.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (utrace_derived_probe_group::emit_vm_callback_probe_decl):
Removed.
(emit_vma_callback_probe_decl): New static helper function.
(utrace_derived_probe_group::emit_module_decls): Emit vma callbacks.
(utrace_derived_probe_group::emit_module_init): Activate vma callbacks.
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
Remove output task finder vma callback _stp_tf_vm_cb.
* runtime/sym.c (_stp_tf_vm_cb): And add it here.
|
| |
| |
| |
| |
| | |
* tapsets.cxx (itrace_derived_probe_group::emit_module_decls): Don't emit
another include task_finder.c. Already done through runtime.h.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
If a tracepoint arg is a structure or union that is passed by value,
then this takes the address of the parameter so it can be used like a
pointer in the rest of our code.
|
| |
| |
| |
| |
| | |
* tapsets.cxx (dwarf_cast_expanding_visitor::visit_cast_op):
Add type to msg added to semantic_error when thrown.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
We always have to know the type name of tracepoint arguments, so we can
declare the right function callback, but we can suppress access to those
types which we don't (yet) know how to read.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dwarf_type_name now works with more argument types. There were
three cases that I needed to improve:
- For "const struct foo*", the debuginfo has a const-DIE named "foo"
chained to a struct-DIE named "foo", so we can't assume that seeing a
name means we're down to the base type. The recursion now decends
until it explicitly sees a base_type, typedef, struct, or union.
- For "void*", the debuginfo has a pointer-DIE without any DW_AT_type
after. Now I'm just catching that failed lookup and writing in
"void".
- For "va_list", the debuginfo actually resolves to an internal type
"struct __va_list_tag*", but that struct has no declaration at the
source level. I'm just hacking that exact case to say "va_list"
instead, but it would be nice to find something cleaner...
We'll probably still have problems if any tracepoint uses a function-
pointer argument, but so far I've only seen that as a "void*", which we
now handle ok.
|
| |
| |
| |
| |
| |
| | |
LTTng has a few tracepoints without any arguments, which caused our
compile to fail, claiming that our entry function was not a declaration.
This just adds an explicit (void) argument list for that case.
|
| |
| |
| |
| |
| |
| | |
* runtime/task_finder.c (__stp_tf_vm_cb): Removed.
* tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
Output task finder vma callback and hook it.
|
|\|
| |
| |
| |
| | |
Resolved conflicts:
runtime/task_finder.c: name vs path.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 96b030fe reorganized the tracepoint registration calls by
creating generic wrappers that return int. However, the older
tracepoint implementation (as found in RHEL5.3) returned void for unreg,
so this was failing pass-4.
Since we can't handle unregistration failures anyway, this change just
makes the generic unregister function return void instead. As noted in
the newly-added comment, it should be safe for us to ignore unreg
failures.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|