| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* runtime/stack.c (_stp_stack_print_tsk): Use _stp_symbol_print.
|
|
|
|
|
| |
* runtime/stack.c (walk_context_stack): New function.
(print_stack_ops): Add function pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements proper unwinding from uprobes in the presence of
uretprobe trampolines.
* runtime/stack.c (_stp_stack_print): Rework for uprobe context case
and refactor a bit.
* runtime/uprobes2/uprobes.h (GET_PC_URETPROBE_NONE): new constant
* runtime/uprobes2/uprobes.c (uprobe_get_pc): Support translating the
trampoline function from uprobe context in addition to uretprobe
context.
* runtime/uprobes/uprobes.h (GET_PC_URETPROBE_NONE): ditto
* runtime/uprobes/uprobes.c (uprobe_get_pc): ditto
* tapsets.cxx (uprobe_derived_probe_group::emit_module_decls):
Initialize ri in context to GET_PC_URETPROBE_NONE in generated
enter_uprobe_probe.
* testsuite/systemtap.context/fib.stp: Add an option to do a backtrace
on function entry.
* testsuite/systemtap.context/fib.exp: Test backtrace in function
entry (uprobe) probes.
|
|
|
|
| |
* runtime/stack.c (_stp_stack_print): Comment out *retprobe logic if !CONFIG_UTRACE.
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out that it breaks on kernels that don't have utrace.
* runtime/runtime.h : Don't include uprobes.h
* runtime/stack.c: Include uprobes.h
* runtime/stack-i386.c: Check if uprobes is included at all.
* runtime/stack-x86_64.c: ditto
* tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): put
uprobes.h include back in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only prints symbol+offset, or an address if the symbol isn't
known.
* runtime/runtime.h (SYM_VERBOSE_NO, SYM_VERBOSE_FULL,
SYM_VERBOSE_BRIEF): new constants
* runtime/stack.c (_stp_stack_print): support brief format
* runtime/sym.c (_stp_func_print): ditto
* tapset/ucontext-unwind.stp (print_ubacktrace_brief): new function
* testsuite/systemtap.context/fib.c: new test program
* testsuite/systemtap.context/fib.stp: new test
* testsuite/systemtap.context/fib.exp: new test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only works in uretprobes for the moment.
* runtime/stack-x86_64.c (__stp_stack_print): Rewrite trampoline PC
addresses if necessary.
* runtime/stack-i386.c (__stp_stack_print): ditto
* runtime/stack-arm.c (__stp_stack_print): Add extra argument
* runtime/stack-ppc.c (__stp_stack_print): ditto
* runtime/stack-s390.c (__stp_stack_print): ditto
* runtime/stack.c (_stap_stack_print): call __stp_stack_print with
uretprobe_instance.
* testsuite/systemtap.context/uprobe_backtrace.stp: new test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's easily available in kretprobes and uretprobes and is consistent
with the rest of the program state.
* translate.cxx (emit_common_header) : add uretprobe_instance to context.
* tapsets.cxx (common_probe_entryfn_prologue): Initialize ri in
context to 0.
(dwarf_derived_probe_group::emit_module_decls): Change IP to return
address in kretprobes.
(uprobe_derived_probe_group::emit_module_decls): enter_uretprobe_probe:
set ri (uretprobe_instance) in context. Change IP to return
address in uretprobes. Don't emit uprobe include and #define
* runtime/runtime.h : Add includes and #define for uprobes.
* runtime/stack.c (_stp_stack_print, _stp_stack_snprint): Add extra
argument for uretprobe_instance.
* tapset/context-unwind.stp (print_backtrace, backtrace): Pass NULL
for uretprobe_instance to _stp_stack_print.
* tapset/ucontext-unwind.stp (print_ubacktrace, ubacktrace): pass
uretprobe_instance to _stp_stack_print
* testsuite/systemtap.context/uprobe_uaddr.exp : new test for uaddr in
function probes
* testsuite/systemtap.context/uprobe_uaddr.stp : new file
|
|
|
|
|
|
|
|
| |
Get rid of magic numbers, use appropriate defines from ptrace.h.
From now on stack-ppc.c should be suitable for ppc32.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
|
|
|
|
|
|
| |
There should be no functional changes in this patch.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
|
|
|
|
|
|
| |
* runtime/stack.c (_stp_stack_print): Use _stp_usymbol_print when tsk given.
* testsuite/systemtap.base/uprobes_ustack.exp: New test file.
* testsuite/systemtap.base/uprobes_ustack.stp: Likewise.
|
|
|
|
|
|
| |
This code was never used, nor did it actually work.
* runtime/stack.c (_stp_ustack_print): Removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* runtime/stack-arm.c (__stp_stack_print): Take struct task_struct *.
* runtime/stack-ia64.c (__stp_stack_print): Likewise.
* runtime/stack-ppc64.c (__stp_stack_print): Likewise.
* runtime/stack-s390.c (__stp_stack_print): Likewise.
* runtime/stack-i386.c (__stp_stack_print): Likewise.
And add check and pass to unwind() and _stp_func_print().
* runtime/stack-x86_64.c: Likewise.
* runtime/stack.c *_stp_stack_print): Take and pass on task_struct.
(_stp_stack_snprint): Likewise.
* runtime/unwind.c (unwind): Take and use task_struct for
_stp_mod_sec_lookup().
* tapset/context-unwind.stp (print_backtrace): Pass NULL to
_stp_stack_print().
(backtrace): Pass NULL to _stp_stack_snprint().
|
|
|
|
|
|
|
|
|
| |
* runtime/sym.c (_stp_func_print): Take task, pass to _stp_kallsyms_lookup.
* runtime/stack.c (print_stack_address): Pass NULL.
* runtime/stack-i386.c (_stp_stack_print_fallback): Pass NULL.
(__stp_stack_print): Pass NULL or current.
* runtime/stack-x86_64.c (_stp_stack_print_fallback): Pass NULL.
(__stp_stack_print): Pass current.
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
| |
* buildrun.cxx (compile_pass): Add autoconf line for stack trace
test, which defines STAPCONF_KERNEL_STACKTRACE.
* runtime/autoconf-save-stack-trace.c: New file.
* runtime/stack.c : Use STAPCONF_KERNEL_STACKTRACE instead of
tests for kernel configuration and versions.
* runtime/stack-i386.c : ditto
* runtime/stack-x86_64.c : ditto
|
| |
|
|
|
|
|
|
|
| |
2009-02-13 David Smith <dsmith@redhat.com>
* stack.c: Fixed compile problems on systems with older kernels
(like RHEL4).
|
|
|
|
|
| |
Define new functions that use the kernel support to do a backtrace of other
tasks than current.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Recognize when a kretprobe trampoline was hit and continue with inexact stack dump.
Also some testsuite changes.
|
| |
|
|
|
|
| |
* stack.c (_stp_kta): Removed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Quentin Barnes.
* arith.c: Add arm support for 64-bit division.
* copy.c: Enable arm support.
* loc2c-runtime.h: Ditto.
* regs.[ch]: Ditto.
* stack.c: Include stack-arm.c.
* stack-arm.c: New file.
* time.c (_stp_gettimeofday_ns): hack
for arm. See PR 4569.
|
|
|
|
|
| |
* vsprintf.c: Add comment about %p.
* regs.c, stack*.c, sym.c: Fix %p calls.
|
|
|
|
|
| |
* stack.c, string.c, sym.c, transport/symbols.c:
Fix some signed vs unsigned comparison warnings.
|
|
|
|
|
|
|
| |
* stack-ppc64.c (__stp_stack_print): Remove an old
reference to the string length and instead limit backtraces
to MAXBACKTRACE.
* stack.c: Define MAXBACKTRACE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* string.c (_stp_string_init): Deleted.
(_stp_sprintf): Deleted.
(_stp_vsprintf): Deleted.
(_stp_string_cat_cstr): Deleted.
(_stp_string_cat_string): Deleted.
(_stp_string_cat_char): Deleted.
(_stp_string_ptr): Deleted.
(_stp_string_cat): Deleted.
(_stp_snprintf): Moved from vsprintf.c.
(_stp_vscnprintf): Moved from vsprintf.c.
* string.h (STP_STRING_SIZE): Deleted.
(STP_NUM_STRINGS): Deleted.
Remove all references to type "String".
* vsprintf.c (_stp_vscnprintf): Moved to string.c.
(_stp_snprintf): Moved to string.c
* sym.c (_stp_symbol_sprint): Replaced with
_stp_symbol_print, which writes to the print buffer.
(_stp_symbol_sprint_basic): Replaced with
_stp_symbol_snprint.
* runtime.h: Include io.c.
* stat-common.c: Use new _stp_print* functions.
* stat.c: Ditto.
* regs.c: Renamed to regs-ia64.c.
* current.c: Renamed regs.c.
* regs-ia64.c: New file (renamed from regs.c).
* stack.c (_stp_stack_sprint): Renamed _stp_stack_print
and now just prints to the print buffer. Calls
__stp_stack_print instead of __stp_stack_sprint.
(_stp_stack_snprint): New function. Calls _stp_stack_print and
then copies the print buffer into a string.
(_stp_stack_printj): Deleted.
(_stp_ustack_sprint): Deleted.
* stack-*.c: Rewritten to print instead of writing to strings.
Uses new _stp_print* functions.
* print.c (_stp_printf): Create new function instead of macro.
(_stp_print): Ditto.
(_stp_print_char): New function.
* map.c: Use _stp_print() and _stp_print_char()
instead of _stp_print_cstr().
* io.c (_stp_vlog): Use _stp_print() instead
of _stp_string_cat_cstr().
* copy.c (_stp_string_from_user): Deleted.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stack.c: Reorganize and split arch-specific functions to
separate files.
(_stp_kta): Better checking.
(_stp_stack_sprint): Better handling of return probes.
* stack-i386.c: New file. Uses 2.6.18 DWARF unwinder if available.
* stack-x86_64.c: New file. Uses 2.6.18 DWARF unwinder if available.
* stack-ppc64.c: New file.
* stack-ia64.c: New file.
* sym.c (_stp_kallsyms_lookup_name): New function. Like
kallsyms_lookup_name() except use our internal lookup table.
|
|
|
|
|
|
|
|
|
|
| |
* stack.c (_stp_kta): Rewrite. Use the _stap_symbols
struct instead of calling into the kernel.
* sym.c (_stp_kallsyms_lookup): Move here from runtime.h
* runtime.h: Get rid of all the symbol stuff that
did not belong here.
|
|
|
|
| |
anymore
|
| |
|
|
|
|
| |
* ALL: Cleanup copyrights.
|
|
|
|
|
|
|
| |
Systemtap should now be able to build on Ia64.
Includes supports for - function probes, return probes,
function parameter access and dumping stack backtrace.
Added by Anil S Keshavamurthy <Anil.s.keshavamurthy@intel.com>
|
|
|
|
|
| |
* stack.c (_stp_stack_sprint): Add a verbose arg
to pass along to underlying funcs.
|
|
|
|
|
|
|
|
| |
* sym.c (_stp_kallsyms_lookup): Moved to runtime.h.
* stack.c (_stp_kta): Moved to runtime.h.
* runtime.h (init_module): Initialize _stp_kallsyms_lookup
and _stp_kta.
* probes.c (_stp_lookup_name): Replaced by kallsyms_lookup_name().
|
|
|
|
|
|
|
|
| |
* current.c (_stp_sprint_regs): Implement for i386.
* sym.c (_stp_symbol_sprint): Check name before trying to
print it.
(_stp_symbol_print): Change to macro that calls _stp_symbol_sprint().
|
| |
|
| |
|
| |
|
| |
|
|
|