aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/stat.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-09-19 16:59:01 +0200
committerIngo Molnar <mingo@kernel.org>2012-09-19 16:59:01 +0200
commitbea8f35421628266658c14ea990d18b0969c4c0b (patch)
tree46c5d4616a003011a1237ed8d31592a662cf9720 /tools/perf/util/stat.h
parent26f45274afd938d82463816a12ec67448513294a (diff)
parent7ae92e744e3fb389afb1e24920ecda331d360c61 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: * Fix handling of unresolved samples when --symbols is used in 'report', from Feng Tang. * Add --symbols to 'script', similar to the one in 'report', from Feng Tang. * Add union member access support to 'probe', from Hyeoncheol Lee. * Make 'archive' work on Android, tweaking some of the utility parameters used (tar, rm), from Irina Tirdea. * Fixups to die() removal, from Namhyung Kim. * Render fixes for the TUI, from Namhyung Kim. * Don't enable annotation in non symbolic view, from Namhyung Kim. * Fix pipe mode in 'report', from Namhyung Kim. * Move related stats code from stat to util/, will be used by the 'stat' kvm tool, from Xiao Guangrong. * Add cpumask for uncore pmu, use it in 'stat', from Yan, Zheng. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/stat.h')
-rw-r--r--tools/perf/util/stat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
new file mode 100644
index 000000000000..588367c3c767
--- /dev/null
+++ b/tools/perf/util/stat.h
@@ -0,0 +1,16 @@
+#ifndef __PERF_STATS_H
+#define __PERF_STATS_H
+
+#include "types.h"
+
+struct stats
+{
+ double n, mean, M2;
+};
+
+void update_stats(struct stats *stats, u64 val);
+double avg_stats(struct stats *stats);
+double stddev_stats(struct stats *stats);
+double rel_stddev_stats(double stddev, double avg);
+
+#endif