summaryrefslogtreecommitdiffstats
path: root/runtime/task_finder.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * Added task finder target parameter to vm_callback functions.David Smith2008-08-211-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-21 David Smith <dsmith@redhat.com> * tapsets.cxx (itrace_derived_probe_group::emit_module_decls): Updated task finder callback function signature. (utrace_derived_probe_group::emit_module_decls): Ditto. 2008-08-21 David Smith <dsmith@redhat.com> * task_finder.c (__stp_tf_vm_cb): Added task finder target parameter. (__stp_utrace_attach_match_filename): Updated task finder callback call. (__stp_utrace_task_finder_target_death): Ditto. (__stp_utrace_task_finder_target_quiesce): Ditto. (__stp_target_call_vm_callback): Ditto. (__stp_utrace_task_finder_target_syscall_exit): Ditto. (stap_start_task_finder): Ditto.
| * Supports original and new utrace interfaces.David Smith2008-08-201-29/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-20 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Supports original and new utrace interfaces. (utrace_derived_probe_group::emit_module_decls): Ditto. 2008-08-20 David Smith <dsmith@redhat.com> * task_finder.c: Supports original and new utrace interfaces. * utrace_compatibility.h (utrace_attach_task): Compatibility layer for original utrace interface.
| * Looks for both mmap and mmap2.David Smith2008-08-201-4/+7
| | | | | | | | | | | | | | | | | | 2008-08-20 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_task_finder_target_syscall_entry): Handles mmap2 (as well as mmap). (__stp_utrace_task_finder_target_syscall_exit): Ditto. * syscall.h: Added defines for mmap and mmap2.
| * PR 6841 fix.David Smith2008-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-19 David Smith <dsmith@redhat.com> PR 6841 * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Workaround utrace bug by quiescing threads before attaching a utrace syscall engine to them. (utrace_derived_probe_group::emit_module_decls): Emit quiesce handler. 2008-08-19 David Smith <dsmith@redhat.com> PR 6841 * task_finder.c (__stp_utrace_task_finder_target_quiesce): Quiesces thread before turning on syscall tracing.
* | Merge commit 'origin/master' into pr4225Frank Ch. Eigler2008-08-171-14/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'origin/master': Mention distro specific elfutils development sub-packages needed when not found. Change system-wide probes from 'process("*").begin' to 'process.begin'. PR6836: tweak $$return formatting extend callgraph example to use $$parms / $$return PR6836: $$vars extensions, $$return small patch ... PR 6834 PR6842: work around possibly null task->signal in utrace death callback Minor bugs in stap-client. build compatibility and speed hack for bundled-elfutils mode revise build instructions; clarifying elfutils bundling and its new hosting site kbuild compatibility hack for separate-objdir O= builds PR 6445 (partial). Implemented system-wide utrace probes. Fixed compilation warning on gcc 3.x let $$vars work even with unsupported c types (e.g., funkytown floats)
| * PR6842: work around possibly null task->signal in utrace death callbackFrank Ch. Eigler2008-08-141-1/+1
| |
| * PR 6445 (partial). Implemented system-wide utrace probes.David Smith2008-08-121-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * tapsets.cxx (utrace_builder::build): Validates pid and allows probing of "*" to mean all threads. * stapprobes.5.in: Added note about a process path of "*" means to probe all threads. 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * task_finder.c (stap_register_task_finder_target): Handles probing all threads. (__stp_utrace_attach_match_filename): Ditto. (stap_start_task_finder): Ditto. 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * systemtap.base/utrace_p4.exp: Added test that probes all threads. * semko/utrace14.stp: New test.
* | Merge commit 'origin/master' into pr4225Frank Ch. Eigler2008-08-111-31/+77
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'origin/master': (34 commits) PR5049: fix overbroad effects of naive "*" prefixing; instead use optional "*/" only. stap-serverd was incorectly determining that the server could stapprobes man page: clarify statement(NUM).absolute and process("path") searching PR5049: prefix with "*" any filenames given in "fn@filename:line" probes Indentation fix. Redirect stderr gets redircted so warnings don't let example script run fail. PR6835. io/io_submit.stp: Fix #! start. Convert to normal line-ending. PR2895. Add proper #! /usr/bin/env stap line. Make example scripts executable. Use INSTALL_PROGRAM, not INSTALL_DATA for executable .stp scripts. example index: only warn if old, do not regenerate Start/stop the systemtap server from systemtap.exp and not in the top level Makefile. Lower statement wildcard test matching threshold. Moved details of utrace detach to stap_utrace_detach(). Saves thread vma information. Always generate examples indexes and install examples from srcdir. Refer to srcdir spec file Makefile so make rpm works when builddir != srcdir. Add index of subsystem and keywords at top of HTML indexes. Don't output output, exits, status line in indexes (mentioned in descriptions). Disable chmodding of samples/kmalloc-top in spec file since it isn't installed. Make sure examples indexes are always generated in builddir. ...
| * Moved details of utrace detach to stap_utrace_detach().David Smith2008-08-081-31/+68
| | | | | | | | | | | | | | | | | | | | | | | | 2008-08-08 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Calls stap_utrace_detach() to perform detach. 2008-08-08 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach): New function. (stap_utrace_detach_ops): Calls stap_utrace_detach(). (__stp_utrace_attach_match_filename): Ditto.
| * Saves thread vma information.David Smith2008-08-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 2008-08-08 David Smith <dsmith@redhat.com> * task_finder.c (__stp_tf_vm_cb): Added calls to save/delete vma information. * task_finder_vma.c (__stp_tf_vma_map_hash): New function. (__stp_tf_get_vma_map_entry_internal): Ditto. (stap_add_vma_map_info): Ditto. (stap_remove_vma_map_info): Ditto. (stap_find_vma_map_info): Ditto.
* | PR4225: it's alive, alive!Frank Ch. Eigler2008-08-021-1/+1
| |
* | PR4225: signs of lifeFrank Ch. Eigler2008-08-021-0/+14
|/
* No longer allocates structure used to save vma information.David Smith2008-07-211-0/+2
| | | | | | | | | | | | | | | 2008-07-21 David Smith <dsmith@redhat.com> * task_finder_vma.c (__stp_tf_vma_initialize): New function to initialize the free list. (__stp_tf_vma_put_free_entry): Puts a vma entry back on the free list. (__stp_tf_add_vma): Instead of allocating a vma entry, grab one from the free list by calling __stp_tf_vma_put_free_entry(). (__stp_tf_remove_vma_entry): Instead of freeing a vma entry, call __stp_tf_vma_put_free_entry() to put it on the free list instead. * task_finder.c (stap_start_task_finder): Calls __stp_tf_vma_initialize().
* Fix PR 6732: Add runtime/autoconf-real-parent.c check for task_struct field.Mark Wielaard2008-07-091-1/+2
|
* Fixed __stp_get_mm_path() error return code.David Smith2008-07-011-6/+12
| | | | | | | | | 2008-07-01 David Smith <dsmith@redhat.com> * task_finder.c (__stp_get_mm_path): Corrected error return code. (__stp_utrace_attach_match_tsk): Ignores ENOENT error from __stp_get_mm_path(). (stap_start_task_finder): Ditto.
* Handles "mortally wounded" threads correctly when detaching.David Smith2008-06-301-23/+35
| | | | | | | | | | 2008-06-30 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach_ops): Removed check to see if thread has a mm (in the case where a thread isn't quite dead yet). (stap_utrace_attach): Minor error handling improvement. (__stp_utrace_attach_match_tsk): Ditto.
* Fixed offset argument to vm_callback.David Smith2008-06-231-4/+8
| | | | | | | | | 2008-06-23 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_task_finder_target_quiesce): Fixed vm_callback offset by shifting it left PAGE_SHIFT bits. (__stp_target_call_vm_callback): Ditto. (__stp_utrace_task_finder_target_syscall_exit): Ditto.
* Handle exec's that use a relative path.David Smith2008-06-231-6/+4
| | | | | | | 2008-06-23 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_task_finder_report_exec): Handles relative exec paths correctly.
* Major update to memory map change notification code.David Smith2008-06-231-4/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-23 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Handles UDPF_NONE value. (utrace_derived_probe_group::emit_vm_callback_probe_decl): New function. (utrace_derived_probe_group::emit_module_decls): Calls emit_vm_callback_probe_decl() to set up vm_callbacks. 2008-06-23 David Smith <dsmith@redhat.com> * task_finder.c (__stp_tf_vm_cb): New function. (stap_register_task_finder_target): Sets up syscall entry and syscall exit handlers. (__stp_find_file_based_vma): New function. (__stp_utrace_task_finder_target_syscall_entry): New function. Saves vma information off at syscall entry. (__stp_target_call_vm_callback): New function. (__stp_utrace_task_finder_target_syscall_exit): New function. Handles changes to memory maps based on information saved at syscall entry. * syscall.h: New file containing syscall function. * task_finder_vma.c: New file containing saved vma information handling functions.
* Got smarter on which utrace events to set on a newly found thread.David Smith2008-06-171-3/+7
| | | | | | | | | | 2008-06-17 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_attach_match_filename): Uses new __STP_ATTACHED_TASK_EVENTS macro to determine which events to set on a newly found process based on whether the stap_task_finder_target structure has a vm_callback defined. (stap_start_task_finder): Ditto.
* Improved callback handling.David Smith2008-06-161-8/+10
| | | | | | | 2008-06-16 David Smith <dsmith@redhat.com> * task_finder.c (stap_start_task_finder): Improved callback handling.
* Very early beginnings of memory map notification support.David Smith2008-06-101-10/+101
| | | | | | | | | | | | | | | 2008-06-10 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Initializes .vm_callback. 2008-06-10 David Smith <dsmith@redhat.com> * task_finder.c (struct stap_task_finder_target): Added vm_callback public field. (stap_register_task_finder_target): Sets up .report_quiesce handler. (__stp_utrace_task_finder_target_quiesce): New function.
* Made 2.6.25 kernel updates.David Smith2008-06-091-2/+6
| | | | | | | | | | | | | | 2008-06-09 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe::join_group): Removed generated inclusion of tracehook.h. (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses '_stp_arg(0)' to get value of '$syscall'. 2008-06-09 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_task_finder_report_exec): Handles 2.6.25 kernels.
* Changed/renamed utrace probes.David Smith2008-06-061-36/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-06 David Smith <dsmith@redhat.com> * tapsets.cxx (enum utrace_derived_probe_flags): Redefined in terms of probe types instead of utrace events. (utrace_var_expanding_copy_visitor::visit_target_symbol): Uses new utrace_derived_probes_flags values. (utrace_builder::build): Handles new probe types and new utrace_derived_probes_flags values. (utrace_derived_probe_group::emit_probe_decl): Updated to handle new utrace_derived_probe_flags values. (utrace_derived_probe_group::emit_module_decls): Ditto. Also correctly handles 'begin' events correctly by installing a quiesce handler (instead of running the probe directly). (register_standard_tapsets): Registers updated utrace probe types. 2008-06-06 David Smith <dsmith@redhat.com> * task_finder.c: Added some debug logic. Use '-DDEBUG_TASK_FINDER' to enable. (stap_utrace_attach): Renamed from '__stp_utrace_attach'. (__stp_utrace_attach_match_filename): Calls callback with notification that this is a process or thread event. (__stp_utrace_attach_match_tsk): Ditto. (__stp_utrace_task_finder_report_clone): Ditto. (__stp_utrace_task_finder_report_exec): Ditto. (stap_utrace_task_finder_report_death): Ditto. (stap_start_task_finder): Ditto. (stap_stop_task_finder): Added debug logic. 2008-06-06 David Smith <dsmith@redhat.com> * systemtap.base/utrace_p4.exp: Updated for utrace probe changes. * systemtap.base/utrace_p5.exp: Ditto.
* Handle bug #6500 fallout.David Smith2008-05-281-30/+79
| | | | | | | | | | | | | | | | | | | | | | | 2008-05-28 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Instead of adding clone handlers, just call the probes directly. (utrace_derived_probe_group::emit_module_decls): For syscall probes, on exec detach the parent's utrace engine from the child. 2008-05-28 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_attach_match_filename): Added register_p parameter, which is passed on to the callback. Only adds death notification if register_p is 1. If register_p is 0, removes death notification. (__stp_utrace_attach_match_tsk): Moved code from __stp_utrace_task_finder_report_clone that handles the details of grabbing a task's path. (__stp_utrace_task_finder_report_clone): Calls new __stp_utrace_attach_match_tsk(). (__stp_utrace_task_finder_report_exec): Notifies upper layer that it might need to detach from newly exec'ed process.`
* Minor improvement to multi-threaded support.David Smith2008-05-281-8/+22
| | | | | | | | | | | | | | | | | | | 2008-05-21 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Added new 'event_flag' parameter to task_finder callback. Only calls probe handlers if we received the correct event. 2008-05-21 David Smith <dsmith@redhat.com> * task_finder.c (__stp_utrace_attach_match_filename): Added event_flag parameter of event to pass to callback. (__stp_utrace_task_finder_target_death): Ditto. (__stp_utrace_task_finder_report_clone): Calls __stp_utrace_attach_match_filename() with new argument. (__stp_utrace_task_finder_report_exec): Ditto. (stap_start_task_finder): Calls callback with an invalid event_flag since this callback call isn't related to an event.
* Fixed PR 6499 (utrace probe crash).David Smith2008-05-161-14/+18
| | | | | | | | | | | | | 2008-05-16 David Smith <dsmith@redhat.com> PR 6499. * task_finder.c (stap_register_task_finder_target): Added error check. (__stp_utrace_task_finder_report_clone): Ditto. (stap_utrace_detach_ops): Uses do_each_thread/while_each_thread instead of for_each_process (which only iterated among process group leaders instead of all threads). (stap_start_task_finder): Ditto.
* Fix for PR 6500.David Smith2008-05-081-32/+78
| | | | | | | | | | | | 2008-05-08 David Smith <dsmith@redhat.com> PR 6500. * task_finder.c (__stp_utrace_task_finder_report_exec): Moved attach logic to __stp_utrace_attach_match_filename(). (__stp_utrace_attach_match_filename): New function. (__stp_utrace_task_finder_report_clone): Calls __stp_utrace_attach_match_filename() to attach to newly cloned threads.
* Made runtime/task_finder.c improvements.David Smith2008-05-051-65/+74
| | | | | | | | | | | | | 2008-05-05 David Smith <dsmith@redhat.com> * task_finder.c (stap_utrace_detach_ops): Make sure we ignore /sbin/init. (__stp_utrace_attach): Added function to handle details of attaching a utrace engine. (__stp_utrace_task_finder_report_clone): Calls __stp_utrace_attach. (__stp_utrace_task_finder_report_exec): Ditto. (stap_start_task_finder): Ditto.
* Made utrace probes more robust.David Smith2008-04-291-48/+78
| | | | | | | | | | | | | | 2008-04-29 David Smith <dsmith@redhat.com> * tapsets.cxx (utrace_derived_probe_group::emit_probe_decl): Added death event handlers to ensure that for every utrace_attach there is a corresponding utrace_detach. (utrace_derived_probe_group::emit_module_decls): Ditto. 2008-04-29 David Smith <dsmith@redhat.com> * task_finder.c: Made more robust by ensuring that all utrace attaches have a corresponding utrace detach.
* Fixed task_finder.c kernel 2.6.25 change.Srinivasa2008-04-251-1/+1
| | | | | | | 2008-04-25 David Smith <dsmith@redhat.com> From Srinivasa <srinivasa@in.ibm.com> * task_finder.c (__stp_get_mm_path): Fixed kernel 2.6.25 change.
* Made kernel 2.6.25 changes in task_finder.c.David Smith2008-04-241-5/+6
| | | | | | 2008-04-24 David Smith <dsmith@redhat.com> * task_finder.c (__stp_get_mm_path): Made kernel 2.6.25 changes.
* 2008-04-16 David Smith <dsmith@redhat.com>David Smith2008-04-161-2/+3
| | | | * task_finder.c (__stp_get_mm_path): Made kernel 2.6.18 changes.
* 2008-04-15 David Smith <dsmith@redhat.com>David Smith2008-04-161-0/+19
| | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Added utrace_derived_probe group and task_finder_derived_probe_group members. * elaborate.cxx (systemtap_session::systemtap_session): Added initialization of utrace_derived_probes and task_finder_derived_probes. * tapsets.cxx (struct task_finder_derived_probe_group): New derived_probe_group to handle task_finder framework. (struct utrace_derived_probe_group): New derived_probe_group to handle utrace probes. 2008-04-15 David Smith <dsmith@redhat.com> PR 5961 (partial) * task_finder.c (stap_start_task_finder): When an interesting thread is found that is already running, make sure to set up thread death notification.
* 2008-04-04 David Smith <dsmith@redhat.com>David Smith2008-04-041-0/+410
PR 5961 (partial) * task_finder.c: New file.