mem-events.h 970 字节
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
};

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 已提交
21
extern unsigned int perf_mem_events__loads_ldlat;
22

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

26
char *perf_mem_events__name(int i);
27 28

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

J
Jiri Olsa 已提交
34 35
int perf_script__meminfo_scnprintf(char *bf, size_t size, struct mem_info *mem_info);

36
#endif /* __PERF_MEM_EVENTS_H */