mem-events.h 833 字节
Newer Older
1 2 3 4 5 6 7
#ifndef __PERF_MEM_EVENTS_H
#define __PERF_MEM_EVENTS_H

#include <stdbool.h>

struct perf_mem_event {
	bool		record;
8
	bool		supported;
J
Jiri Olsa 已提交
9
	const char	*tag;
10
	const char	*name;
11
	const char	*sysfs_name;
12 13 14 15 16 17 18 19 20 21
};

enum {
	PERF_MEM_EVENTS__LOAD,
	PERF_MEM_EVENTS__STORE,
	PERF_MEM_EVENTS__MAX,
};

extern struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX];

J
Jiri Olsa 已提交
22
int perf_mem_events__parse(const char *str);
23
int perf_mem_events__init(void);
J
Jiri Olsa 已提交
24

25
char *perf_mem_events__name(int i);
26 27

struct mem_info;
28
int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
29
int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
30
int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
31
int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
32

33
#endif /* __PERF_MEM_EVENTS_H */