Jiri Olsa | 4acf614 | 2018-03-09 11:14:35 +0100 | [diff] [blame] | 1 | #ifndef __MEM2NODE_H |
| 2 | #define __MEM2NODE_H |
| 3 | |
| 4 | #include <linux/rbtree.h> |
Arnaldo Carvalho de Melo | b6b5574 | 2019-08-29 17:10:59 -0300 | [diff] [blame] | 5 | #include <linux/types.h> |
Jiri Olsa | 4acf614 | 2018-03-09 11:14:35 +0100 | [diff] [blame] | 6 | |
Arnaldo Carvalho de Melo | b6b5574 | 2019-08-29 17:10:59 -0300 | [diff] [blame] | 7 | struct perf_env; |
Jiri Olsa | 4acf614 | 2018-03-09 11:14:35 +0100 | [diff] [blame] | 8 | struct phys_entry; |
| 9 | |
| 10 | struct mem2node { |
| 11 | struct rb_root root; |
| 12 | struct phys_entry *entries; |
| 13 | int cnt; |
| 14 | }; |
| 15 | |
| 16 | int mem2node__init(struct mem2node *map, struct perf_env *env); |
| 17 | void mem2node__exit(struct mem2node *map); |
| 18 | int mem2node__node(struct mem2node *map, u64 addr); |
| 19 | |
| 20 | #endif /* __MEM2NODE_H */ |