summaryrefslogtreecommitdiffstats
path: root/runtime/transport/control.c
Commit message (Collapse)AuthorAgeFilesLines
* PR9947: move runtime cleanup out of the work queueJosh Stone2009-03-131-1/+6
| | | | | | | | | | | | 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.
* Removed unused functions and variables.David Smith2009-02-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* Reduced control channel code duplication.David Smith2009-02-171-35/+21
| | | | | | | | | | | | 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.
* Use 'static' as much as possibleJosh Stone2009-01-281-1/+1
| | | | | | | | | | 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.
* PR6736: changelogs for post-merge compiled unwind/symbols data reorganizationFrank Ch. Eigler2008-07-101-1/+0
|
* transport/symbol rework: kernel-only probes workingFrank Ch. Eigler2008-06-291-1/+4
|
* STP_RELOCATE message for kernel relocatability (re)adaption, starting ↵Frank Ch. Eigler2008-06-291-3/+4
| | | | implementation
* Remove STP_UNWIND support in _stp_ctl_write_dbugWenji Huang2008-06-131-4/+0
|
* PR6429: remove stapio STP_UNWIND support and associated elfutils dependencyFrank Ch. Eigler2008-06-031-3/+0
|
* Change staprun to exec stapio. Add "-d" option to staprun.Martin Hunt2008-04-211-1/+1
|
* control.c (_stp_ctl_write_dbug): Insert missing break.Martin Hunt2008-03-251-0/+1
|
* rebased unwind_branch on top of current masterFrank Ch. Eigler2008-03-251-203/+22
|
* 2008-02-27 Martin Hunt <hunt@redhat.com>hunt2008-02-271-124/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | * sym.h (_stp_module): Add text_size, lock, and unwind data pointer. * sym.c (_stp_find_module_by_addr): New function. (_stp_kallsyms_lookup): Call _stp_find_module_by_addr(). (_stp_get_unwind_info): New. * runtime.h: Move debug macros to debug.h. Include it. * debug.h: New file. * map.c: Update debug calls. * map-gen.c: Update debug calls. * pmap-gen.c: Update debug calls. * mempool.c: New file. * symbols.c: Use rwlocks. Use new dbug macros. Handle unwind info if present. * transport.c: Include mempool.c. Update dbug and kbug calls to new macros. * transport_msgs.h (_stp_command_name): Add struct containing message names for debugging. * control.c, procfs.c: Use new dbug macros. Use new mempool functions.
* 2008-01-28 Martin Hunt <hunt@redhat.com>hunt2008-01-281-4/+4
| | | | * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK
* PR4037 and fixes to better synchronize staprun and stapio.hunt2008-01-151-17/+28
|
* Add support for memory allocation tracking.hunt2008-01-151-6/+6
|
* 2007-11-01 Martin Hunt <hunt@redhat.com>hunt2007-11-011-11/+6
| | | | | | * procfs.c, control.c, transport.c: Recognize when stapio is detached and disable delayed work. Enable when attached. Cleanup code to destroy workqueue on exit.
* 2007-10-12 Martin Hunt <hunt@redhat.com>hunt2007-10-121-46/+206
| | | | | | | | | | * transport.c (_stp_ask_for_symbols): Don't ask for transport_info yet. Need to wait until symbols are received. (_stp_work_queue): Rename _stp_ready_q to _stp_ctl_ready_q. * procfs.c: Create a ".symbols" channel and use it for STP_MODULE and STP_SYMBOLS. Rename "cmd" channel to ".cmd". * control.c: Ditto.
* 2007-09-21 Martin Hunt <hunt@redhat.com>hunt2007-09-211-1/+1
| | | | | From Alan Brunelle * control.c (_stp_ctl_read_cmd): Cast count to an int before printing.
* 2007-09-20 Martin Hunt <hunt@redhat.com>hunt2007-09-201-3/+2
| | | | | * transport.h: Increase default buffer size. * control.c (_stp_ctl_read_cmd): Check buffer size.
* 2007-08-17 Martin Hunt <hunt@redhat.com>hunt2007-08-171-0/+3
| | | | | | | | PR3857 From Masami Hiramatsu * utt.c (utt_subbuf_start_callback): Use overwrite flag. * control.c (_stp_ctl_open_cmd): Set overwrite_flag off. (_stp_ctl_close_cmd): Set overwrite flag on.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * control.c (_stp_ctl_write): Make sure we don't overflow. (_stp_ctl_open_cmd): Do not allow multiple opens of the control file. (_stp_ctl_write_cmd): Once STP_START is received, ignore everything except STP_EXIT. Create another state variable "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless initialized is 0. Also check that current pid is the same as the pid that did insmod. (_stp_register_ctl_channel): Bug fix - sets owner/group after checking for NULL. * procfs.c (_stp_ctl_write): Make sure we don't overflow. (_stp_ctl_open_cmd): Do not allow multiple opens of the control file. (_stp_ctl_write_cmd): Once STP_START is received, ignore everything except STP_EXIT. Create another state variable "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless initialized is 0. Also check that current pid is the same as the pid that did insmod. (_stp_register_ctl_channel): Set ownership of cmd file and percpu files for bulkmode. * relayfs.c (utt_trace_setup): Set ownership of percpu files. Improved error handling. (utt_trace_remove): Improved error checking. * utt.c (utt_remove_tree): Improved error checking. (utt_trace_cleanup): Ditto. (utt_create_buf_file_callback): Set file ownership. (utt_create_global_buf_file_callback): Set file ownership. * transport.h: Delcare _stp_uid, _stp_gid, and _stp_init_pid. * transport.c (_stp_transport_init): Set _stp_uid, _stp_gid, and _stp_init_pid.
* 2007-06-21 Martin Hunt <hunt@redhat.com>hunt2007-06-211-0/+6
| | | | | * control.c (_stp_ctl_write_cmd): Add support for STP_BULK. * transport_msgs.h (enum): Add STP_BULK.
* Fix mode in procfs cmd file.hunt2007-06-181-1/+1
|
* 2007-06-18 Martin Hunt <hunt@redhat.com>hunt2007-06-181-1/+1
| | | | * control.c (_stp_register_ctl_channel): Fix mode of cmd file.
* * control.c: Explicit type cast for picky compilers.wcohen2007-05-161-1/+1
|
* *** empty log message ***hunt2007-05-161-1/+1
|
* 2007-05-15 Martin Hunt <hunt@redhat.com>hunt2007-05-161-7/+10
| | | | | | * control.c: Change default buffer number and size. (_stp_ctl_write): Add debug statements. Check size of message to avoid overwriting buffer.
* 2007-03-28 Martin Hunt <hunt@redhat.com>hunt2007-03-281-0/+15
| | | | | | * control.c (_stp_ctl_open_cmd): Set _stp_pid. (stp_ctl_close_cmd): Clear _stp_pid. * transport.h: Declare _stp_pid;
* 2007-03-26 Martin Hunt <hunt@redhat.com>hunt2007-03-261-4/+2
| | | | | | | | * symbols.c (_stp_do_module): If a module has no symbols, just return NULL instead of an errorcode. * control.c, procfs.c, relayfs.c, transport.c, utt.c, utt.h: Revert back to using systemtap/modulename instead of systemtap_pid.
* 2007-03-14 Martin Hunt <hunt@redhat.com>hunt2007-03-141-0/+275
| | | | | | | | | | | | | | | | * transport_msgs.h: ifdef old messages as such. Add support for new transport. * relayfs.c: Simplify and add new interface to look like utt. * utt.[ch]: New files. Similar to the proposed utt interface. These setup and teardown relayfs on debugfs. * control.c: New file. Implements a simple control channel. A small subset of procfs.c. * procfs.c: This is now only used for old kernels lacking newer relayfs. Change STP_RELAYFS to STP_BULKMODE. Use new messages from transport_msgs.h. Don't support RELAYFS_CHANNEL_VERSION >= 4. CHanges all control channel functions to new names. Use pids instead of module names in /proc names.
* 2005-08-19 Martin Hunt <hunt@redhat.com>hunt2005-08-191-228/+0
| | | | | | | | | | | * transport.h: Remove netlink references. * transport.c: Remove netlink references. Ifdef relayfs code. * procfs.c: New file. * Makefile: Deleted. * control.c: Deleted. * control.h: Deleted. * netlink.c: Deleted. * netlink.h: Deleted.
* 2005-06-23 Martin Hunt <hunt@redhat.com>hunt2005-06-231-1/+1
| | | | | * control.c: Replace macro DEFINE_SPINLOCK because some kernels don't have it.
* initial revisiontrz2005-05-061-0/+228