summaryrefslogtreecommitdiffstats
path: root/runtime/print.c
diff options
context:
space:
mode:
authortrz <trz>2005-06-21 14:13:01 +0000
committertrz <trz>2005-06-21 14:13:01 +0000
commitaac3ed25e8dc7355b5f28fae2878f644df14ef7d (patch)
treec2d284ccffb7dd9a82b000bd9c7152e5abbf160f /runtime/print.c
parentbd2b1e6816b486d5c85a4693f0b3579df4376ed5 (diff)
downloadsystemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.tar.gz
systemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.tar.xz
systemtap-steved-aac3ed25e8dc7355b5f28fae2878f644df14ef7d.zip
Added merging/sorting of per-cpu data, transport config/selection by probe, etc
Diffstat (limited to 'runtime/print.c')
-rw-r--r--runtime/print.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/print.c b/runtime/print.c
index 3c09e105..72846a24 100644
--- a/runtime/print.c
+++ b/runtime/print.c
@@ -56,8 +56,8 @@ void _stp_print_flush (void)
#else /* ! STP_NETLINK_ONLY */
/* size of timestamp, in bytes, including space */
-#define TIMESTAMP_SIZE 19
-#define STP_PRINT_BUF_START (TIMESTAMP_SIZE + 1)
+#define TIMESTAMP_SIZE 11
+#define STP_PRINT_BUF_START (TIMESTAMP_SIZE)
/** Size of buffer, not including terminating NULL */
#ifndef STP_PRINT_BUF_LEN
@@ -77,15 +77,15 @@ void _stp_print_flush (void)
int cpu = smp_processor_id();
char *buf = &_stp_pbuf[cpu][0];
char *ptr = buf + STP_PRINT_BUF_START;
- struct timeval tv;
+ int seq;
if (_stp_pbuf_len[cpu] == 0)
return;
-
- do_gettimeofday(&tv);
- scnprintf (buf, TIMESTAMP_SIZE+1, "[%li.%06li] ", tv.tv_sec, tv.tv_usec);
- buf[TIMESTAMP_SIZE] = ' ';
- _stp_transport_write(t, buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 2);
+
+ seq = _stp_seq_inc();
+ scnprintf (buf, TIMESTAMP_SIZE, "%10d", seq);
+ buf[TIMESTAMP_SIZE - 1] = ' ';
+ _stp_transport_write(t, buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 1);
_stp_pbuf_len[cpu] = 0;
*ptr = 0;
}