]> sourceware.org Git - systemtap.git/commitdiff
Added transport failure message
authortrz <trz>
Wed, 3 Aug 2005 21:12:29 +0000 (21:12 +0000)
committertrz <trz>
Wed, 3 Aug 2005 21:12:29 +0000 (21:12 +0000)
runtime/ChangeLog
runtime/io.c
runtime/print.c

index 6a7651ba83eec42032f146b32e8a2bd20062cf57..93ba3a61fc20f2bcfee6fec163d8b77f1b3d15f0 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-03  Tom Zanussi  <trz@us.ibm.com>
+
+       * io.c (_stp_vlog): Remove call to _stp_print_flush().
+       * print.c (_stp_print_flush): _stp_warn() on first
+       transport failure.
+
 2005-08-01  Martin Hunt  <hunt@redhat.com>
 
        * io.c (_stp_vlog): Use _stp_pid instead os _stp_tport->pid.
index 1d378472000bba4a931cf69d907d499af3b00442..c4e3cf2cea47a1508c16ced26e9f182bfd14ba46 100644 (file)
@@ -56,10 +56,6 @@ static void _stp_vlog (enum code type, char *func, int line, const char *fmt, va
                buf[num + start] = '\0';
                
                _stp_ctrl_send(STP_REALTIME_DATA, buf, start + num + 1, _stp_pid);
-#ifndef STP_NETLINK_ONLY
-               _stp_string_cat_cstr(_stp_stdout,buf);
-               _stp_print_flush();
-#endif
        }
        put_cpu();
 }
index f340a3a1babcbf9b379cc36050a6586fb4ed7aec..d262c9ed34e21874bf12602f7f63c7e3d6854567 100644 (file)
@@ -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;
This page took 0.033041 seconds and 5 git commands to generate.