diff options
author | 2023-04-19 12:24:12 -0300 | |
---|---|---|
committer | 2023-04-19 12:54:41 -0300 | |
commit | e6a9efcee55f084a5450e4853ecbbaa0b086dcd0 (patch) | |
tree | 1a4adae5742e964e817e7317c297b49b8de6324b /tools/perf/util/maps.c | |
parent | perf map: Add missing conversions to map__refcnt() (diff) | |
download | linux-e6a9efcee55f084a5450e4853ecbbaa0b086dcd0.tar.gz linux-e6a9efcee55f084a5450e4853ecbbaa0b086dcd0.tar.bz2 linux-e6a9efcee55f084a5450e4853ecbbaa0b086dcd0.zip |
perf map: Add set_ methods for map->{start,end,pgoff,pgoff,reloc,erange_warned,dso,map_ip,unmap_ip,priv}
To have a way to intercept usage of the reference counted struct map.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/maps.c')
-rw-r--r-- | tools/perf/util/maps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c index 8a13396acd1a..df2fc8221f3c 100644 --- a/tools/perf/util/maps.c +++ b/tools/perf/util/maps.c @@ -339,7 +339,7 @@ int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp) goto put_map; } - before->end = map__start(map); + map__set_end(before, map__start(map)); err = __maps__insert(maps, before); if (err) { map__put(before); @@ -359,8 +359,8 @@ int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp) goto put_map; } - after->start = map__end(map); - after->pgoff += map__end(map) - map__start(pos->map); + map__set_start(after, map__end(map)); + map__add_pgoff(after, map__end(map) - map__start(pos->map)); assert(map__map_ip(pos->map, map__end(map)) == map__map_ip(after, map__end(map))); err = __maps__insert(maps, after); |