diff options
Diffstat (limited to 'runtime/stat.c')
-rw-r--r-- | runtime/stat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/stat.c b/runtime/stat.c index c759a043..29dcef9b 100644 --- a/runtime/stat.c +++ b/runtime/stat.c @@ -1,6 +1,7 @@ /* -*- linux-c -*- * Statistics Aggregation * Copyright (C) 2005 Red Hat Inc. + * Copyright (C) 2006 Intel Corporation * * 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 @@ -270,6 +271,22 @@ void _stp_stat_print (Stat st, char *fmt, int clear) __stp_stat_print (fmt, st, agg, 0); STAT_UNLOCK(agg); } + +/** Clear Stats. + * Clears the Stats. + * + * @param st Stat + */ +void _stp_stat_clear (Stat st) +{ + int i; + for_each_cpu(i) { + stat *sd = per_cpu_ptr (st->sd, i); + STAT_LOCK(sd); + _stp_stat_clear_data (st, sd); + STAT_UNLOCK(sd); + } +} /** @} */ #endif /* _STAT_C_ */ |