Blame view

kernel/linux-imx6_3.14.28/tools/perf/util/stat.h 470 Bytes
6b13f685e   김민수   BSP 최초 추가
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  #ifndef __PERF_STATS_H
  #define __PERF_STATS_H
  
  #include "types.h"
  
  struct stats
  {
  	double n, mean, M2;
  	u64 max, min;
  };
  
  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);
  
  static inline void init_stats(struct stats *stats)
  {
  	stats->n    = 0.0;
  	stats->mean = 0.0;
  	stats->M2   = 0.0;
  	stats->min  = (u64) -1;
  	stats->max  = 0;
  }
  #endif