blob: 7f69bf9d789da77cecd13e432874ca6e689e2a8a [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];
Jiri Olsab0d745b2016-06-14 20:19:11 +020021extern unsigned int perf_mem_events__loads_ldlat;
Jiri Olsaacbe6132016-02-15 09:34:34 +010022
Jiri Olsace1e22b2016-02-15 09:34:35 +010023int perf_mem_events__parse(const char *str);
Jiri Olsa54fbad52016-02-24 09:46:42 +010024int perf_mem_events__init(void);
Jiri Olsace1e22b2016-02-15 09:34:35 +010025
Jiri Olsa2ba7ac52016-02-24 09:46:43 +010026char *perf_mem_events__name(int i);
Jiri Olsa0c877d72016-02-24 09:46:46 +010027
28struct mem_info;
Jiri Olsab1a5fbea2016-02-24 09:46:50 +010029int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa96907562016-02-24 09:46:51 +010030int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa149d7502016-02-24 09:46:52 +010031int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa8b0819c2016-02-24 09:46:53 +010032int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
Jiri Olsa69a77272016-02-24 09:46:49 +010033
Jiri Olsac19ac912016-02-24 09:46:54 +010034int perf_script__meminfo_scnprintf(char *bf, size_t size, struct mem_info *mem_info);
35
Jiri Olsaacbe6132016-02-15 09:34:34 +010036#endif /* __PERF_MEM_EVENTS_H */