perf: Do the big rename: Performance Counters -> Performance Events
[deliverable/linux.git] / tools / perf / util / header.h
CommitLineData
7c6a1c65
PZ
1#ifndef _PERF_HEADER_H
2#define _PERF_HEADER_H
3
cdd6c482 4#include "../../../include/linux/perf_event.h"
7c6a1c65
PZ
5#include <sys/types.h>
6#include "types.h"
7
8struct perf_header_attr {
cdd6c482 9 struct perf_event_attr attr;
7c6a1c65
PZ
10 int ids, size;
11 u64 *id;
12 off_t id_offset;
13};
14
15struct perf_header {
16 int frozen;
17 int attrs, size;
18 struct perf_header_attr **attr;
dfe5a504 19 s64 attr_offset;
7c6a1c65
PZ
20 u64 data_offset;
21 u64 data_size;
8755a8f2
AV
22 u64 event_offset;
23 u64 event_size;
7c6a1c65
PZ
24};
25
26struct perf_header *perf_header__read(int fd);
27void perf_header__write(struct perf_header *self, int fd);
28
29void perf_header__add_attr(struct perf_header *self,
30 struct perf_header_attr *attr);
31
8755a8f2
AV
32void perf_header__push_event(u64 id, const char *name);
33char *perf_header__find_event(u64 id);
34
35
7c6a1c65 36struct perf_header_attr *
cdd6c482 37perf_header_attr__new(struct perf_event_attr *attr);
7c6a1c65
PZ
38void perf_header_attr__add_id(struct perf_header_attr *self, u64 id);
39
0d3a5c88 40u64 perf_header__sample_type(struct perf_header *header);
cdd6c482 41struct perf_event_attr *
0d3a5c88
FW
42perf_header__find_attr(u64 id, struct perf_header *header);
43
7c6a1c65
PZ
44
45struct perf_header *perf_header__new(void);
46
47#endif /* _PERF_HEADER_H */
This page took 0.038177 seconds and 5 git commands to generate.