diff options
author | trz <trz> | 2005-05-06 19:17:35 +0000 |
---|---|---|
committer | trz <trz> | 2005-05-06 19:17:35 +0000 |
commit | b05e5810e0a5a918619acaaa316215023d50705b (patch) | |
tree | a09d7fbada9b2bf3ceb1827a5af23918fb9eb1a6 /runtime/print.c | |
parent | 7aa969cf00075426d30cbce164ccaeb8a1b0a2aa (diff) | |
download | systemtap-steved-b05e5810e0a5a918619acaaa316215023d50705b.tar.gz systemtap-steved-b05e5810e0a5a918619acaaa316215023d50705b.tar.xz systemtap-steved-b05e5810e0a5a918619acaaa316215023d50705b.zip |
updated to use new transport
Diffstat (limited to 'runtime/print.c')
-rw-r--r-- | runtime/print.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/runtime/print.c b/runtime/print.c index bb738d14..b6fd4323 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -23,35 +23,6 @@ static int _stp_pbuf_len[NR_CPUS]; -#ifdef STP_NETLINK_ONLY -#define STP_PRINT_BUF_START 0 -static char _stp_pbuf[NR_CPUS][STP_PRINT_BUF_LEN + 1]; - -void _stp_print_flush (void) -{ - int cpu = smp_processor_id(); - char *buf = &_stp_pbuf[cpu][0]; - int len = _stp_pbuf_len[cpu]; - - if (len == 0) - return; - - if ( app.logging == 0) { - _stp_pbuf_len[cpu] = 0; - return; - } - - /* enforce newline at end */ - if (buf[len - 1] != '\n') { - buf[len++] = '\n'; - buf[len] = '\0'; - } - - send_reply (STP_REALTIME_DATA, buf, len + 1, stpd_pid); - _stp_pbuf_len[cpu] = 0; -} - -#else /* ! STP_NETLINK_ONLY */ /* size of timestamp, in bytes, including space */ #define TIMESTAMP_SIZE 19 #define STP_PRINT_BUF_START (TIMESTAMP_SIZE + 1) @@ -61,7 +32,6 @@ static char _stp_pbuf[NR_CPUS][STP_PRINT_BUF_LEN + STP_PRINT_BUF_START + 1]; * Output accumulates in the print buffer until this is called. * Size is limited by length of print buffer, #STP_PRINT_BUF_LEN. */ - void _stp_print_flush (void) { int cpu = smp_processor_id(); @@ -81,10 +51,9 @@ void _stp_print_flush (void) do_gettimeofday(&tv); scnprintf (buf, TIMESTAMP_SIZE+1, "[%li.%06li] ", tv.tv_sec, tv.tv_usec); buf[TIMESTAMP_SIZE] = ' '; - relayapp_write(buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 2); + _stp_transport_write(t, buf, _stp_pbuf_len[cpu] + TIMESTAMP_SIZE + 2); _stp_pbuf_len[cpu] = 0; } -#endif /* STP_NETLINK_ONLY */ /** Print into the print buffer. * Like printf, except output goes to the print buffer. |