diff options
Diffstat (limited to 'runtime/print.c')
-rw-r--r-- | runtime/print.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/runtime/print.c b/runtime/print.c index 54919876..2c84d3c9 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Print Functions - * Copyright (C) 2007-2008 Red Hat Inc. + * Copyright (C) 2007-2009 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 @@ -41,7 +41,7 @@ typedef struct __stp_pbuf { static void *Stp_pbuf = NULL; -/** private buffer for _stp_log() */ +/** private buffer for _stp_vlog() */ #define STP_LOG_BUF_LEN 256 typedef char _stp_lbuf[STP_LOG_BUF_LEN]; @@ -233,7 +233,6 @@ static void _stp_print (const char *str) static void _stp_print_char (const char c) { - char *buf; _stp_pbuf *pb = per_cpu_ptr(Stp_pbuf, smp_processor_id()); int size = STP_BUFFER_SIZE - pb->len; if (unlikely(1 >= size)) @@ -243,37 +242,6 @@ static void _stp_print_char (const char c) pb->len ++; } -/* This function is used when printing maps or stats. */ -/* Probably belongs elsewhere, but is here for now. */ -/* It takes a format specification like those used for */ -/* printing maps and stats. It prints chars until it sees */ -/* a special format char (beginning with '%'. Then it */ -/* returns a pointer to that. */ -static char *next_fmt(char *fmt, int *num) -{ - char *f = fmt; - int in_fmt = 0; - *num = 0; - while (*f) { - if (in_fmt) { - if (*f == '%') { - _stp_print_char('%'); - in_fmt = 0; - } else if (*f > '0' && *f <= '9') { - *num = *f - '0'; - f++; - return f; - } else - return f; - } else if (*f == '%') - in_fmt = 1; - else - _stp_print_char(*f); - f++; - } - return f; -} - static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes) { #ifdef DEBUG_MEM |