From d5d5ee898ced4664141283793a142b992230d2c4 Mon Sep 17 00:00:00 2001 From: trz Date: Wed, 3 Aug 2005 21:12:29 +0000 Subject: Added transport failure message --- runtime/print.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/print.c') diff --git a/runtime/print.c b/runtime/print.c index f340a3a1..d262c9ed 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -46,8 +46,11 @@ void _stp_print_flush (void) return; ret =_stp_transport_write(buf, len + 1); - if (unlikely(ret < 0)) + if (unlikely(ret < 0)) { + if (!atomic_read(&_stp_transport_failures)) + _stp_warn("Transport failure - try using a larger buffer size\n"); atomic_inc (&_stp_transport_failures); + } _stp_pbuf_len[cpu] = 0; *buf = 0; @@ -86,8 +89,11 @@ void _stp_print_flush (void) scnprintf (buf, TIMESTAMP_SIZE, "%10d", seq); buf[TIMESTAMP_SIZE - 1] = ' '; ret = _stp_transport_write(buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 1); - if (unlikely(ret < 0)) + if (unlikely(ret < 0)) { + if (!atomic_read(&_stp_transport_failures)) + _stp_warn("Transport failure - try using a larger buffer size\n"); atomic_inc (&_stp_transport_failures); + } _stp_pbuf_len[cpu] = 0; *ptr = 0; -- cgit