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>
This commit is contained in:
Arnaldo Carvalho de Melo
2023-04-19 12:24:12 -03:00
parent e1805aae1e
commit e6a9efcee5
9 changed files with 132 additions and 65 deletions

View File

@@ -304,7 +304,7 @@ next_pair:
dso->short_name :
dso->name));
if (pair) {
pair->priv = 1;
map__set_priv(pair, 1);
} else {
if (!header_printed) {
pr_info("WARN: Maps only in vmlinux:\n");
@@ -340,7 +340,7 @@ next_pair:
pr_info(":\nWARN: *%" PRIx64 "-%" PRIx64 " %" PRIx64,
map__start(pair), map__end(pair), map__pgoff(pair));
pr_info(" %s\n", dso->name);
pair->priv = 1;
map__set_priv(pair, 1);
}
}