summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Avoid holding semaphore while making mmap callbacks.David Smith2009-06-091-52/+130
| | | | | | | | | * runtime/task_finder.c (__stp_call_mmap_callbacks_for_task): Grabs the 'mmap_sem' sempaphore. Caches vma information, releases the semaphore, then makes mmap callbacks. (__stp_utrace_task_finder_target_quiesce): Calls __stp_call_mmap_callbacks_for_task() to make mmap callbacks on initial attach to a task.
* Avoid 1 case of holding a semaphore while mmap callbacks are being made.David Smith2009-06-091-57/+75
| | | | | | | | | | * runtime/task_finder.c (__stp_call_mmap_callbacks_with_addr): Renamed from __stp_call_mmap_callbacks_with_vma(). Also added some code from __stp_utrace_task_finder_target_syscall_exit() that locks the 'mmap_sem' semaphore. This avoids holding the semaphore while the mmap callbacks are made. (__stp_utrace_task_finder_target_syscall_exit): Just calls __stp_call_mmap_callbacks_with_addr() in the mmap case.
* Make sure all DEBUG_TRANS output uses printk.David Smith2009-06-032-13/+21
| | | | | | | | * runtime/transport/control.c (_stp_ctl_write_cmd): Calls dbug_trans2 instead of _dbug (so that printk is used instead of the transport itself). (_stp_ctl_write_dbug): Ditto. * runtime/debug.h (dbug_trans2): New macro.
* Fixed STP_TRANSPORT_VERSION 1 behavior.David Smith2009-06-036-23/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/transport/control.c (_stp_ctl_write_dbug): Added support for more messages. * runtime/transport/relay_v2.c (_stp_transport_data_fs_start): New function. (_stp_transport_data_fs_stop): Ditto. (_stp_transport_data_fs_close): Moved some functionality into _stp_transport_data_fs_stop() and calls _stp_transport_data_fs_stop() also. (_stp_transport_data_fs_init): Moved some functionality into _stp_transport_data_fs_start() and calls _stp_transport_data_fs_start() also. * runtime/transport/relayfs.c (_stp_transport_data_fs_start): New function. (_stp_transport_data_fs_stop): Ditto. (_stp_transport_data_fs_close): Moved some functionality into _stp_transport_data_fs_stop() and calls _stp_transport_data_fs_stop() also. (_stp_transport_data_fs_init): Moved some functionality into _stp_transport_data_fs_start() and calls _stp_transport_data_fs_start() also. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_start): New empty function. (_stp_transport_data_fs_stop): Ditto. * runtime/transport/transport.h: Added _stp_transport_data_fs_start() and _stp_transport_data_fs_stop() prototypes. * runtime/transport/transport.c (_stp_cleanup_and_exit): Calls _stp_transport_data_fs_stop(). (_stp_transport_close): Calls _stp_transport_fs_close() earlier. (_stp_transport_init): Calls _stp_transport_data_fs_start().
* Cleanup and better original transport support.David Smith2009-05-263-4/+12
| | | | | | | | | | * runtime/print.h: Moved _stp_reserve_bytes() prototype here. * runtime/vsprintf.c (_stp_vsnprintf): Includes print.h to get _stp_reserve_bytes() prototype. * runtime/transport/transport.c (_stp_remove_root_dir): Better cleanup for STP_TRANSPORT_VERSION == 1. (_stp_transport_fs_close): Ditto.
* Added error checking and other updates.David Smith2009-05-227-488/+44
| | | | | | | | | | | | | | | | | | * runtime/vsprintf.c: Added transport.h inclusion for STP_BUFFER_SIZE definition. * runtime/transport/debugfs.c (_stp_register_ctl_channel_fs): Added error checking. * runtime/transport/transport.c (_stp_get_root_dir): Ditto. (_stp_transport_fs_init): Added original transport support and error checking. * runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Added error checking. (_stp_transport_data_fs_init): Ditto. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_init): Ditto. * runtime/transport/utt.c: Removed unused file. * runtime/transport/utt.h: Ditto.
* Merge commit 'origin/master' into pr7043David Smith2009-05-2149-760/+3395
|\ | | | | | | | | | | | | Conflicts: runtime/print.c runtime/transport/transport.c runtime/transport/transport_msgs.h
| * Initialize aptr in runtime/map.c and keep gcc-4.4 happyAnanth N Mavinakayanahalli2009-05-131-1/+1
| |
| * Problems using server scripts when not on PATH.Dave Brolley2009-05-061-1/+1
| | | | | | | | HAVE_NSS related compile time warning.
| * Add Vim modelines for new C/C++ sourcesJosh Stone2009-05-052-0/+3
| |
| * Module signing and verification using a separate file for the module signature.Dave Brolley2009-05-044-69/+532
| |
| * Fixed itrace on RHEL5 (PR10091).David Smith2009-04-272-1/+52
| | | | | | | | | | | | | | | | | | | | PR10091 fix. * runtime/itrace.c: Includes ptrace_compatibility.h. (usr_itrace_report_quiesce): Corrected return value for original version of utrace. * runtime/ptrace_compatibility.h: Defines arch_has_single_step() and arch_has_block_step() in terms of ARCH_HAS_SINGLE_STEP and ARCH_HAS_BLOCK_STEP.
| * PR10081: improve error message for verifying build-idWenji Huang2009-04-261-28/+23
| | | | | | | | | | | | | | Output debuginfo file name and build-id if verification failed. * runtime/sym.c: Print more info if not matched.
| * PR10099: Extend %M directive to support hexdumping large buffersWenji Huang2009-04-261-12/+19
| | | | | | | | | | | | | | | | | | | | This patch will make %M directive dump the variable width buffer in hex format instead of returning uint64_t number as before. * runtime/vsprintf.c: Modify %M directive. * stap.1.in: Update description. * testsuite/systemtap.printf/memory1.stp: Add test case.
| * PR5273: uprobes_i386.c instruction tableJim Keniston2009-04-241-11/+11
| | | | | | | | | | Resynch uprobes1 2-byte-opcode table with uprobes2 x86. Mostly changes a bunch of mmx instructions from rejected to accepted.
| * Cache and retrieve syscall arguments when needed.David Smith2009-04-242-35/+293
| | | | | | | | | | | | | | | | | | | | | | | | * runtime/task_finder.c (__stp_utrace_task_finder_target_syscall_entry): New function that caches syscall arguments for mmap(), munmap(), and mprotect() for use in __stp_utrace_task_finder_target_syscall_exit(). (__stp_utrace_task_finder_target_syscall_exit): Uses cached syscall argument info when making callbacks. (stap_start_task_finder): Initializes map subsytem for storing syscall argument data. * runtime/task_finder_map.c: New file containing functions to save and retrieve syscall arguments.
| * i386 uprobes1: enable the 0x0f 0x1_ row of opcodesJim Keniston2009-04-231-1/+1
| | | | | | | | to make sdt.exp pass
| * utrace/ia64: Fix syscall_get_set_args_cb() to handle syscalls via syscall()Masami Hiramatsu2009-04-221-3/+10
| | | | | | | | | | | | * runtime/syscall.h (syscall_get_set_args_cb): Fix to decode user stack collectly in case of syscall(), and check the maximum number of syscall arguments.
| * PR 9821: Use genuine strftime in staprun/stapioMasami Hiramatsu2009-04-221-105/+7
| | | | | | | | | | | | | | | | | | | | * Makefile.am: Add -fno-builtin-strftime to stapio_CFLAGS. * Makefile.in: Ditto. * runtime/staprun/common.c (stap_strfloctime): Use strftime(3). (parse_args): Remove strftime format limitation message. * main.cxx (usage): Ditto. * stap.1.in: Ditto. * staprun.8.in: Ditto.
| * Merge branch 'master' of ssh://sourceware.org/git/systemtapMark Wielaard2009-04-211-1/+2
| |\
| | * Ref-count correctly when deranged handler calls do_exit().Jim Keniston2009-04-211-1/+2
| | |
| * | Merge branch 'user_unwind'Mark Wielaard2009-04-219-57/+90
| |\ \ | | |/ | |/|
| | * Add uprobes_ustack testcase and bug fixlet.Mark Wielaard2009-04-211-1/+4
| | | | | | | | | | | | | | | | | | * 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.
| | * Add ubacktrace(), print_ustack() and print_ubacktrace().Mark Wielaard2009-04-211-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.c (_stp_usymbol_print): New function. * tapset/ucontext-unwind.stp (print_ubacktrace): New tapset function. (ubacktrace): Likewise. * tapset/ucontext-symbols.stp (print_ustack): Likewise. * testsuite/buildok/ustack.stp: New test for above three functions.
| | * Don't use stack fallback for user space unwinding when using dwarf unwinder.Mark Wielaard2009-04-212-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | It never seems to be anywhere near correct. * runtime/stack-i386.c (__stp_stack_print): Stop unwinding when dwarf unwinder fails and we are unwinding user space task. * runtime/stack-x86_64.c (__stp_stack_print): Likewise.
| | * Remove old _stp_ustack bits.Mark Wielaard2009-04-211-17/+0
| | | | | | | | | | | | | | | | | | This code was never used, nor did it actually work. * runtime/stack.c (_stp_ustack_print): Removed.
| | * Pass task from tapset, through stack and unwind functions for lookup.Mark Wielaard2009-04-208-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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().
| | * Pass task to _stp_func_print and _stp_kallsyms_lookup.Mark Wielaard2009-04-194-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * Handle .absolute and .dynamic (user space) addresses in adjustStartLoc.Mark Wielaard2009-04-191-6/+12
| | | | | | | | | | | | | | | * runtime/unwind.c (adjustStartLoc): .absolute sections don't need adjustment, .dynamic sections need the section addr to be added.
| * | PR10078: uretprobes on functions returning structs/unionsJim Keniston2009-04-203-3/+36
| | | | | | | | | | | | | | | arch_predict_sp_at_ret() for x86_32 now accommodates ret $4. Added bz10078 regression test.
| * | Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDavid Smith2009-04-202-33/+350
| |\|
| | * PR7072: use _stp_reserve_bytes for printf bufferKent Sebastian2009-04-172-33/+350
| | |
| * | Uses upstream ia64 syscall functions.David Smith2009-04-202-30/+116
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 2009-04-20 David Smith <dsmith@redhat.com> * runtime/syscall.h (syscall_get_nr): Uses upstream version of syscall_get_nr() for ia64. (syscall_get_arguments): Ditto. (in_syscall): New ia64-only function from upstream. (syscall_get_set_args_cb): Ditto. (ia64_syscall_get_set_arguments): Ditto. * runtime/task_finder.c (stap_register_task_finder_target): Removed ia64 register cache.
| * Privatize MAX_STACK_DEPTHJosh Stone2009-04-162-3/+3
| | | | | | | | | | | | 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.
| * Improved ppc and ia64 runtime/syscall.h.David Smith2009-04-161-7/+18
| | | | | | | | | | | | | | | | | | 2009-04-16 David Smith <dsmith@redhat.com> * syscall.h (syscall_get_arguments): Fixed sign extension for 32-bit processes on ppc64. (__ia64_syscall_get_arguments): Calls ia64_fetch_register() to handle NULL values. Corrected register numbers.
| * PR9940: add/use unmap_u[ret]probeJim Keniston2009-04-154-14/+75
| | | | | | | | | | For uprobes 1 and 2, add unmap_u[ret]probe() and define UPROBES_API_VERSION=2. Adapt tapsets.cxx accordingly.
| * Merge branch 'master' of ssh://kenistoj@sources.redhat.com/git/systemtapJim Keniston2009-04-1517-520/+1291
| |\
| | * Merge branch 'dwarf_unwinder'Mark Wielaard2009-04-152-8/+8
| | |\
| | | * Don't redefine STP_USE_DWARF_UNWINDER.Mark Wielaard2009-04-121-0/+2
| | | | | | | | | | | | | | | | * runtime/runtime.h: STP_USE_DWARF_UNWINDER don't redefine.
| | | * Prefer dwarf unwinder on i386 and x86_64.Mark Wielaard2009-04-111-7/+5
| | | | | | | | | | | | | | | | * runtime/runtime.h: Move up and enable check for STP_USE_DWARF_UNWINDER.
| | | * Fix unwind _stp_mod_sec_lookup.Mark Wielaard2009-04-101-1/+1
| | | | | | | | | | | | | | | | * runtime/unwind.c (unwind): Pass current to _stp_mod_sec_lookup().
| | * | Merge branch 'sections'Mark Wielaard2009-04-152-15/+13
| | |\ \
| | | * | Make sure addr falls inside section in _stp_mod_sec_lookup.Mark Wielaard2009-04-141-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.c (_stp_mod_sec_lookup): Use section size to match addr. Only return exact matches, not just closes offset.
| | | * | Only set sec in _stp_mod_sec_lookup when not NULL.Mark Wielaard2009-04-141-1/+2
| | | | | | | | | | | | | | | | | | | | * runtime/sym.c (_stp_mod_sec_lookup): Only set sec when not NULL.
| | | * | Keep track of relocation section sizes.Mark Wielaard2009-04-141-0/+1
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.h (_stp_section): Add size field. * translate.cxx (dump_unwindsyms): Get start of module address space, turn seclist into vector of secname, size pairs, track relocation section size, or add module address range if no sections, output size in _stp_section list.
| | * / PR10067: fix bitfield accessJosh Stone2009-04-131-5/+6
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * Uses <asm/syscall.h> when available.David Smith2009-04-093-149/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Make simple probes work even without KPROBES in the kernel.Mark Wielaard2009-04-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| | * Make new stap_task_finder_targets chain on correct list.Mark Wielaard2009-04-091-1/+1
| | | | | | | | | | | | | | | * runtime/task_finder.c (stap_register_task_finder_target): Also check both pathlen are zero.
| | * Make sure code using the vma tracker compiles again.Mark Wielaard2009-04-083-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | * 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.