diff options
author | Stan Cox <scox@redhat.com> | 2009-06-19 14:06:52 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-06-19 14:06:52 -0400 |
commit | d138d3d71a1685c53cc5c2b72ed8ae64d3e012d2 (patch) | |
tree | 966ff2622c07fb84513b487482a1a1f46bae5dfc /runtime/print_old.c | |
parent | 45148f5b5e371ff852dbbb08d83c5e87932b372e (diff) | |
parent | eba61c56888482553551a16ec651444a583522e0 (diff) | |
download | systemtap-steved-d138d3d71a1685c53cc5c2b72ed8ae64d3e012d2.tar.gz systemtap-steved-d138d3d71a1685c53cc5c2b72ed8ae64d3e012d2.tar.xz systemtap-steved-d138d3d71a1685c53cc5c2b72ed8ae64d3e012d2.zip |
Merge branch 'master' of ssh://sourceware.org/git/systemtap
Diffstat (limited to 'runtime/print_old.c')
-rw-r--r-- | runtime/print_old.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/runtime/print_old.c b/runtime/print_old.c deleted file mode 100644 index 5c117e5f..00000000 --- a/runtime/print_old.c +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- linux-c -*- - * Print Flush Function - * Copyright (C) 2007 Red Hat Inc. - * - * This file is part of systemtap, and is free software. You can - * redistribute it and/or modify it under the terms of the GNU General - * Public License (GPL); either version 2, or (at your option) any - * later version. - */ - -/** Send the print buffer to the transport now. - * Output accumulates in the print buffer until it - * is filled, or this is called. This MUST be called before returning - * from a probe or accumulated output in the print buffer will be lost. - * - * @note Preemption must be disabled to use this. - */ - -void EXPORT_FN(stp_print_flush) (_stp_pbuf *pb) -{ - uint32_t len = pb->len; - - /* check to see if there is anything in the buffer */ - if (likely (len == 0)) - return; - - pb->len = 0; - -#ifdef STP_BULKMODE - { -#ifdef NO_PERCPU_HEADERS - void *buf = relay_reserve(_stp_utt->rchan, len); - if (likely(buf)) - memcpy(buf, pb->buf, len); - else - atomic_inc (&_stp_transport_failures); -#else - void *buf = relay_reserve(_stp_utt->rchan, - sizeof(struct _stp_trace) + len); - if (likely(buf)) { - struct _stp_trace t = { .sequence = _stp_seq_inc(), - .pdu_len = len}; - memcpy(buf, &t, sizeof(t)); // prevent unaligned access - memcpy(buf + sizeof(t), pb->buf, len); - } else - atomic_inc (&_stp_transport_failures); -#endif - } -#else - { - if (unlikely(_stp_ctl_write(STP_REALTIME_DATA, pb->buf, len) <= 0)) - atomic_inc (&_stp_transport_failures); - } -#endif /* STP_BULKMODE */ -} |