summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Start at supporting the original transport (STP_TRANSPORT_VERSION=1).David Smith2009-05-121-6/+5
| | | | | | | | | * runtime/print.c: Only use print_new.c. * runtime/print_new.c (stp_print_flush): Add STP_TRANSPORT_VERSION 1 support. * runtime/transport/transport.c: Removed inclusion of procfs.c. * runtime/transport/procfs.c (_stp_proc_read): Adapt to new interface. (_stp_proc_write): Ditto. * runtime/transport/relayfs.c: Ditto.
* Removed unused functions and variables.David Smith2009-02-181-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-233/+10
| | | | | | | | | | | | 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.
* Fixed transport/procfs.c for systems that use the old transport (RHEL4).David Smith2009-02-131-3/+5
| | | | | | | | | | | 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().
* Fix the conflicted for_each_cpu macro with 2.6.28.Wenji Huang2008-11-171-3/+3
|
* PR6738: restore support for rhel4-era (2.6.9) kernelsFrank Ch. Eigler2008-07-121-186/+15
|
* PR6736: changelogs for post-merge compiled unwind/symbols data reorganizationFrank Ch. Eigler2008-07-101-2/+0
|
* transport/symbol rework: kernel-only probes workingFrank Ch. Eigler2008-06-291-0/+2
|
* rebased unwind_branch on top of current masterFrank Ch. Eigler2008-03-251-1/+1
|
* 2008-02-27 Martin Hunt <hunt@redhat.com>hunt2008-02-271-185/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-3/+3
| | | | * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK
* PR4037 and fixes to better synchronize staprun and stapio.hunt2008-01-151-15/+23
|
* Add support for memory allocation tracking.hunt2008-01-151-10/+10
|
* 2007-11-01 Martin Hunt <hunt@redhat.com>hunt2007-11-011-8/+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-49/+250
| | | | | | | | | | * 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-10 Martin Hunt <hunt@redhat.com>hunt2007-09-101-40/+14
| | | | | | | * procfs.c (_stp_register_ctl_channel): Call _stp_mkdir_proc_module(). (_stp_unregister_ctl_channel): Call _stp_rmdir_proc_module(). * transport.c: Include ../procfs.c runtime procfs functions.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07-26 Martin Hunt <hunt@redhat.com>hunt2007-07-261-1/+1
| | | | | | Spotted by Ming Chang. * procfs.c (_stp_register_ctl_channel): Fix iterator when removing proc entries when an error occurs.
* Fix mode in procfs cmd file.hunt2007-06-181-1/+1
|
* 2007-04-02 Martin Hunt <hunt@redhat.com>hunt2007-04-021-1/+33
| | | | | | | | | | | | | | | * transport_msgs.h (struct _stp_msg_trans): Deleted. Transport parameters are now read from procfs. * transport.c (_stp_ask_for_symbols): STP_TRANSPORT message is empty. * procfs.c (_stp_ctl_open_cmd): New. Set _stp_ pid. (_stp_ctl_close_cmd): New. Unset _stp_pid. (_stp_proc_fops_cmd): Add pointers to above funcs. (_stp_ctl_read_bufsize): New. (_stp_register_ctl_channel): Create a proc read entry "bufsize" containing transport buffer sizes.
* 2007-03-26 Martin Hunt <hunt@redhat.com>hunt2007-03-261-19/+40
| | | | | | | | * 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-72/+62
| | | | | | | | | | | | | | | | * 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.
* 2007-03-12 Frank Ch. Eigler <fche@elastic.org>fche2007-03-121-18/+8
| | | | | | | | | | * librelay.c (init_stp): Use /proc/MODULE rather than /proc/systemtap/MODULE. 2007-03-12 Frank Ch. Eigler <fche@elastic.org> * procfs.c (_stp_register_procfs): Use /proc/MODULE rather than /proc/systemtap/MODULE.
* 2007-03-12 Frank Ch. Eigler <fche@redhat.com>fche2007-03-121-9/+8
| | | | | | | | | | | | | PR 4179. Based on patch from Vasily Averin <vvs@sw.ru>: * time.c (_stp_init_time): Recover from partial failures. 2007-03-12 Frank Ch. Eigler <fche@redhat.com> PR 4179. Based on patch from Vasily Averin <vvs@sw.ru>: * procfs.c (_stp_register_procfs): Recover from partial failures. * transport.c (_stp_transport_open): Ditto.
* 2007-01-29 Martin Hunt <hunt@redhat.com>hunt2007-01-291-2/+4
| | | | | | * procfs.c: Count allocated IO memory. * symbols.c: Use _stp_kmalloc() and _stp_kzalloc(). * transport.c: Count allocated IO memory.
* 2006-11-15 Martin Hunt <hunt@redhat.com>hunt2006-11-151-5/+10
| | | | | | | | * procfs.c (_stp_proc_write_cmd): For STP_SYMBOLS, type field is a long to preserve alignment. Use STP_ALLOC_FLAGS. * symbols.c: Use STP_ALLOC_FLAGS.
* transport/procfs.c:guanglei2006-11-101-2/+2
| | | | bugfix of the obsolete buf_info and consumed_info.
* 2006-11-09 Martin Hunt <hunt@redhat.com>hunt2006-11-091-7/+7
| | | | | | | | * transport_msgs.h: Change all ints to int32_t. Prefix all struct names with "_stp". * transport.c: Use new struct names. (_stp_handle_start): Send pointer size and endianess. * procfs.c: Use new struct names.
* New dynamic module and symbol handling code.hunt2006-11-021-2/+10
|
* fix for bz 2816trz2006-09-251-0/+2
|
* 2006-09-22 Martin Hunt <hunt@redhat.com>hunt2006-09-221-3/+19
| | | | | * transport.c (_stp_work_queue): Reenable some cleanup code.
* Conversion from relay-on-procfs to relay-on-debugfstrz2006-09-191-48/+0
|
* 2006-06-05 Martin Hunt <hunt@redhat.com>hunt2006-06-051-8/+9
| | | | | * procfs.c (_stp_write): Always use spin_lock_irqsave() because this function can sometimes be called with interrupts enabled.
* 2006-04-10 Martin Hunt <hunt@redhat.com>hunt2006-04-111-4/+8
| | | | | * procfs.c (_stp_write): More fixes because buffers are no longer null-terminated.
* 2006-03-20 Martin Hunt <hunt@redhat.com>hunt2006-03-201-4/+2
| | | | * procfs.c (_stp_write): Combine buffers only for REALTIME_DATA.
* *** empty log message ***hunt2006-03-201-2/+4
|
* change relayfs version checking ifdefstrz2006-03-161-2/+2
|
* Fix for bug #2406 (autodetect supported relayfs versions)trz2006-03-151-2/+50
|
* 2006-03-15 Martin Hunt <hunt@redhat.com>hunt2006-03-151-1/+1
| | | | * procfs.c (STP_DEFAULT_BUFFERS): Bump up to 256.
* 2006-02-25 Martin Hunt <hunt@redhat.com>hunt2006-02-251-1/+2
| | | | | | | | | | | | | | | | | | * procfs.c (_stp_proc_write_cmd): Check return code for _stp_transport_open(). * transport.c (_stp_transport_write): This function can now sleep because it is (_stp_handle_start): Don't use a mutex when a simple atomic will do. (_stp_work_queue): Check atomic to see if probe_start() has finished before attempting exit. (_stp_transport_close): PR2391. Cancel work queue. (_stp_transport_init): If _stp_register_procfs() fails, return an error code. * transport.txt: New file. Documents transport initialization and shutdown sequence.
* 2006-02-17 Martin Hunt <hunt@redhat.com>hunt2006-02-171-9/+13
| | | | | | | * procfs.c (_stp_proc_read_cmd): Change spin_lock() to spin_lock_irqsave(). * transport.c (_stp_work_queue): Ditto.
* 2005-12-02 Martin Hunt <hunt@redhat.com>hunt2005-12-021-6/+6
| | | | | | | * procfs.c (_stp_set_buffers): kmalloc the buffers instead of vmalloc. (_stp_register_procfs): Ditto. (_stp_unregister_procfs): kfree the buffers.
* 2005-11-30 Martin Hunt <hunt@redhat.com>hunt2005-11-301-9/+2
| | | | | | | | | * transport.h (STP_WORK_TIMER): Declare. * transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE jiffies and check IO and exit status. (_stp_handle_exit): Deleted. * procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT. (_stp_write): Don't call wake_up_interruptible.
* Added #ifdef'ed support for kernels containing the recent relayfs API changestrz2005-10-141-0/+5
|
* 2005-09-08 Martin Hunt <hunt@redhat.com>hunt2005-09-081-3/+7
| | | | | | * procfs.c (_stp_register_procfs): Change ifdefs to eliminate unused variable warnings. (_stp_unregister_procfs): Ditto.
* 2005-08-23 Martin Hunt <hunt@redhat.com>hunt2005-08-241-5/+19
| | | | | | | | | * transport.c (_stp_cleanup_and_exit): Remove a 2 second sleep that should no longer be necessary. * procfs.c (_stp_write): If the ready queue is not empty then attempt to grab the last buffer in it and append our data to it.
* 2005-08-19 Martin Hunt <hunt@redhat.com>hunt2005-08-191-1/+6
| | | | | | | | | | * transport.c (_stp_cmd_handler): Remove. This was used by stp-control. * procfs.c (_stp_proc_write_cmd): Call schedule_work() instead of running _stp_exit_handler immediately. Fixes a problem where the module couldn't exit if all the output buffers were full. Set .owner for the filesystem entries.
* Fix typo.hunt2005-08-191-3/+3
|
* 2005-08-19 Martin Hunt <hunt@redhat.com>hunt2005-08-191-0/+361
* 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.