2016-02-15 16:34:34 +08:00
|
|
|
#ifndef __PERF_MEM_EVENTS_H
|
|
|
|
#define __PERF_MEM_EVENTS_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
struct perf_mem_event {
|
|
|
|
bool record;
|
2016-02-24 16:46:42 +08:00
|
|
|
bool supported;
|
2016-02-15 16:34:35 +08:00
|
|
|
const char *tag;
|
2016-02-15 16:34:34 +08:00
|
|
|
const char *name;
|
2016-02-24 16:46:42 +08:00
|
|
|
const char *sysfs_name;
|
2016-02-15 16:34:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
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];
|
|
|
|
|
2016-02-15 16:34:35 +08:00
|
|
|
int perf_mem_events__parse(const char *str);
|
2016-02-24 16:46:42 +08:00
|
|
|
int perf_mem_events__init(void);
|
2016-02-15 16:34:35 +08:00
|
|
|
|
2016-02-24 16:46:43 +08:00
|
|
|
char *perf_mem_events__name(int i);
|
2016-02-24 16:46:46 +08:00
|
|
|
|
|
|
|
struct mem_info;
|
2016-02-24 16:46:50 +08:00
|
|
|
int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
|
2016-02-24 16:46:51 +08:00
|
|
|
int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
|
2016-02-24 16:46:52 +08:00
|
|
|
int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
|
2016-02-24 16:46:53 +08:00
|
|
|
int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
|
2016-02-24 16:46:49 +08:00
|
|
|
|
2016-02-24 16:46:54 +08:00
|
|
|
int perf_script__meminfo_scnprintf(char *bf, size_t size, struct mem_info *mem_info);
|
|
|
|
|
2016-02-15 16:34:34 +08:00
|
|
|
#endif /* __PERF_MEM_EVENTS_H */
|