summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* PR6930: stapio: run in background as a daemonMasami Hiramatsu2009-03-203-4/+84
| | | | | | | Add '-D'(daemon mode) option to staprun/stapio for daemon mode. In this mode, stapio shows just its pid and detachs from console. Since it has no stdio, this mode requires -o option. stapio will exit when it receives SIGTERM or detects some error.
* PR6930: staprun: supports error message to syslogMasami Hiramatsu2009-03-203-8/+33
| | | | | Add an interface (eprintf) to output error messages to syslogd, because staprun has no stderr after detaching from console.
* PR9940: avoid duplicated calling of uprobes in shared librariesWenji Huang2009-03-191-2/+4
| | | | | | | Add map_p argument to __stp_call_vm_callbacks_with_vma to well tune the vma callback. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* start of rhel5 compatibility for itraceFrank Ch. Eigler2009-03-192-2/+49
|
* add runtime/autoconf magic for itrace on pre-find_task_by_vpid kernelsFrank Ch. Eigler2009-03-191-0/+6
|
* Fix for spinlock bad magic error with itrace probe pointMaynard Johnson2009-03-181-6/+2
|
* Don't mutex_unlock in __stp_tf_get_vma_map_entry_internal.Mark Wielaard2009-03-181-1/+0
| | | | | | | | | All callers of __stp_tf_get_vma_map_entry_internal lock and unlock the mutex correctly themselves in all cases. This unlock would trigger a double unlock. * runtime/task_finder_vma.c (__stp_tf_get_vma_map_entry_internal): Don't mutex_unlock(&__stp_tf_vma_mutex).
* Get the canonical path of the main file for comparison at runtime.Mark Wielaard2009-03-172-1/+2
| | | | | | | | | When given directly by the user through -d or in case of the kernel name and path might differ. path should be used for matching. * runtime/sym.h (_stp_module): Add path field. * runtime/task_finder.c (__stp_tf_vm_cb): Use module path to compare vm_path. * translate.cxx (dump_unwindsyms): Output canonical path.
* PR9951: Prevent GCC warnings in deref()Josh Stone2009-03-161-6/+5
| | | | | | | | | In some configurations, GCC was warning about a possible use of _v in the deref macros. I could not reproduce the error, but the only case where _v is not written is if lookup_bad_addr rejects the address, in which case we will hit DEREF_FAULT and _v won't be used. Now we're priming _v=0 anyway, so GCC has no right to complain...
* Move vma module tracking from pr6866 branch to master.Mark Wielaard2009-03-152-7/+45
| | | | | | | | | | | | * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Always emit vm callback probe for __stp_tf_vm_cb. * runtime/task_finder.c (__stp_tf_vm_cb): Always expose, move _stp_dbug statements under ifdef DEBUG_TASK_FINDER_VMA. Find and record corresponding module when vm_path not NULL. * runtime/task_finder_vma.c (struct __stp_tf_vma_entry): Add _stp_module. (stap_add_vma_map_info): Add _stp_module argument and assign. (__stp_tf_get_vma_entry_addr): New static function to get the __stp_tf_vma_entry given an address.
* Move lookup_bad_addr call in STAPCONF_PROBE_KERNELJosh Stone2009-03-131-8/+6
| | | | | | | | | | | | | | | With most of the implementations, kread/kwrite call deref/store_deref, and so it makes sense to have lookup_bad_addr in the latter as an underlying address check. However, in the STAPCONF_PROBE_KERNEL case that uses probe_kernel_read and probe_kernel_write, the roles are reversed, so lookup_bad_addr needs to be in kread/kwrite. Also note that __deref_bad and __store_deref_bad should only be used in cases that can be determined at compile time. These turn into invalid symbols which prevent the module from loading. (They might be better replaced with compile-time assertions.)
* PR9947: move runtime cleanup out of the work queueJosh Stone2009-03-134-8/+35
| | | | | | | | | | | | The kernel lockdep checking found a possible deadlock if a forced rmmod tried to destroy _stp_work_queue at the same time that the work queue was unregistering tracepoints. An unlikely scenario, but still possible. Now the work queue will just issue a STP_REQUEST_EXIT down to usermode, and usermode will echo back an STP_EXIT that triggers the actual probe cleanup. This way the unregistrations are happening in exactly the same context as the registrations were.
* Adapt to linux-next commit changing __alloc_percpu API.Frank Ch. Eigler2009-03-082-22/+9
| | | | | After linux-next commit f2a8205c, it takes two parameters again, so we autoconf for it rather than use KERNEL_VERSION ifdefs.
* stap autoconf test for kernel stack trace supportTim Moore2009-03-044-6/+27
| | | | | | | | | | * 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
* This patch updates the itrace code to support the new utrace interface.Maynard Johnson2009-03-031-29/+117
| | | | | It also adds a private copy of access_process_vm to runtime/itrace.c since that function is not consistently exported by all distros.
* PR9875: Remove sduprobesWenji Huang2009-03-031-61/+0
| | | | | | | | | | | | Impact: cleanup Since sdt.h is in git tree, sduprobes is no longer needed. * Makefile.am: Remove sduprobes. * Makefile.in: Regenerated. * doc/Makefile.in: Ditto. * runtime/sduprobes.c: Removed. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* Add selective use of _stp_time_init/kill (PR9822)Josh Stone2009-02-232-7/+7
| | | | | | | | Our gettimeofday runtime has frequent wakeups to stay in sync with kernel time, but this is wasted effort if gettimeofday is not used in the script. This patch moves the calls to _stp_time_init and _stp_time_kill into begin and end/error probes, which only get pulled in if one of the gettimeofday variants is called.
* Better <linux/debugfs.h> header file inclusion.David Smith2009-02-202-1/+2
| | | | | | | 2009-02-20 David Smith <dsmith@redhat.com> * debugfs.c: Added inclusion of linux/debugfs.h. * relayfs.h: Removed inclusion of linux/debugfs.h.
* Kill all ChangeLogsJosh Stone2009-02-193-4291/+0
| | | | | | Mark Wielaard, a dear friend of the departed, will be performing a song and dance at the funeral services to commemorate the joyous times that they had together.
* PR9866 band-aid: deactivate new CONFIG_STACKTRACE code for older kernelsFrank Ch. Eigler2009-02-184-5/+12
|
* Remove context argument from _stp_stack_print_fallback (PR 9860).William Cohen2009-02-182-4/+9
|
* Removed unused functions and variables.David Smith2009-02-1816-374/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* Move sdt.h to includes/sys and use in tests.Mark Wielaard2009-02-172-180/+4
|
* Reduced control channel code duplication.David Smith2009-02-176-270/+132
| | | | | | | | | | | | 2009-02-17 David Smith <dsmith@redhat.com> * control.c: Contains generic control channel functions. * procfs.c: Specific procfs control channel functions. All generic control channel functions moved to control.c. * debugfs.c: New file containing debugfs specific control channel functions. * control.h: New file. * transport.c: Updated file inclusion.
* sdt.h (STAP_PROBE): Take provider and probe as arguments.Mark Wielaard2009-02-162-1/+5
|
* Fix )( typo in sdt.h STAP_PROBE9 parm9.Mark Wielaard2009-02-162-1/+5
|
* Handle c++ static user probes via .probe, c via .label.Stan Cox2009-02-152-99/+51
|
* Fixed stack.c compile problems on systems with older kernels (like RHEL4).David Smith2009-02-132-0/+5
| | | | | | | 2009-02-13 David Smith <dsmith@redhat.com> * stack.c: Fixed compile problems on systems with older kernels (like RHEL4).
* Fixed transport/procfs.c for systems that use the old transport (RHEL4).David Smith2009-02-134-3/+19
| | | | | | | | | | | 2009-02-13 David Smith <dsmith@redhat.com> * procfs.c: Added macros to guard against multiple inclusion. 2009-02-13 David Smith <dsmith@redhat.com> * procfs.c: Added inclusion of ../procfs.c for _stp_mkdir_proc_module().
* Moved inclusion of runtime/procfs.c to a better place.David Smith2009-02-122-1/+3
| | | | | | | | | | | | 2009-02-12 David Smith <dsmith@redhat.com> * tapsets.cxx (procfs_derived_probe_group::emit_module_decls): Moved inclusion of procfs.c here from runtime/transport.c 2009-02-12 David Smith <dsmith@redhat.com> * transport.c: Moved inclusion of procfs.c to procfs_derived_probe_group::emit_module_decls() in tapsets.cxx.
* Cleanup. Renamed _stp_{un}lock_debugfs() to _stp_{un}lock_transport_dir().David Smith2009-02-127-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-12 David Smith <dsmith@redhat.com> * transport.c (_stp_lock_transport_dir): Renamed from _stp_lock_debugfs(), since on older kernels this actually uses procfs. (_stp_unlock_transport_dir): Renamed from _stp_unlock_debugfs(), since on older kernels this actually uses procfs. (_stp_lock_transport_dir): Changed _stp_lock_debugfs()/_stp_unlock_debugfs() to _stp_lock_transport_dir()/_stp_unlock_transport_dir(). * transport.h: Ditto. Also added _stp_transport_init() prototype. * utt.c (utt_remove_root): Changed _stp_lock_debugfs()/_stp_unlock_debugfs() to _stp_lock_transport_dir()/_stp_unlock_transport_dir(). * relayfs.c (_stp_remove_relay_root): Ditto. 2009-02-12 David Smith <dsmith@redhat.com> * procfs.c (_stp_rmdir_proc_module): Changed _stp_lock_debugfs()/_stp_unlock_debugfs() to _stp_lock_transport_dir()/_stp_unlock_transport_dir(). (_stp_mkdir_proc_module): Ditto.
* Use kernel stack backtrace support when availableTim Moore2009-02-114-0/+104
| | | | | Define new functions that use the kernel support to do a backtrace of other tasks than current.
* Fixed __stp_utrace_attach by always checking for mm.David Smith2009-02-112-5/+9
| | | | | | | 2009-02-11 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_attach): Still checks for mm after checking task's flags for PF_KTHREAD.
* Fixed typo in last change.David Smith2009-02-102-2/+5
| | | | | | | 2009-02-10 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach_ops): Fixed typo. (__stp_utrace_attach): Ditto.
* Ignores kernel threads (by checking for PF_KTHREAD).David Smith2009-02-102-0/+31
| | | | | | | | | 2009-02-10 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach): Ignores kernel threads by checking task's flags for PF_KTHREAD. (stap_utrace_detach_ops): Ditto. (__stp_utrace_attach): Ditto.
* 2.6.29rc build fix: autoconf for proc_dir_entry->owner going awayFrank Ch. Eigler2009-02-063-1/+18
|
* PR9740/9816? - workaround for kernel valloc bugFrank Ch. Eigler2009-02-054-0/+30
|
* Add STAP_PROBE7, 8 and 9 variants to sdt.h.Mark Wielaard2009-02-022-3/+76
|
* Add .label("label")Stan Cox2009-02-011-1/+1
|
* Use 'static' as much as possibleJosh Stone2009-01-2837-198/+197
| | | | | | | | | | 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.
* 2009-01-28 David Smith <dsmith@redhat.com>David Smith2009-01-282-0/+53
| | | | | | PR9788 * mainloop.c (cleanup_and_exit): Added workaround for bug 9788 by fork'ing/exec'ing staprun.
* sdt.h (STAP_PROBE): Use "g", not "r", for asm args.Mark Wielaard2009-01-272-6/+10
|
* sdt.h (struct _probe_): Make probe_name a STAP_PROBE_STRUCT_ARG.Stan Cox2009-01-272-3/+7
|
* Fix syscall.exp.Stan Cox2009-01-261-1/+1
|
* sdt.h: DTRACE_PROBE5 is STAP_PROBE5, not 4, likewise for 6.Mark Wielaard2009-01-262-2/+6
|
* Add dtrace -h supportStan Cox2009-01-221-41/+71
|
* PR 9673. Only use one utrace engine for all targets with same path or pid.David Smith2009-01-202-155/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-20 David Smith <dsmith@redhat.com> PR 9673. * task_finder.c (struct stap_task_finder_target): Added 'vm_events' field. (stap_register_task_finder_target): Sets vm_events if a vm_callback is present. (__stp_task_finder_cleanup): Only detaches engines on the main __stp_task_finder_list linked list. (__stp_call_callbacks): New function. (__stp_call_vm_callbacks): New function. (__stp_utrace_attach_match_filename): Calls __stp_call_callbacks() to call callbacks. (__stp_utrace_task_finder_target_death): Ditto. (__stp_utrace_task_finder_target_quiesce): Calls __stp_call_callbacks() and __stp_call_vm_callbacks() to call callbacks. (__stp_call_vm_callbacks_with_vma): Renamed from __stp_target_call_vm_callback. (__stp_utrace_task_finder_target_syscall_exit): Calls __stp_call_vm_callbacks() to call vm callbacks. (stap_start_task_finder): Instead of a utrace engine for every task_finder_target, there is now one utrace engine for all targets with the same path or pid.
* Add dtrace and sdt.hStan Cox2009-01-131-0/+133
|
* Create the rpm subpackage systemtap-sdt-develStan Cox2009-01-131-133/+0
|
* PR 7082: patch for uprobes2 (kernel > 2.6.26)Jim Keniston2009-01-132-11/+75
|