summaryrefslogtreecommitdiffstats
path: root/runtime/io.c
Commit message (Collapse)AuthorAgeFilesLines
* runtime diagnostics: remove ANSI goo, add -DSTAP_DEBUG_PRINTK option.Frank Ch. Eigler2009-09-081-1/+8
| | | | | | * runtime/io.c (_stp_vlog): Don't put ansi highlighting into debugging messages. #if STAP_DEBUG_PRINTK, direct all diagnostics to appropriate printk channel instead of runtime trace buffer.
* PR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtimeFrank Ch. Eigler2009-09-021-1/+4
| | | | | | | | | | | _stp_vscnprintf is only suitable for calls from the script, with slightly different conventions (64-bit ints/pointers, extra formatting directives). * runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf). * runtime/io.c (_stp_vlog): Ditto. Use vscnprintf(). * runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching buildids. Switch to _stp_warn from printk (KERN_WARNING). * translate.cxx, runtime/unwind.c: Numerous print formatting tweaks.
* Removed unused functions and variables.David Smith2009-02-181-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
* Use 'static' as much as possibleJosh Stone2009-01-281-5/+5
| | | | | | | | | | 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.
* 2008-01-29 Martin Hunt <hunt@redhat.com>hunt2008-01-301-2/+3
| | | | | | * io.c (_stp_vlog): Use get_cpu() instead of smp_processor_id() because this function can get called with interrupts enabled.
* 2007-03-14 Martin Hunt <hunt@redhat.com>hunt2007-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | * bench2/bench.rb: Updated to work with new transport and new itest.c. * bench2/Makefile: Updated for new itest.c * bench2/itest.c: Rewritten to use multiple threads and automatically divide the workload among the threads. * print.c (_stp_print_flush): Move to print_new.c and print_old.c. * print_new.c: New file containing _stp_print_flush() for the new transport. * print_old.c: Ditto for old transport. * runtime.h (STP_OLD_TRANSPORT): Define (errk): Define. (MAXSTRINGLEN): Define if not already defined. * io.c (_stp_vlog): Use _stp_ctl_write().
* 2007-01-31 Martin Hunt <hunt@redhat.com>hunt2007-01-311-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * string.c (_stp_string_init): Deleted. (_stp_sprintf): Deleted. (_stp_vsprintf): Deleted. (_stp_string_cat_cstr): Deleted. (_stp_string_cat_string): Deleted. (_stp_string_cat_char): Deleted. (_stp_string_ptr): Deleted. (_stp_string_cat): Deleted. (_stp_snprintf): Moved from vsprintf.c. (_stp_vscnprintf): Moved from vsprintf.c. * string.h (STP_STRING_SIZE): Deleted. (STP_NUM_STRINGS): Deleted. Remove all references to type "String". * vsprintf.c (_stp_vscnprintf): Moved to string.c. (_stp_snprintf): Moved to string.c * sym.c (_stp_symbol_sprint): Replaced with _stp_symbol_print, which writes to the print buffer. (_stp_symbol_sprint_basic): Replaced with _stp_symbol_snprint. * runtime.h: Include io.c. * stat-common.c: Use new _stp_print* functions. * stat.c: Ditto. * regs.c: Renamed to regs-ia64.c. * current.c: Renamed regs.c. * regs-ia64.c: New file (renamed from regs.c). * stack.c (_stp_stack_sprint): Renamed _stp_stack_print and now just prints to the print buffer. Calls __stp_stack_print instead of __stp_stack_sprint. (_stp_stack_snprint): New function. Calls _stp_stack_print and then copies the print buffer into a string. (_stp_stack_printj): Deleted. (_stp_ustack_sprint): Deleted. * stack-*.c: Rewritten to print instead of writing to strings. Uses new _stp_print* functions. * print.c (_stp_printf): Create new function instead of macro. (_stp_print): Ditto. (_stp_print_char): New function. * map.c: Use _stp_print() and _stp_print_char() instead of _stp_print_cstr(). * io.c (_stp_vlog): Use _stp_print() instead of _stp_string_cat_cstr(). * copy.c (_stp_string_from_user): Deleted.
* 2007-01-30 Martin Hunt <hunt@redhat.com>hunt2007-01-301-11/+11
| | | | | | | | | | | * io.c (_stp_vlog): Use dynamic percpu allocations instead of very wasteful static allocations. * print.c (_stp_print_init): Do percpu allocations for io.c. (_stp_print_cleanup): Free percpu allocations. * string.c (_stp_sprintf): Overflow check needed to be >= instead of >.
* 2006-11-02 Martin Hunt <hunt@redhat.com>hunt2006-11-021-2/+2
| | | | | * io.c (_stp_vlog, _stp_dbug): Make first parameter const. * runtime.h: Update prototype for _stp_dbug.
* 2006-09-26 David Smith <dsmith@redhat.com>dsmith2006-09-261-5/+5
| | | | | | | | | | * README: Changed 'stpd' references to 'staprun'. * README.doc: Ditto. * TODO: Ditto. * io.c: Ditto. * print.c: Ditto. * runtime.h: Ditto. * bench2/bench.rb: Ditto.
* 2006-09-26 Martin Hunt <hunt@redhat.com>hunt2006-09-261-7/+0
| | | | | * io.c (_stp_vlog): Remove ifdef for STP_RELAYFS. Relayfs now behaves the same as procfs.
* 2006-01-15 Frank Ch. Eigler <fche@elastic.org>fche2006-01-151-3/+0
| | | | | | | | PR 2148 * translate.cxx (MAXERRORS): Actually the max should be 0, so first error aborts session. * Revert last stp_exit change.
* 2006-01-10 Martin Hunt <hunt@redhat.com>hunt2006-01-101-0/+3
| | | | * io.c (_stp_exit): set STAP_SESSION_STOPPING.
* 2006-01-03 Frank Ch. Eigler <fche@redhat.com>fche2006-01-031-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 1144, 1379 * tapsets.cxx (emit_probe_prologue, _epilogue): New routines. Call from existing derived_probe spots. Implement soft errors in epilogue code. Implement reentrancy detection in prologue code. (dwarf_derived_probe::emit_deregistration): Add kprobes layer "nmissed" to skipped_count. * translate.cxx (varlock): Use nsleep(TRYLOCKDELAY) in lock contention loop. (emit_module_exit): Report number of soft errors and skipped probes. (emit_function, _probe): Add __restrict__ marker to context pointer. (translate_pass): Define new MAXTRYLOCK, TRYLOCKDELAY, MAXERRORS, MAXSKIPPED parameters. * tapset/logging.stp (error): Don't stp_error, just set context state. * stap.1.in, stapfuncs.5.in: Document soft errors. * elaborate.h: Corresponding changes. 2006-01-03 Frank Ch. Eigler <fche@redhat.com> * io.c (_stp_softerror): New function. 2006-01-03 Frank Ch. Eigler <fche@redhat.com> * systemtap.base/timers.exp: Extend the test run duration. Accept skipped probe warnings at shutdown.
* 2005-11-30 Martin Hunt <hunt@redhat.com>hunt2005-11-301-1/+1
| | | | | * io.c (_stp_exit): To prevent any possible interactions with the probed function, just set a flag here.
* 2005-10-31 Martin Hunt <hunt@redhat.com>hunt2005-10-311-1/+2
| | | | * ALL: Cleanup copyrights.
* 2005-09-12 Martin Hunt <hunt@redhat.com>hunt2005-09-121-2/+2
| | | | | * io.c (ERR_STRING): Remove ansi codes. (WARN_STRING): Ditto.
* 2005-08-24 Martin Hunt <hunt@redhat.com>hunt2005-08-241-2/+2
| | | | * io.c (_stp_vlog): Send warnings and errors to STP_OOB_DATA.
* 2005-08-19 Martin Hunt <hunt@redhat.com>hunt2005-08-191-7/+7
| | | | | | | | | | * print.c: Change ifdefs to STP_RELAYFS. * runtime.h: Ditto. * io.c (_stp_vlog): Call _stp_write instead of _stp_ctrl_send. * Makefile: Don't build stp-control. * README.doc: Update. * TODO: Update.
* 2005-08-03 Martin Hunt <hunt@redhat.com>hunt2005-08-041-1/+13
| | | | | * io.c (_stp_vlog): Revert previous change for now. * print.c (_stp_print_flush): Ditto.
* Added transport failure messagetrz2005-08-031-4/+0
|
* 2005-08-01 Martin Hunt <hunt@redhat.com>hunt2005-08-011-1/+1
| | | | | | | * io.c (_stp_vlog): Use _stp_pid instead os _stp_tport->pid. * print.c (_stp_print_flush): Don't need _stp_tport. *runtime.h (probe_start): Just call _stp_transport_init(). (probe_exit): Just call _stp_transport_close().
* 2005-07-20 Martin Hunt <hunt@redhat.com>hunt2005-07-201-4/+2
| | | | | * io.c (_stp_vlog): Don't count transport failures for these messages.
* 2005-07-08 Martin Hunt <hunt@redhat.com>hunt2005-07-081-2/+7
| | | | | | * print.c (_stp_print_flush): Rename "t" to "_stp_tport". * io.c (_stp_vlog): Ditto.
* 2005-07-01 Martin Hunt <hunt@redhat.com>hunt2005-07-011-3/+3
| | | | | | | * string.c (_stp_string_init): CAll stp_error() on bad init. * list.c (_stp_list_clear): Call _stp_warn().
* 2005-07-01 Martin Hunt <hunt@redhat.com>hunt2005-07-011-16/+110
| | | | | | | | | | | | * alloc.c (_stp_alloc): Call _stp_error(). (_stp_valloc): Ditto. * io.c (_stp_warn): New function. (_stp_exit): New function. (_stp_error): New function. (_stp_dbug): New function. * runtime.h (dbug): Call _stp_dbug() if DEBUG is defined.
* 2005-06-18 Martin Hunt <hunt@redhat.com>hunt2005-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * counter.c: New file. Counter aggregations. * stat.c: New file. Stat aggregations. * stat.h: Header file for stats. * map-int.c: New file. Support for int64 values. * map-stat.c: New file. Support for stat values. * map-str.c: New file. Support for string values. * map-values.c: Now just includes the necessary map-*.c files. * stat-common.c: New file. Stats stuff common to Stats and maps containing stats. * Doxyfile: Bumped version to 0.6. * README: Renamed README.doc and reorganized.
* Rewritten maps and other updated files.hunt2005-05-171-2/+4
|
* updated to use new transporttrz2005-05-061-71/+3
|
* *** empty log message ***hunt2005-04-071-7/+16
|
* Update to use relayfs.hunt2005-04-071-30/+65
|
* *** empty log message ***hunt2005-03-291-89/+32
|
* *** empty log message ***hunt2005-03-221-1/+41
|
* *** empty log message ***hunt2005-03-211-0/+64
|
* Initial runtime checkin.hunt2005-03-091-0/+19