From 9a604face6354d63a3948a08e85613168a9dfb88 Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 3 Jan 2006 22:33:53 +0000 Subject: 2006-01-03 Frank Ch. Eigler 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 * io.c (_stp_softerror): New function. 2006-01-03 Frank Ch. Eigler * systemtap.base/timers.exp: Extend the test run duration. Accept skipped probe warnings at shutdown. --- runtime/io.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'runtime/io.c') diff --git a/runtime/io.c b/runtime/io.c index cf178951..b72590f3 100644 --- a/runtime/io.c +++ b/runtime/io.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * I/O for printing warnings, errors and debug messages - * Copyright (C) 2005 Red Hat Inc. + * Copyright (C) 2005, 2006 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -138,6 +138,25 @@ void _stp_error (const char *fmt, ...) _stp_exit(); } + +/** Prints error message. + * This function sends an error message immediately to stpd. It + * will also be sent over the bulk transport (relayfs) if it is + * being used. If the last character is not a newline, then one + * is added. + * + * @param fmt A variable number of args. + * @sa _stp_error + */ +void _stp_softerror (const char *fmt, ...) +{ + va_list args; + va_start(args, fmt); + _stp_vlog (ERROR, NULL, 0, fmt, args); + va_end(args); +} + + static void _stp_dbug (char *func, int line, const char *fmt, ...) { va_list args; -- cgit