diff options
author | trz <trz> | 2005-10-19 14:32:25 +0000 |
---|---|---|
committer | trz <trz> | 2005-10-19 14:32:25 +0000 |
commit | 707cb4bfb6e6e918dba16021ca0ae29671660d68 (patch) | |
tree | 1318d16434563d7fe0b490a4530cc3c26da4bd8c /runtime/print.c | |
parent | 0e1e055939eb528f1d2ec28b47faf6dd12ede0fa (diff) | |
download | systemtap-steved-707cb4bfb6e6e918dba16021ca0ae29671660d68.tar.gz systemtap-steved-707cb4bfb6e6e918dba16021ca0ae29671660d68.tar.xz systemtap-steved-707cb4bfb6e6e918dba16021ca0ae29671660d68.zip |
switch to binary TIMESTAMP
Diffstat (limited to 'runtime/print.c')
-rw-r--r-- | runtime/print.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/print.c b/runtime/print.c index 49040c2d..a66f074e 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -61,7 +61,7 @@ void _stp_print_flush (void) #else /* STP_RELAYFS */ /* size of timestamp, in bytes, including space */ -#define TIMESTAMP_SIZE 11 +#define TIMESTAMP_SIZE (sizeof(int)) #define STP_PRINT_BUF_START (TIMESTAMP_SIZE) /** Size of buffer, not including terminating NULL */ @@ -82,14 +82,12 @@ void _stp_print_flush (void) int cpu = smp_processor_id(); char *buf = &_stp_pbuf[cpu][0]; char *ptr = buf + STP_PRINT_BUF_START; - int ret, seq; + int ret; if (_stp_pbuf_len[cpu] == 0) return; - seq = _stp_seq_inc(); - scnprintf (buf, TIMESTAMP_SIZE, "%10d", seq); - buf[TIMESTAMP_SIZE - 1] = ' '; + *((int *)buf) = _stp_seq_inc(); ret = _stp_transport_write(buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 1); if (unlikely(ret < 0)) { #if 0 |