Files
linux/tools/perf/util/stat.h
T
Xiao Guangrong 0007eceace perf stat: Move stats related code to util/stat.c
Then, the code can be shared between kvm events and perf stat.

Signed-off-by: Xiao Guangrong <[email protected]>
[ Dong Hao <[email protected]>: rebase it on acme's git tree ]
Signed-off-by: Dong Hao <[email protected]>
Cc: Avi Kivity <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: [email protected]
Cc: Marcelo Tosatti <[email protected]>
Cc: Runzhen Wang <[email protected]>
Cc: Xiao Guangrong <[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2012-09-17 13:10:03 -03:00

17 lines
297 B
C

#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