blob: 5d6d93066a6e80e492634d6add9ad85f153211e6 [file] [log] [blame]
Jiri Olsaacbe6132016-02-15 09:34:34 +01001#ifndef __PERF_MEM_EVENTS_H
2#define __PERF_MEM_EVENTS_H
3
4#include <stdbool.h>
5
6struct perf_mem_event {
7 bool record;
Jiri Olsa54fbad52016-02-24 09:46:42 +01008 bool supported;
Jiri Olsace1e22b2016-02-15 09:34:35 +01009 const char *tag;
Jiri Olsaacbe6132016-02-15 09:34:34 +010010 const char *name;
Jiri Olsa54fbad52016-02-24 09:46:42 +010011 const char *sysfs_name;
Jiri Olsaacbe6132016-02-15 09:34:34 +010012};
13
14enum {
15 PERF_MEM_EVENTS__LOAD,
16 PERF_MEM_EVENTS__STORE,
17 PERF_MEM_EVENTS__MAX,
18};
19
20extern struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX];
21
Jiri Olsace1e22b2016-02-15 09:34:35 +010022int perf_mem_events__parse(const char *str);
Jiri Olsa54fbad52016-02-24 09:46:42 +010023int perf_mem_events__init(void);
Jiri Olsace1e22b2016-02-15 09:34:35 +010024
Jiri Olsa2ba7ac52016-02-24 09:46:43 +010025char *perf_mem_events__name(int i);
Jiri Olsa0c877d72016-02-24 09:46:46 +010026
27struct mem_info;
Jiri Olsab1a5fbea2016-02-24 09:46:50 +010028int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa96907562016-02-24 09:46:51 +010029int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa149d7502016-02-24 09:46:52 +010030int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa8b0819c2016-02-24 09:46:53 +010031int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa69a77272016-02-24 09:46:49 +010032
Jiri Olsac19ac912016-02-24 09:46:54 +010033int perf_script__meminfo_scnprintf(char *bf, size_t size, struct mem_info *mem_info);
34
Jiri Olsaacbe6132016-02-15 09:34:34 +010035#endif /* __PERF_MEM_EVENTS_H */