| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
All of the timer.* tapsets are now built and handled in their own
tapset-timers.cxx, as the first step of many to pare down the current
monolithic tapsets.cxx.
|
|
|
|
|
|
|
|
|
| |
Newer gcc (4.4) places more DW_TAG_subprograms with DW_AT_declaration
at call sites. iterate_over_labels should only be concerned about
complete declarations.
* tapsets.cxx (dwflpp::iterate_over_labels): Skip DW_TAG_subprogram
that has attribute DW_AT_declaration.
|
|
|
|
|
|
|
| |
Instead of just structs and unions, we now also process typedefs, enums,
and base types in iterate_over_globals, so declaration_resolve can find
more variations. This especially useful to let @casts reference typedef
names.
|
|
|
|
|
| |
In translate_components, give a cleaner warning about trying to
dereference an enum type, rather than "unexpected type tag".
|
|
|
|
|
|
|
|
| |
Older (2.6.18) based kernels defined struct kprobes symbol_name as char *,
but newer (2.6.27) based kernels defined the same field as const char *.
* tapsets.cxx (kprobe_derived_probe_group::emit_module_init):
Always cast to char * when assigning to kprobes.symbol_name field.
|
|
|
|
|
| |
* tapsets.cxx (kprobe_derived_probe): Use enter_k[ret]probe>>2<<_probe.
* testsuite/buildok/thirtyone.stp: Test this.
|
|
|
|
|
| |
The code to emit maxactive was almost there; it just needed to enable
the maxactive probe component and pass the value down.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
All of our other kprobe types will let the script continue after a
registration failure, as per PR6749. The dwarfless kprobes should be
no exception.
Also, the way they were exiting was causing an unclean shutdown, so I
added tests to badkprobe.exp to make sure that cleanup is always allowed
to run.
|
| |
|
|
|
|
|
|
|
| |
* tapsets.cxx: Add dwfl_report_offline_predicate to check pending
interrupts for an early abort.
* tapsets.h: Declare it.
* translate.cxx: Add callback to function call.
|
|
|
|
|
|
| |
* sdt.h: Use .quad instead of .long for .probe section addresses.
ia64 and s390 require 'nop 0' and x86 tolerates it.
* tapsets.cxx (build): Fetch probe_name in a big endian friendly fashion.
|
| |
|
|
|
|
|
|
|
| |
The special syntax to generate a module for type information is now:
- "kernel<path/to/header.h>" to use the kernel's build environment
- "<path/to/header.h>" to use no special build environment, and so use
gcc's default parameters only (for user mode).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-21 David Smith <dsmith@redhat.com>
* tapsets.cxx (utrace_derived_probe::utrace_derived_probe): If
during target-variable-expanding the probe, we added a new block
or probe, add them.
(utrace_var_expanding_visitor::visit_target_symbol_cached): New
function to cache target variables in a generated syscall probe to
use in syscall.return probes.
(utrace_var_expanding_visitor::visit_target_symbol_context): In a
syscall.return probe, you can't access $syscall. So use
visit_target_symbol_cached() to cache the value for use here.
* testsuite/systemtap.base/utrace_syscall_args.stp: Test use of
$syscall in syscall.return probes.
|
| |
|
|
|
|
|
| |
Commit 462c90c3 did this for user modules, but it's needed for kernel
modules too.
|
|
|
|
|
|
|
| |
The module field in @cast can now also be "kmod<path/to/header.h>" or
"umod<path/to/header.h>" to generate a kernel or user module which
includes the specified header. The appropriate compiler flags are used
to save all possible type debuginfo from the header.
|
|
|
|
|
|
| |
If a @cast encounters a module that it can't load, it should just go on
to the next module instead of throwing an exception. If there is no
next module, we'll get a better "type not found" exception anyway.
|
|
|
|
| |
* 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.
|
|\| |
|