Lines Matching refs:map

19 DECLARE_RC_STRUCT(map) {  in DECLARE_RC_STRUCT()  argument
29 u64 (*map_ip)(const struct map *, u64); in DECLARE_RC_STRUCT()
31 u64 (*unmap_ip)(const struct map *, u64); in DECLARE_RC_STRUCT()
40 struct kmap *__map__kmap(struct map *map);
41 struct kmap *map__kmap(struct map *map);
42 struct maps *map__kmaps(struct map *map);
45 u64 map__dso_map_ip(const struct map *map, u64 ip);
47 u64 map__dso_unmap_ip(const struct map *map, u64 ip);
49 u64 identity__map_ip(const struct map *map __maybe_unused, u64 ip);
51 static inline struct dso *map__dso(const struct map *map) in map__dso() argument
53 return RC_CHK_ACCESS(map)->dso; in map__dso()
56 static inline u64 map__map_ip(const struct map *map, u64 ip) in map__map_ip() argument
58 return RC_CHK_ACCESS(map)->map_ip(map, ip); in map__map_ip()
61 static inline u64 map__unmap_ip(const struct map *map, u64 ip) in map__unmap_ip() argument
63 return RC_CHK_ACCESS(map)->unmap_ip(map, ip); in map__unmap_ip()
66 static inline void *map__map_ip_ptr(struct map *map) in map__map_ip_ptr() argument
68 return RC_CHK_ACCESS(map)->map_ip; in map__map_ip_ptr()
71 static inline void* map__unmap_ip_ptr(struct map *map) in map__unmap_ip_ptr() argument
73 return RC_CHK_ACCESS(map)->unmap_ip; in map__unmap_ip_ptr()
76 static inline u64 map__start(const struct map *map) in map__start() argument
78 return RC_CHK_ACCESS(map)->start; in map__start()
81 static inline u64 map__end(const struct map *map) in map__end() argument
83 return RC_CHK_ACCESS(map)->end; in map__end()
86 static inline u64 map__pgoff(const struct map *map) in map__pgoff() argument
88 return RC_CHK_ACCESS(map)->pgoff; in map__pgoff()
91 static inline u64 map__reloc(const struct map *map) in map__reloc() argument
93 return RC_CHK_ACCESS(map)->reloc; in map__reloc()
96 static inline u32 map__flags(const struct map *map) in map__flags() argument
98 return RC_CHK_ACCESS(map)->flags; in map__flags()
101 static inline u32 map__prot(const struct map *map) in map__prot() argument
103 return RC_CHK_ACCESS(map)->prot; in map__prot()
106 static inline bool map__priv(const struct map *map) in map__priv() argument
108 return RC_CHK_ACCESS(map)->priv; in map__priv()
111 static inline refcount_t *map__refcnt(struct map *map) in map__refcnt() argument
113 return &RC_CHK_ACCESS(map)->refcnt; in map__refcnt()
116 static inline bool map__erange_warned(struct map *map) in map__erange_warned() argument
118 return RC_CHK_ACCESS(map)->erange_warned; in map__erange_warned()
121 static inline size_t map__size(const struct map *map) in map__size() argument
123 return map__end(map) - map__start(map); in map__size()
127 u64 map__rip_2objdump(struct map *map, u64 rip);
130 u64 map__objdump_2mem(struct map *map, u64 ip);
142 #define map__for_each_symbol(map, pos, n) \ argument
143 dso__for_each_symbol(map__dso(map), pos, n)
153 #define __map__for_each_symbol_by_name(map, sym_name, pos, idx) \ argument
154 for (pos = map__find_symbol_by_name_idx(map, sym_name, &idx); \
158 pos = dso__next_symbol_by_name(map__dso(map), &idx))
160 #define map__for_each_symbol_by_name(map, sym_name, pos, idx) \ argument
161 __map__for_each_symbol_by_name(map, sym_name, (pos), idx)
163 void map__init(struct map *map,
169 struct map *map__new(struct machine *machine, u64 start, u64 len,
172 struct map *map__new2(u64 start, struct dso *dso);
173 void map__delete(struct map *map);
174 struct map *map__clone(struct map *map);
176 static inline struct map *map__get(struct map *map) in map__get() argument
178 struct map *result; in map__get()
180 if (RC_CHK_GET(result, map)) in map__get()
181 refcount_inc(map__refcnt(map)); in map__get()
186 void map__put(struct map *map);
188 static inline void __map__zput(struct map **map) in __map__zput() argument
190 map__put(*map); in __map__zput()
191 *map = NULL; in __map__zput()
194 #define map__zput(map) __map__zput(&map) argument
196 size_t map__fprintf(struct map *map, FILE *fp);
197 size_t map__fprintf_dsoname(struct map *map, FILE *fp);
198 size_t map__fprintf_dsoname_dsoff(struct map *map, bool print_off, u64 addr, FILE *fp);
199 char *map__srcline(struct map *map, u64 addr, struct symbol *sym);
200 int map__fprintf_srcline(struct map *map, u64 addr, const char *prefix,
203 int map__load(struct map *map);
204 struct symbol *map__find_symbol(struct map *map, u64 addr);
205 struct symbol *map__find_symbol_by_name(struct map *map, const char *name);
206 struct symbol *map__find_symbol_by_name_idx(struct map *map, const char *name, size_t *idx);
207 void map__fixup_start(struct map *map);
208 void map__fixup_end(struct map *map);
210 int map__set_kallsyms_ref_reloc_sym(struct map *map, const char *symbol_name,
213 bool __map__is_kernel(const struct map *map);
214 bool __map__is_extra_kernel_map(const struct map *map);
215 bool __map__is_bpf_prog(const struct map *map);
216 bool __map__is_bpf_image(const struct map *map);
217 bool __map__is_ool(const struct map *map);
219 static inline bool __map__is_kmodule(const struct map *map) in __map__is_kmodule() argument
221 return !__map__is_kernel(map) && !__map__is_extra_kernel_map(map) && in __map__is_kmodule()
222 !__map__is_bpf_prog(map) && !__map__is_ool(map) && in __map__is_kmodule()
223 !__map__is_bpf_image(map); in __map__is_kmodule()
226 bool map__has_symbols(const struct map *map);
228 bool map__contains_symbol(const struct map *map, const struct symbol *sym);
257 static inline void map__set_start(struct map *map, u64 start) in map__set_start() argument
259 RC_CHK_ACCESS(map)->start = start; in map__set_start()
262 static inline void map__set_end(struct map *map, u64 end) in map__set_end() argument
264 RC_CHK_ACCESS(map)->end = end; in map__set_end()
267 static inline void map__set_pgoff(struct map *map, u64 pgoff) in map__set_pgoff() argument
269 RC_CHK_ACCESS(map)->pgoff = pgoff; in map__set_pgoff()
272 static inline void map__add_pgoff(struct map *map, u64 inc) in map__add_pgoff() argument
274 RC_CHK_ACCESS(map)->pgoff += inc; in map__add_pgoff()
277 static inline void map__set_reloc(struct map *map, u64 reloc) in map__set_reloc() argument
279 RC_CHK_ACCESS(map)->reloc = reloc; in map__set_reloc()
282 static inline void map__set_priv(struct map *map, int priv) in map__set_priv() argument
284 RC_CHK_ACCESS(map)->priv = priv; in map__set_priv()
287 static inline void map__set_erange_warned(struct map *map, bool erange_warned) in map__set_erange_warned() argument
289 RC_CHK_ACCESS(map)->erange_warned = erange_warned; in map__set_erange_warned()
292 static inline void map__set_dso(struct map *map, struct dso *dso) in map__set_dso() argument
294 RC_CHK_ACCESS(map)->dso = dso; in map__set_dso()
297 static inline void map__set_map_ip(struct map *map, u64 (*map_ip)(const struct map *map, u64 ip)) in map__set_map_ip() argument
299 RC_CHK_ACCESS(map)->map_ip = map_ip; in map__set_map_ip()
302 static inline void map__set_unmap_ip(struct map *map, u64 (*unmap_ip)(const struct map *map, u64 ri… in map__set_unmap_ip() argument
304 RC_CHK_ACCESS(map)->unmap_ip = unmap_ip; in map__set_unmap_ip()