blob: 954020f429d241270d8278a6e7bf91d78ace4ec6 (
plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef __IDLESTAT_H
#define __IDLESTAT_H
#define BUFSIZE 256
#define MAXCSTATE 8
#define MAX(A, B) (A > B ? A : B)
#define MIN(A, B) (A < B ? A : B)
#define AVG(A, B, I) ((A) + ((B - A) / (I)))
struct cpuidle_data {
double begin;
double end;
double duration;
};
struct cpuidle_cstate {
struct cpuidle_data *data;
int nrdata;
double avg_time;
double max_time;
double min_time;
double duration;
};
struct cpuidle_cstates {
struct cpuidle_cstate cstate[MAXCSTATE];
int last_cstate;
int cstate_max;
};
struct cpuidle_datas {
struct cpuidle_cstates *cstates;
int nrcpus;
};
#endif
|