summaryrefslogtreecommitdiffstats
path: root/runtime/print.c
diff options
context:
space:
mode:
authortrz <trz>2005-08-03 21:12:29 +0000
committertrz <trz>2005-08-03 21:12:29 +0000
commitd5d5ee898ced4664141283793a142b992230d2c4 (patch)
tree7e36b9251fea533a08aed2aad629817df19441a0 /runtime/print.c
parent2205d1152e6e9ff34908bf83c3964fb5883adff1 (diff)
downloadsystemtap-steved-d5d5ee898ced4664141283793a142b992230d2c4.tar.gz
systemtap-steved-d5d5ee898ced4664141283793a142b992230d2c4.tar.xz
systemtap-steved-d5d5ee898ced4664141283793a142b992230d2c4.zip
Added transport failure message
Diffstat (limited to 'runtime/print.c')
-rw-r--r--runtime/print.c10
1 files changed, 8 insertions, 2 deletions
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;