summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Hid details of internal ring_buffer.c structure.David Smith2009-05-073-52/+79
| | | | | | | | | * runtime/print_new.c (stp_print_flush): Calls _stp_data_entry_data() to get data pointer. * runtime/transport/transport.h: Removed _stp_entry definition. Added _stp_data_entry_data() declaration. * runtime/transport/ring_buffer.c: Uses new _stp_data_entry structure. (_stp_data_entry_data): Added.
* Added comments.David Smith2009-05-061-0/+37
| | | | * runtime/transport/transport.h: Added comments.
* Start of support for older transport and cleanup.David Smith2009-05-064-51/+573
| | | | | | | | * runtime/transport/control.c: Added inclusion of linux/delay.h to get declaration of msleep(). * runtime/transport/relay_v2.c: New skeleton file for transport version 2. * runtime/transport/ring_buffer.c: Cleanup. * runtime/transport/transport.c: Ditto.
* Renamed STP_OLD_TRANSPORT to STP_TRANSPORT_VERSION.David Smith2009-04-028-15/+26
| | | | | | | | | | | | | 2009-04-02 David Smith <dsmith@redhat.com> * runtime.h: Defines STP_TRANSPORT_VERSION instead of STP_OLD_TRANSPORT. * staprun/staprun.h (STP_OLD_TRANSPORT): Ditto. * print.c: Changed STP_OLD_TRANSPORT to STP_TRANSPORT_VERSION. * staprun/mainloop.c (stp_main_loop): Ditto. * transport/transport.c: Ditto. * transport/transport.h: Ditto. * transport/transport_msgs.h: Ditto. * transport/utt.h: Ditto.
* 2009-03-31 David Smith <dsmith@redhat.com>David Smith2009-03-313-105/+64
| | | | | | | | | | | | * print_new.c (stp_print_flush): Pushed MAX_RESERVE logic down to _stp_data_write_reserve(). Now just keeps calling _stp_data_write_reserve() until it has written the entire print buffer. * transport/ring_buffer.c (_stp_data_write_reserve): Breaks large reserve requests down into smaller ones for better buffer use. Returns the number of bytes reserved. * transport/transport.h: Updated _stp_data_write_reserve() prototype.
* 2009-03-30 David Smith <dsmith@redhat.com>David Smith2009-03-301-89/+79
| | | | * print_new.c: Whitespace/indent changes only.
* Working bulkmode support.David Smith2009-03-132-12/+93
| | | | | | | | | | | | 2009-03-13 David Smith <dsmith@redhat.com> * print_new.c (stp_print_flush): Added bulkmode support for new transport. * transport/ring_buffer.c (__stp_find_next_entry): Fixed syntax error in bulkmode code. (_stp_transport_data_fs_init): Changed 'for_each_possible_cpu()' to 'for_each_online_cpu()' so that non-online cpu's won't have a trace file created.
* More bulkmode support.David Smith2009-03-131-44/+23
| | | | | | | | | | | | 2009-03-13 David Smith <dsmith@redhat.com> * transport/ring_buffer.c (_stp_data_open_trace): Passes the inode's private data into the file's private data. (_stp_trace_seq_to_user): Deleted unused function. (trace_seq_reset): Ditto. (__stp_find_next_entry): Renamed and added bulkmode support. (_stp_find_next_entry): Updated call. (_stp_data_read_trace): Updated call.
* More bulkmode support. Only allows for one reader of all trace files.David Smith2009-03-131-7/+29
| | | | | | | | | | | | | 2009-03-13 David Smith <dsmith@redhat.com> * transport/ring_buffer.c (__stp_free_ring_buffer): Frees _stp_trace_reader_cpumask. (__stp_alloc_ring_buffer): Allocates and clears _stp_trace_reader_cpumask. (_stp_data_open_trace): Instead of using an atomic variable, uses a cpumask variable to allow for only one reader of trace files. (_stp_data_release_trace): Clears cpumask when trace files are closed.
* Start of STP_BULKMODE support.David Smith2009-03-121-12/+38
| | | | | | | | 2009-03-12 David Smith <dsmith@redhat.com> * transport/ring_buffer.c (_stp_transport_data_fs_init): Start of STP_BULKMODE support - creates one trace file per cpu. (_stp_transport_data_fs_close): Cleans up one trace file per cpu.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtap into pr7043David Smith2009-03-128-118/+153
|\
| * 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>
* | Updated buffer size.David Smith2009-03-121-1/+5
| | | | | | | | | | | | | | 2009-03-12 David Smith <dsmith@redhat.com> * transport/ring_buffer.c (__stp_alloc_ring_buffer): Updated buffer size.
* | Small update.David Smith2009-03-112-3/+2
| | | | | | | | | | | | | | | | 2009-03-11 David Smith <dsmith@redhat.com> * print_new.c (stp_print_flush): Updated MAX_RESERVE_SIZE. * transport/ring_buffer.c (__stp_alloc_ring_buffer): Reserves more space.
* | Handles polling and breaks down large buffers.David Smith2009-03-112-8/+60
| | | | | | | | | | | | | | | | | | | | | | | | 2009-03-11 David Smith <dsmith@redhat.com> * print_new.c (stp_print_flush): Breaks up the buffer into smaller pieces (since the ring_buffer likes lots of small events, not one large one). * transport/ring_buffer.c (__stp_alloc_ring_buffer): Reserves space for struct _stp_entry. (_stp_data_poll_trace): New function. (_stp_data_write_commit): Wakes up any tasks waiting on data.
* | Cleanup.David Smith2009-03-091-162/+15
| |
* | First working version that actually produces output.David Smith2009-03-094-72/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-09 David Smith <dsmith@redhat.com> * print_new.c (stp_print_flush): Calls _stp_data_write_reserve() and _stp_data_write_commit(). * transport/ring_buffer.c (__stp_alloc_ring_buffer): Sets up a default buffer size of STP_BUFFER_SIZE; (trace_seq_reset): New function. (peek_next_entry): New function. (__find_next_entry): New function. (find_next_entry_inc): New function. (_stp_data_read_trace): Uses find_next_entry_inc() to get the next entry, then calls _stp_entry_to_user() to copy it to the user's buffer, then calls ring_buffer_consume() to consume it. (_stp_data_write_reserve): New function. (_stp_data_write_commit): New function. * transport/transport.c (_stp_transport_close): Calls functions that were ifdef'ed out. * transport/transport.h (struct _stp_entry): Added _stp_entry definition and _stp_data_write_reserve()/_stp_data_write_commit() prototypes.
* | Start of new ring_buffer transport.David Smith2009-03-044-10/+363
| | | | | | | | | | | | | | | | | | | | | | | | 2009-03-04 David Smith <dsmith@redhat.com> * runtime.h: Added _stp_exit() prototype. * transport/ring_buffer.c: New file. * transport/transport.c: Removed unneeded utt_trace lines. Includes transport/ring_buffer.c. (_stp_transport_fs_init): Calls _stp_transport_data_fs_init(). (_stp_transport_fs_close): Calls _stp_transport_data_fs_close(). * transport/transport.h: Added prototypes.
* | More cleanup.David Smith2009-02-258-40/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-25 David Smith <dsmith@redhat.com> * debug.h: Removed unused variable '_stp_transport_state'. * print_new.c (stp_print_flush): Ifdef'ed out call to utt_reserve(). * runtime.h: Added _stp_warn() prototype. * transport/control.c: Includes control.h, mempool.c, and symbols.c. Renamed '_stp_attached' to '_stp_ctl_attached'. * transport/control.h: Removed _stp_pool_q declaration. * transport/debugfs.c (_stp_register_ctl_channel_fs): Uses _stp_get_module_dir(). * transport/transport.c: Cleanup. * transport/transport.h: Ditto.
* | Major hacking to minimal config.David Smith2009-02-2410-40/+175
|/ | | | | | | | | | | | | | | | | | 2009-02-24 David Smith <dsmith@redhat.com> * print.h: New file. * print.c: Includes new print.h file. * print_new.c (stp_print_flush): Commented out some code that needs replacing. * sym.c: Includes sym.h. * transport/debugfs.c: Includes transport.h. * transport/relayfs.c: Updated _stp_get_root_dir() call. * transport/transport.c: Ifdef'ed out most setup. * transport/transport.h: Ifdef'ed out all but basics. * transport/utt.c (utt_create_tree): Updated _stp_get_root_dir() call. * transport/utt.h: Commented out 'rchan' in struct utt_trace. (utt_reserve): Ifdef'ed out guts.
* 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
|