Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 1 | #ifndef __PERF_MEM_EVENTS_H |
| 2 | #define __PERF_MEM_EVENTS_H |
| 3 | |
| 4 | #include <stdbool.h> |
| 5 | |
| 6 | struct perf_mem_event { |
| 7 | bool record; |
Jiri Olsa | 54fbad5 | 2016-02-24 09:46:42 +0100 | [diff] [blame] | 8 | bool supported; |
Jiri Olsa | ce1e22b | 2016-02-15 09:34:35 +0100 | [diff] [blame] | 9 | const char *tag; |
Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 10 | const char *name; |
Jiri Olsa | 54fbad5 | 2016-02-24 09:46:42 +0100 | [diff] [blame] | 11 | const char *sysfs_name; |
Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 12 | }; |
| 13 | |
| 14 | enum { |
| 15 | PERF_MEM_EVENTS__LOAD, |
| 16 | PERF_MEM_EVENTS__STORE, |
| 17 | PERF_MEM_EVENTS__MAX, |
| 18 | }; |
| 19 | |
| 20 | extern struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX]; |
Jiri Olsa | b0d745b | 2016-06-14 20:19:11 +0200 | [diff] [blame] | 21 | extern unsigned int perf_mem_events__loads_ldlat; |
Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 22 | |
Jiri Olsa | ce1e22b | 2016-02-15 09:34:35 +0100 | [diff] [blame] | 23 | int perf_mem_events__parse(const char *str); |
Jiri Olsa | 54fbad5 | 2016-02-24 09:46:42 +0100 | [diff] [blame] | 24 | int perf_mem_events__init(void); |
Jiri Olsa | ce1e22b | 2016-02-15 09:34:35 +0100 | [diff] [blame] | 25 | |
Jiri Olsa | 2ba7ac5 | 2016-02-24 09:46:43 +0100 | [diff] [blame] | 26 | char *perf_mem_events__name(int i); |
Jiri Olsa | 0c877d7 | 2016-02-24 09:46:46 +0100 | [diff] [blame] | 27 | |
| 28 | struct mem_info; |
Jiri Olsa | b1a5fbea | 2016-02-24 09:46:50 +0100 | [diff] [blame] | 29 | int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 9690756 | 2016-02-24 09:46:51 +0100 | [diff] [blame] | 30 | int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 149d750 | 2016-02-24 09:46:52 +0100 | [diff] [blame] | 31 | int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 8b0819c | 2016-02-24 09:46:53 +0100 | [diff] [blame] | 32 | int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 69a7727 | 2016-02-24 09:46:49 +0100 | [diff] [blame] | 33 | |
Jiri Olsa | c19ac91 | 2016-02-24 09:46:54 +0100 | [diff] [blame] | 34 | int perf_script__meminfo_scnprintf(char *bf, size_t size, struct mem_info *mem_info); |
| 35 | |
Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 36 | #endif /* __PERF_MEM_EVENTS_H */ |