| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* tapsets.cxx (dwflpp::iterate_over_labels): Fix indentation.
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwflpp::iterate_over_labels): Renamed from
iterate_over_cu_labels, method signature simplified.
(query_srcfile_label): New.
(query_cu): Use above.
* labels.exp: New tests for above.
|
|
|
|
|
| |
For uprobes 1 and 2, add unmap_u[ret]probe() and define UPROBES_API_VERSION=2.
Adapt tapsets.cxx accordingly.
|
|
|
|
|
|
|
|
|
| |
* tapsets.cxx (dwflpp::translate_components): Eliminate the extra
die-dereference at the end of the loop (a regression from @casts).
* runtime/loc2c-runtime.h (store_bitfield): Use the target as the
representative type, since the base is always int64_t. Also be a
bit more aggressive with masking and parentheses.
* testsuite/systemtap.base/bitfield.*: New test for R/W bitfields.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit c4ce66a1 I shifted some of the variable accesses around, and
that caused the error messages for $return variables to lose context.
The root problem in this case was that dwarf_attr didn't find the type
attribute, and that failure wasn't immediately caught. Now that result
is checked so we can provide a proper error message.
While I'm at it, changing that lookup to dwarf_attr_integrate is enough
to make the $return value usable again, at least for the reported test
case.
|
|
|
|
|
|
| |
* tapsets.cxx (iterate_over_cu_labels): Treat -l specially so the
output of a .label can be improved.
* labels.stp: Test -l
|
|
|
|
|
|
|
|
| |
* 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.
|