summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* BZ 490234 fix.David Smith2009-07-061-8/+7
| | | | | | * runtime/procfs.c (_stp_rmdir_proc_module): Now before removing either '/proc/systemtap/${MODULE}' or '/proc/systemtap', lock the transport directory. Also make sure '/proc/systemtap' is empty before removal.
* Fix on-file flight recorder mode bugs on old kernel.Masami Hiramatsu2009-06-194-35/+42
| | | | | | | | * runtime/staprun/common.c (make_outfile_name): Moved from relay.c, fix not to open /dev/null.XXX output files, and add 'bulk' argument for bulkmode. * runtime/staprun/relay.c (make_outfile_name): Moved to common.c. * runtime/staprun/relay_old.c (open_oldoutfile): Fix to use fopen() and store FILE * to percpu_tmpfile[cpu].
* Disabled transport version 3 (for now).David Smith2009-06-191-0/+6
|
* Cleanup.David Smith2009-06-183-56/+1
| | | | | | * runtime/print_old.c: Removed unneeded file. * runtime/print_flush.c: Renamed from print_new.c * runtime/print.c: Includes print_flush.c (instead of print_new.c).
* Transports now export their state.David Smith2009-06-185-17/+40
| | | | | | | | | | | | | | * runtime/transport/transport.h: Added prototype for _stp_transport_get_state(). * runtime/transport/relay_v2.c (_stp_transport_get_state): New function. * runtime/transport/relayfs.c (_stp_transport_get_state): Ditto. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_init): Sets state. (_stp_transport_data_fs_start): Ditto. (_stp_transport_data_fs_stop): Ditto. (_stp_transport_get_state): Returns state. * runtime/print_new.c (stp_print_flush): Checks transport state before trying to flush.
* Moved global data into a single structure.David Smith2009-06-181-39/+45
|
* Removed unused code (and all references to 'utt').David Smith2009-06-181-52/+0
|
* Enabled overwrite processing on original transports.David Smith2009-06-185-23/+17
| | | | | | | | | | | | | * runtime/transport/relay_v2.c (_stp_transport_data_fs_overwrite): Renamed from stp_relay_set_overwrite(). * runtime/transport/relayfs.c (stp_relay_set_overwrite): Ditto. * runtime/transport/ring_buffer.c (_stp_transport_data_fs_overwrite): New place holder function. * runtime/transport/transport.c (_stp_detach): Calls _stp_transport_data_fs_overwrite(). (_stp_attach): Calls _stp_transport_data_fs_overwrite(). * runtime/transport/transport.h: Added prototype for _stp_transport_data_fs_overwrite().
* Merge commit 'origin/master' into pr7043David Smith2009-06-161-0/+1
|\ | | | | | | | | Conflicts: runtime/transport/transport.c
| * Moved time.c inclusion from runtime/transport/transport.c to runtime/runtime.h.David Smith2009-06-162-1/+1
| | | | | | | | | | * runtime/runtime.h: Includes time.c. * runtime/transport/transport.c: Removed time.c inclusion.
* | Fixed non-bulkmode output on smp systems using transport version 2.David Smith2009-06-121-0/+15
| | | | | | | | | | * runtime/transport/relay_v2.c (__stp_relay_create_buf_file_callback): Set the 'is_global' return parameter so that smp systems work correctly.
* | Merge commit 'origin/master' into pr7043David Smith2009-06-118-104/+172
|\|
| * gcc 3.4.6 compatibility: s/{true,false}/{1,0} in runtime/unwind.cFrank Ch. Eigler2009-06-101-4/+4
| |
| * Detect kretprobe trampoline and use fallback unwinder.Mark Wielaard2009-06-034-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | * runtime/sym.h (_stp_kretprobe_trampoline): Document. * translate.cxx (unwindsym_dump_context): Add stp_kretprobe_trampoline_addr. (dump_unwindsyms): Detect kretprobe_trampoline_holder symbol address. (emit_symbol_data): Initialize and emit _stp_kretprobe_trampoline. * runtime/transport/symbols.c (_stp_do_relocation): Detect kernel load address and adjust _stp_kretprobe_trampoline. * runtime/stack-i386.c (__stp_stack_print): Always use fallback unwinder when hitting kretprobe_trampoline_holder. * runtime/stack-x86_64.c (__stp_stack_print): Likewise.
| * Fixed cut-and-paste error.David Smith2009-06-021-1/+1
| | | | | | | | | | * runtime/task_finder.c (__stp_call_mmap_callbacks_for_task): Fixed cut-and-paste error.
| * Avoid holding semaphore while making mmap callbacks.David Smith2009-06-011-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-05-281-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.
| * Restore staprun's support for REAL_UID/GIDJosh Stone2009-05-221-1/+14
| | | | | | | | | | This is needed for run-stap so that stapio and all child processes can run as the originally invoking user instead of root.
| * Properly read eh_frame and pass is_ehframe correctly.Mark Wielaard2009-05-201-6/+10
| | | | | | | | | | | | | | | | | | * 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.
| * Use debug_frame table, then fallback to eh_frame when necessary.Mark Wielaard2009-05-201-24/+39
| | | | | | | | | | | | | | * 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.
| * Pass and use ptrType and is_ehframe to unwind adjustStartLoc.Mark Wielaard2009-05-201-53/+66
| | | | | | | | | | | | | | * 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.
| * Fetch and store both debug_frame and eh_frame tables.Mark Wielaard2009-05-203-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * PR10171 workaround.David Smith2009-05-181-0/+5
| | | | | | | | * runtime/itrace.c: To avoid ia64 lockups, disable itrace on ia64.
| * PR10091 fixes.David Smith2009-05-181-0/+6
| | | | | | | | | | | | | | | | * runtime/itrace.c (usr_itrace_report_signal): Add a workaround for ppc-specific problem. * testsuite/systemtap.base/itrace.exp: Improved tests. Improved test completeness. Will also no longer give fails for systems that don't support single or block step (will give xfails instead).
| * Tidy/tighten DEBUG_UNWIND ptrType a bit.Mark Wielaard2009-05-151-14/+13
| | | | | | | | | | | | | | * 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.
* | Fixed cut-and-paste error.David Smith2009-06-091-1/+1
| | | | | | | | | | * runtime/task_finder.c (__stp_call_mmap_callbacks_for_task): Fixed cut-and-paste error.
* | 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.