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