| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* runtime/sym.h (_stp_module): add unwind_hdr_addr member.
* runtime/unwind.c (read_ptr_sect): Modification of read_pointer that
also handles offsets from text or "data" sections.
(read_pointer): Use it.
(_stp_search_unwind_hdr): Use read_ptr_sect to calculate values that
are relative to the .eh_frame_hdr section.
(unwind_frame): Search the frame header if this is an eh frame.
* translate.cxx (get_unwind_data): Get the eh_frame_hdr too.
(dump_unwindsyms): Write out eh_frame_hdr stuff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* runtime/task_finder_vma.c (stap_remove_vma_map_info): Return negative
status on failure.
(stap_find_vma_map_info): Likewise.
(stap_find_vma_map_info_user): New function.
(stap_drop_vma_maps): New function.
* runtime/sym.h (addr): Renamed to static_addr, to store addresses for
sections which are always mapped at the same address.
(_stp_module_relocate): Add extra struct task_struct *tsk argument.
* runtime/sym.c (_stp_tf_exec_cb): New callback, calls stap_drop_vma_maps.
(_stp_tf_mmap_cb): Don't store address in module.section, but call
stap_add_vma_map_info() per tsk->group_leader for matched module.
Don't register empty/null modules.
(_stp_module_relocate): Take extra struct task_struct *tsk argument,
cache last tsk used. Only use section->static_addr for none dynamic
modules. Use stap_find_vma_map_info_user() to locate dynamic modules.
(_stp_mod_sec_lookup): Add extra argument unsigned long *rel_addr to
optionally store relative address when module/section found.
(_stp_kallsyms_lookup): Use _stp_mod_sec_lookup to find relative address.
(_stp_sym_init): Register _stp_tf_exec_cb in stap_task_finder_target.
Add error check to see if task finder could be initialized.
* dwflpp.cxx (emit_address): Pass NULL for kernel/modules and current for
user tasks to _stp_module_relocate.
* runtime/transport/symbols.c (_stp_do_relocation): Set new static_addr
_stp_section field.
* runtime/unwind.c (adjustStartLoc): Take new struct task_struct *tsk
argument and pass to stap_find_vma_map_info_user and _stp_module_relocate
to find adjusted addr.
(_stp_search_unwind_hdr): Pass through struct task_struct *tsk.
(unwind_frame): Likewise.
* tapset/context-symbols.stp (probemod): Add NULL to _stp_mod_sec_lookup
call to indicate we aren't interested in relative address.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Pass NULL to
_stp_module_relocate to indicate kernel/module address.
|
|
|
|
|
| |
* runtime/unwind.c (processCFI): Fail if the number of instructions is
larger than MAX_CFI (currently 512).
|
|
|
|
|
| |
* runtime/unwind.c (unwind_frame): Check end read from cie or fde doesn't
go passed end of unwind table.
|
|
|
|
|
|
| |
* runtime/unwind.c (cie_for_fde): Take table and table_len into account.
(fde_pointer_type): Likewise.
* runtime/unwind/unwind.h: Adjust function prototypes.
|
|
|
|
|
|
|
|
|
|
|
| |
_stp_vscnprintf is only suitable for calls from the script, with slightly
different conventions (64-bit ints/pointers, extra formatting directives).
* runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf).
* runtime/io.c (_stp_vlog): Ditto. Use vscnprintf().
* runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching
buildids. Switch to _stp_warn from printk (KERN_WARNING).
* translate.cxx, runtime/unwind.c: Numerous print formatting tweaks.
|
| |
|
|
|
|
|
|
|
|
|
| |
* runtime/unwind.c (adjustStartLoc): Add extra dbug_unwind.
(_stp_search_unwind_hdr): Always pass true for is_ehframe.
(unwind_frame): Properly pass through is_ehframe to adjustStartLoc().
(unwind): Add extra dbug_unwind.
* translate.cxx (dump_unwindsyms): Output and use correct eh_frame
and eh_len.
|
|
|
|
|
|
|
| |
* runtime/unwind.c (unwind): Call new unwind_frame() first with debug_frame
data, then if that wasn't able to unwind again with eh_frame data.
(unwind_frame): Adapted version of old unwind() function that takes a
table, table length and whether it is an eh_frame table.
|
|
|
|
|
|
|
| |
* runtime/unwind.c (adjustStartLoc): Add ptrType and is_ehframe as arguments.
Use these to adjust location when necessary.
(DEBUG_UNWIND): Move block before adjustStartLoc.
Pass false for is_ehframe throughout.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* runtime/sym.h (_stp_module): Remove unwind_data, unwind_data_len and
unwind_is_ehframe fields. Add debug_frame, eh_frame, debug_frame_len,
eh_frame_len and eh_frame_addr fields.
* runtime/unwind.c: Use debug_frame and debug_frame_len instead of
unwind_data and unwind_data_len throughout.
(cie_for_fde): Take unwind_data and is_ehframe as direct arguments.
* runtime/unwind/unwind.h (cie_for_fde): New function declaration.
* translate.cxx (get_unwind_data): Fetch and return both debug_frame
and eh_frame tables.
(dump_unwindsyms): Dump both debug_frame and eh_frame tables.
|
|
|
|
|
|
|
| |
* runtime/unwind.c (_stp_enc_hi_name): Include prefix for hi == 0.
(_stp_enc_lo_name): Don't include prefix.
(_stp_eh_enc_name): Always include hi_name.
(unwind): Always include newline in dbug_unwind() calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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/unwind.c (adjustStartLoc): .absolute sections don't need
adjustment, .dynamic sections need the section addr to be added.
|
|
|
|
|
|
| |
The kernel-tip tree also has a MAX_STACK_DEPTH defined in
perf_counter.h, so we need to separate our definition. I've changed the
definition in our unwinder to STP_MAX_STACK_DEPTH.
|
|
|
|
| |
* runtime/unwind.c (unwind): Pass current to _stp_mod_sec_lookup().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-02-18 David Smith <dsmith@redhat.com>
* io.c (_stp_log): Removed unused function.
* map.c (_stp_cmp): Replace _stp_log() with dbug().
* mempool.c (_stp_mempool_resize): Removed unused function.
* print.c (next_fmt): Removed unused function.
* procfs.c: Removed unused variable '_stp_num_procfs_files'.
* regs.c (_stp_ret_addr): Removed unused function.
* string.c (_stp_text_str): Removed unused variable 'len'.
* string.h: Removed unused variable '_stdout_' and function
declaration for deleted function '_stp_vsprintf'.
* sym.c: Removed unused variables.
* unwind.c (_stp_create_unwind_hdr): Removed unused function.
2009-02-18 David Smith <dsmith@redhat.com>
* control.c: Removed unused variable '_stp_current_buffers'.
* procfs.c (_stp_set_buffers): Removed unused function.
(_stp_register_ctl_channel_fs): Removed unused variables and
label.
* symbols.c (u32_swap): Removed unused function.
(generic_swap): Ditto.
(_stp_sort): Ditto.
(_stp_section_is_interesting): Ditto.
* transport.c (_stp_transport_init): Removed unused variable
'ret'.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
unwinder still disabled
|
| |
|
| |
|
|
|
|
|
| |
Recognize when a kretprobe trampoline was hit and continue with inexact stack dump.
Also some testsuite changes.
|
| |
|
| |
|
|
|