| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The overlapping process.* tapsets are now separated. Those probe points
documented in stapprobes(3stap) remain the same. Those that were formerly
in stapprobes.process(3stap) have been renamed to kprocess, to reflect
their kernel perspective on processes.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds some basic functions to the IP and TCP tapsets.
Mainly, it's possible to get the iphdr and tcphdr from a sk_buff structure.
As a consequence, a TCP probe called tcp.receive() was created and
is probed every time a TCP packet is received, and a lot of
useful fields is available, as the TCP flags.
Also a small example that works like tcpdump for received TCP packets was
created.
This patch was tested on x86 and ppc machines, on 2.6.18 kernel and also on
mainline one.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Josh Stone <jistone@redhat.com>
|
| | |
| | |
| | |
| | | |
* elaborate.cxx (semantic_pass_opt4): Filter warning on s.timing.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
* translate.cxx (dump_unwindsyms): Get and check against module end, only
check STT_FUNC && SHN_ABS for kernel, check shndxp for non-allocated
section.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2009-04-09 David Smith <dsmith@redhat.com>
* buildrun.cxx (compile_pass): Compile autoconf test for
<asm/syscall.h>.
* runtime/autoconf-asm-syscall.c: New "autoconf" test the presence
of <asm/syscall.h>.
* runtime/syscall.h: If <asm/syscall.h> exists, use it.
Otherwise, use our private copy of the functions for each
architecture.
(syscall_get_nr): Renamed from __stp_user_syscall_nr().
(syscall_get_return_value): Renamed from
__stp_user_syscall_return_value().
(syscall_get_arguments): Renamed from __stp_user_syscall_arg().
* runtime/task_finder.c
(__stp_utrace_task_finder_target_syscall_exit): Uses new syscall.h
functions.
* tapset/utrace.stp: Ditto.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without KPROBES very little works atm. But stack.c file is unconditionally
imported, while these two functions are only used through context-unwind.stp.
This at least lets us do simple sanity checks on "plain" kernels.
* runtime/stack.c (_stp_stack_print, _stp_stack_snprint):
Wrap in #if defined (CONFIG_KPROBES).
|
| |
| |
| |
| |
| | |
* testsuite/systemtap.base/uprobes_uname.exp: New file.
* testsuite/systemtap.base/uprobes_uname.stp: Likewise.
|
| |
| |
| |
| |
| | |
* runtime/task_finder.c (stap_register_task_finder_target): Also check both
pathlen are zero.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| | |
* runtime/sym.c (_stp_tf_mmap_cb): We get passed vm_flags, not flags.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was nothing wrong with the probe itself, but because the body
was empty the compiler optimised away the actual call...
* testsuite/systemtap.base/uprobes_lib.exp: Activate main exe probe, expect
more output.
* testsuite/systemtap.base/uprobes_lib.stp: Also probe main and main_lib.
* testsuite/systemtap.base/uprobes_exe.c: Put some code in main_func.
* testsuite/systemtap.base/uprobes_lib.c: Likewise for lib_func.
|
| |
| |
| |
| |
| |
| | |
* tapsets.cxx(dwflpp::iterate_over_cu_labels): New parameter function.
Do wildcard match for function.
* testsuite/systemtap.base/labels.exp: Test .label function handling.
|
| |
| |
| |
| |
| |
| | |
2009-04-08 David Smith <dsmith@redhat.com>
* lib/systemtap.exp (setup_server): Better error handling.
|
| |
| |
| |
| |
| |
| |
| | |
2009-04-08 David Smith <dsmith@redhat.com>
* runtime/sym.c: Added '#ifdef STP_NEED_VMA_TRACKER' around code
that needs it.
|
| |\ |
|
| | |\ |
|
| | | | |
|
| | |/
| | |
| | |
| | | |
* tapsets.cxx (dwflpp::iterate_over_cu_labels): Compare with strcmp not strncmp.
|
| | | |
|
| | |
| | |
| | |
| | | |
* translate.cxx (dump_unwindsyms): Filter out sym.st_value < base values.
|
| | |
| | |
| | |
| | | |
* runtime/sym.c (_stp_symbol_snprint): Use _stp_snprintf, no _stp_printf.
|
| | |
| | |
| | |
| | |
| | | |
* tapset/context.stp (uaddr): New sfunction.
* testsuite/buildok/uaddr.stp: New test.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
* runtime/sym.c (_stp_tf_vm_cb): Add and remove tsk->group_leader.
(_stp_mod_sec_lookup): find vma for task->group_leader.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* tapset/context-symbols.stp (syname, symdata): Pass NULL for kernel address.
* tapset/ucontext-symbols.stp: New file defining usymname and usymdata.
* testsuite/systemtap.context/usymbols.exp: Use usymname, remove
STP_NEED_VMA_TRACKER hack.
* testsuite/buildok/usymdata.stp: New test.
* testsuite/buildok/usymname.stp: Likewise.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
This is needed for running make with -j. Fixes Debian bug #522800.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
When the relay threads encounter an error, they now send SIGTERM to the
rest of the process before the thread exit, so we get a clean shutdown.
For EPIPE in particular, error messages are also suppressed.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This updates the example scripts to use the new ANSI escape sequences
tapset. It also adds the copyright header that was missing in
ansi_colors.stp for a long time.
|