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]; |
| 21 | |
Jiri Olsa | ce1e22b | 2016-02-15 09:34:35 +0100 | [diff] [blame] | 22 | int perf_mem_events__parse(const char *str); |
Jiri Olsa | 54fbad5 | 2016-02-24 09:46:42 +0100 | [diff] [blame] | 23 | int perf_mem_events__init(void); |
Jiri Olsa | ce1e22b | 2016-02-15 09:34:35 +0100 | [diff] [blame] | 24 | |
Jiri Olsa | 2ba7ac5 | 2016-02-24 09:46:43 +0100 | [diff] [blame] | 25 | char *perf_mem_events__name(int i); |
Jiri Olsa | 0c877d7 | 2016-02-24 09:46:46 +0100 | [diff] [blame] | 26 | |
| 27 | struct mem_info; |
Jiri Olsa | b1a5fbea | 2016-02-24 09:46:50 +0100 | [diff] [blame^] | 28 | int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 071e9a1 | 2016-02-24 09:46:47 +0100 | [diff] [blame] | 29 | void perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 2c07af1 | 2016-02-24 09:46:48 +0100 | [diff] [blame] | 30 | void perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
Jiri Olsa | 69a7727 | 2016-02-24 09:46:49 +0100 | [diff] [blame] | 31 | void perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info); |
| 32 | |
Jiri Olsa | acbe613 | 2016-02-15 09:34:34 +0100 | [diff] [blame] | 33 | #endif /* __PERF_MEM_EVENTS_H */ |