• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/tools/perf/util/

Lines Matching refs:map

8 #include "map.h"
20 void map__init(struct map *self, enum map_type type,
35 struct map *map__new(struct list_head *dsos__list, u64 start, u64 len,
39 struct map *self = malloc(sizeof(*self));
49 snprintf(newfilename, sizeof(newfilename), "/tmp/perf-%d.map", pid);
73 void map__delete(struct map *self)
78 void map__fixup_start(struct map *self)
88 void map__fixup_end(struct map *self)
100 int map__load(struct map *self, symbol_filter_t filter)
149 struct symbol *map__find_symbol(struct map *self, u64 addr,
158 struct symbol *map__find_symbol_by_name(struct map *self, const char *name,
170 struct map *map__clone(struct map *self)
172 struct map *map = malloc(sizeof(*self));
174 if (!map)
177 memcpy(map, self, sizeof(*self));
179 return map;
182 int map__overlap(struct map *l, struct map *r)
185 struct map *t = l;
196 size_t map__fprintf(struct map *self, FILE *fp)
204 * map->dso->adjust_symbols==1 for ET_EXEC-like cases.
206 u64 map__rip_2objdump(struct map *map, u64 rip)
208 u64 addr = map->dso->adjust_symbols ?
209 map->unmap_ip(map, rip) : /* RIP -> IP */
214 u64 map__objdump_2ip(struct map *map, u64 addr)
216 u64 ip = map->dso->adjust_symbols ?
218 map->unmap_ip(map, addr); /* RIP -> IP */
237 struct map *pos = rb_entry(next, struct map, rb_node);
247 struct map *pos, *n;
274 struct map *pos = rb_entry(next, struct map, rb_node);
278 * We may have references to this map, for
289 struct map **mapp,
292 struct map *map = map_groups__find(self, type, addr);
294 if (map != NULL) {
296 *mapp = map;
297 return map__find_symbol(map, map->map_ip(map, addr), filter);
306 struct map **mapp,
312 struct map *pos = rb_entry(nd, struct map, rb_node);
332 struct map *pos = rb_entry(nd, struct map, rb_node);
356 struct map *pos;
386 int map_groups__fixup_overlappings(struct map_groups *self, struct map *map,
389 struct rb_root *root = &self->maps[map->type];
394 struct map *pos = rb_entry(next, struct map, rb_node);
397 if (!map__overlap(pos, map))
402 map__fprintf(map, fp);
409 * overlapped by the new map:
411 if (map->start > pos->start) {
412 struct map *before = map__clone(pos);
419 before->end = map->start - 1;
425 if (map->end < pos->end) {
426 struct map *after = map__clone(pos);
433 after->start = map->end + 1;
443 list_add_tail(&pos->node, &self->removed_maps[map->type]);
459 struct map *map = rb_entry(nd, struct map, rb_node);
460 struct map *new = map__clone(map);
468 static u64 map__reloc_map_ip(struct map *map, u64 ip)
470 return ip + (s64)map->pgoff;
473 static u64 map__reloc_unmap_ip(struct map *map, u64 ip)
475 return ip - (s64)map->pgoff;
478 void map__reloc_vmlinux(struct map *self)
497 void maps__insert(struct rb_root *maps, struct map *map)
501 const u64 ip = map->start;
502 struct map *m;
506 m = rb_entry(parent, struct map, rb_node);
513 rb_link_node(&map->rb_node, parent, p);
514 rb_insert_color(&map->rb_node, maps);
517 void maps__remove(struct rb_root *self, struct map *map)
519 rb_erase(&map->rb_node, self);
522 struct map *maps__find(struct rb_root *maps, u64 ip)
526 struct map *m;
530 m = rb_entry(parent, struct map, rb_node);