| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* runtime/task_finder.c (__stp_call_mmap_callbacks_with_addr): Avoided
uninitialized variable error.
|
|
|
|
|
|
| |
* runtime/stack.c (_stp_stack_print_tsk): Static.
(_stp_stack_snprint_tsk): Static.
* runtime/task_finder.c (__stp_utrace_task_finder_ops): Static.
|
|
|
|
|
| |
* runtime/task_finder.c (__stp_utrace_attach): No longer prints bogus
error message when utrace_barrier succeeds.
|
|
|
|
| |
* runtime/task_finder.c: Fixed last checkin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapset-utrace.cxx (utrace_derived_probe_group::emit_module_decls):
Handles new utrace api.
* runtime/itrace.c (usr_itrace_report_signal): Ditto.
(usr_itrace_report_clone): Ditto.
(usr_itrace_report_death): Ditto.
* runtime/task_finder.c (__stp_utrace_task_finder_report_clone): Ditto.
(__stp_utrace_task_finder_report_exec): Ditto.
(__stap_utrace_task_finder_report_death): Ditto.
(__stp_utrace_task_finder_target_death): Ditto.
(__stp_utrace_task_finder_target_quiesce): Ditto.
(__stp_utrace_task_finder_target_syscall_entry): Ditto.
(__stp_utrace_task_finder_target_syscall_exit): Ditto.
* runtime/uprobes2/uprobes.c (uprobe_report_signal): Ditto.
(uprobe_report_quiesce): Ditto.
(uprobe_report_exit): Ditto.
(uprobe_report_clone): Ditto.
(uprobe_report_exec): Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guided by pahole, I've shaved off a few padding bytes here and there.
New sizes on x86_64:
stap_task_finder_target 192 -> 184
stap_itrace_probe 216 -> 208
stap_utrace_probe 328 -> 312
stap_uprobe_tf 200 -> 192
stap_uprobe_spec 48 -> 40
I only changed field layouts, not types or names, so this should be
perfectly safe. (FLW)
|
|
|
|
| |
* io.c (DEBUG_TASK_FINDER_PRINTK): Remove conditional.
|
|
|
|
|
|
| |
* task_finder.c (stap_start_task_finder): Emit _stp_dbug message at end
rather at beginning, so printed utrace-engine attach counts reflect
status at end of initialization rather than at beginning.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-09-03 Dave Brolley <brolley@redhat.com>
* tapsets.cxx (visit_cast_op): Don't disallow unprivileged users.
Annotate synthesized function with /* unprivileged */.
* tapset-utrace.cxx (register_tapset_utrace): Call allow_unprivileged
for process begin and end probes.
* translate.cxx (translate_pass): Generate '#define STP_PRIVILEGED 1'
unless --unprivileged was specified.
* runtime/transport/transport.c: Don't define _stp_unprivileged_user.
* runtime/task_finder.c (__stp_utrace_attach_match_filename): Check
that _stp_uid equals the task euid when STP_PRIVILEGED is not defined.
(stap_start_task_finder): Likewise.
* runtime/staprun/staprun.c (insert_stap_module): Don't generate
module option _stp_unprivileged_user.
|
|
|
|
|
|
|
|
|
|
| |
The previous name made it easy to misread the purpose of this
field. It is only for matching executable names, not for
shared libraries.
* runtime/task_finder.c (task_finder_target): Rename field.
(*): Adjust.
* tapset-itrace.cxx, tapset-utrace.cxx, tapsets.cxx, translate.cxx: Ditto.
|
|
|
|
|
|
|
| |
* runtime/task_finder.c (non-UTRACE): Return 0 for
stap_start_task_finder.
* translate.cxx (emit_module_init): Let vma tracker
specific to utrace.
|
|
|
|
|
|
|
| |
* translate.cxx (dump_unwindsyms): Decide based on modname[] not
mainfile[] to emit a vmcb.
* runtime/task_finder.c (non-UTRACE): Include dummy stap_{start,stop}_*
functions.
|
|
|
|
|
| |
* runtime/task_finder.c (__stp_call_mmap_callbacks_for_task): Fixed
cut-and-paste error.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* runtime/task_finder.c (stap_register_task_finder_target): Also check both
pathlen are zero.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-04-07 David Smith <dsmith@redhat.com>
PR 9940.
* tapsets.cxx (emit_vma_callback_probe_decl): Initialized new
callbacks.
(utrace_derived_probe_group::emit_probe_decl): Ditto.
(uprobe_derived_probe_group::emit_module_decls): Uses new
callback. Makes sure mapping is executable before trying to set a
probe in it.
(itrace_derived_probe_group::emit_module_init): Calls
_stp_sym_init().
(utrace_derived_probe_group::emit_module_init): Ditto.
(uprobe_derived_probe_group::emit_module_init): Ditto.
* runtime/sym.c: Moved task_finder_vma.c inclusion here from
task_finder.c.
(_stp_sym_init): New function.
(_stp_tf_mmap_cb): New function that replaces _stp_tf_vm_cb.
(_stp_tf_munmap_cb): Ditto.
* runtime/task_finder.c: Removed task_finder_vma.c inclusion.
Split vm_callback into 3 callbacks: mmap_callback,
munmap_callback, and mprotect_callback.
(stap_register_task_finder_target): Initializes new events
variables for the new callbacks.
(__STP_TASK_VM_BASE_EVENTS): No longer specifies syscall entry
events.
(__stp_call_mmap_callbacks): New function.
(__stp_call_mmap_callbacks_with_vma): Ditto.
(__stp_call_munmap_callbacks): Ditto.
(__stp_call_mprotect_callbacks): Ditto.
(__stp_call_vm_callbacks): Removed.
(__stp_utrace_task_finder_target_quiesce): Calls
__stp_call_mmap_callbacks() instead of __stp_call_vm_callbacks().
(__stp_utrace_task_finder_target_syscall_entry): Removed
function.
(__stp_utrace_task_finder_target_syscall_exit): Reports raw
mmap()/mprotect()/munmap() events.
|
|
|
|
|
|
|
| |
* runtime/task-finder.c: If ! defined (CONFIG_UTRACE) define dummy noop
API for sym.c consisting of struct stap_task_finder_target,
stap_add_vma_map_info, stap_remove_vma_map_info and
stap_find_vma_map_info.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fix caused a regression on fedora.
stap -ve 'probe process("/bin/ls").function("main") { log(pp()); }
probe process("/lib64/libc.so.6").function("*") { log(pp()); }' \
-c /bin/ls
hung (with stapio & ls processes spinning) upon startup.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2009-03-24 David Smith <dsmith@redhat.com>
PR 9989.
* runtime/task_finder.c (stap_utrace_detach): Ignores
-EINPROGRESS.
(stap_utrace_detach_ops): Ignores errors from
stap_utrace_detach(), so that other tasks will get detached from
this utrace engine.
(__stp_utrace_attach): Better error handling from
utrace_barrier().
(__stp_utrace_task_finder_target_quiesce): Ditto.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
Adjusted all headers that #include <linux/utrace.h> to follow with:
/* PR9974: Adapt to struct renaming. */
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
* runtime/task_finder.c (__stp_tf_vm_cb): Removed.
* tapsets.cxx (utrace_derived_probe_group::emit_module_decls):
Output task finder vma callback and hook it.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
2009-02-10 David Smith <dsmith@redhat.com>
* task_finder.c (stap_utrace_detach_ops): Fixed typo.
(__stp_utrace_attach): Ditto.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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-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.
|
|
|
|
| |
shlibs
|
|
|
|
|
|
|
| |
2008-09-26 David Smith <dsmith@redhat.com>
* task_finder.c (__STP_ATTACHED_TASK_EVENTS): Removed UTRACE_STOP,
which isn't needed anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-25 David Smith <dsmith@redhat.com>
* task_finder.c (__stp_utrace_attach): Added action flag to know
to request the thread to be stopped or not.
(stap_utrace_attach): Now just calls __stp_utrace_attach().
(__stp_utrace_task_finder_target_quiesce): Handles
utrace_set_events() errors properly.
* utrace_compatibility.h (enum utrace_resume_action): Added
utrace_resume_action enum.
(utrace_control): Added UTRACE_STOP support.
(utrace_engine_put): New.
(utrace_barrier): New.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-09-12 David Smith <dsmith@redhat.com>
BZ 6755
* task_finder.c: Added 'inuse' count to know when handlers are still
running.
(__stp_utrace_task_finder_report_clone): If state isn't correct,
detach. Increase 'inuse' count when starting, decrement when
exiting.
(__stp_utrace_task_finder_report_exec): Ditto.
(__stp_utrace_task_finder_target_death): Ditto.
(__stp_utrace_task_finder_target_quiesce): Increase 'inuse' count
when starting, decrement when exiting.
(__stp_utrace_task_finder_target_syscall_entry): Ditto.
(__stp_utrace_task_finder_target_syscall_exit): Ditto.
(stap_stop_task_finder): Wait until all callbacks are finished.
|
| |
|
|
|
|
| |
control
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'origin/master':
Fix memory access error in nfs.proc.read_setup, nfs.proc.write_setup and nfs.proc.commit_setup
Update NEWS regarding the systemtap client/server.
New man page for the systemtap client/server and related utilities.
Repopulate symbol/type info.
Pushed quiesce logic down into the task_finder layer.
Added bug 6841 fix utrace syscall test.
PR6731: improve listing mode to list variables
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2008-08-29 David Smith <dsmith@redhat.com>
* tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
Pushed quiesce logic down into the task_finder layer.
(utrace_derived_probe_group::emit_module_decls): Removed quiesce
handler routines. Syscall probe handler detaches if systemtap
state isn't correct.
2008-08-29 David Smith <dsmith@redhat.com>
* task_finder.c (__stp_utrace_attach_match_filename): Don't call
the callback when the interesting thread is found, call it when
the tread is quiesced.
(stap_start_task_finder): Ditto.
(__stp_utrace_task_finder_target_quiesce): Call the callback.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'origin/master':
PR5686: correct regression in semok/optimize.stp
trailing whitespace removal, as approved by emacs
fix global-var array index rendering
fix NEWS to refer to simpler context.stp tapset functions in auto-printing blurb
Document written but unread global variable automatic display.
2nd try
initial
Make _get_sock_addr return correct address in kernel before 2.6.16.
Automatically print written but unread globals
Make nodwf test passed when CONFIG_QUOTACTL unset
Uses STAPCONF_DPATH_PATH instead of a kernel version check.
Simplified "rpm" target a bit.
Moved tar archive creation step from "rpm" target to "dist-gzip" target.
remove support for "make dist" since git-archive does as well;
Examples html files moved into subdir.
2008-08-25 David Smith <dsmith@redhat.com>
ChangeLog Entries
Robustness improvements for the stap client/server
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2008-08-26 David Smith <dsmith@redhat.com>
* buildrun.cxx (compile_pass): Added autoconf-dpath-path.c.
2008-08-26 David Smith <dsmith@redhat.com>
* autoconf-d_path-path.c: New file.
* task_finder.c (__stp_get_mm_path): Uses STAPCONF_DPATH_PATH
instead of a kernel version check to determine how to call
d_path().
(__stp_utrace_task_finder_target_quiesce): Ditto.
(__stp_target_call_vm_callback): Ditto.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'origin/master':
Added task finder target parameter to vm_callback functions.
Supports original and new utrace interfaces.
Add ChangeLog entries
stap client/server now pass 'make installcheck'
Looks for both mmap and mmap2.
PR 6841 fix.
Add missing 'process' bindings.
|