aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-11-19 12:26:19 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-19 15:09:26 -0300
commit99459a84d5870a88274b4f10bc85c3e39e1d642c (patch)
tree777a3e06a3f80e63216389d13b3d3f93e4afcbc2 /tools/perf/util/map.h
parentMerge tag 'perf-core-for-mingo-5.5-20191119' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (diff)
downloadlinux-dev-99459a84d5870a88274b4f10bc85c3e39e1d642c.tar.xz
linux-dev-99459a84d5870a88274b4f10bc85c3e39e1d642c.zip
perf map: Move maj/min/ino/ino_generation to separate struct
And this patch highlights where these fields are being used: in the sort order where it uses it to compare maps and classify samples taking into account not just the DSO, but those DSO id fields. I think these should be used to differentiate DSOs with the same name but different 'struct dso_id' fields, i.e. these fields should move to 'struct dso' and then be used as part of the key when doing lookups for DSOs, in addition to the DSO name. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-8v5isitqy0dup47nnwkpc80f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/map.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 0a6c45f85cd9..70d87dcbe35d 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -18,6 +18,16 @@ struct map_groups;
struct machine;
struct evsel;
+/*
+ * Data about backing storage DSO, comes from PERF_RECORD_MMAP2 meta events
+ */
+struct dso_id {
+ u32 maj;
+ u32 min;
+ u64 ino;
+ u64 ino_generation;
+};
+
struct map {
union {
struct rb_node rb_node;
@@ -30,9 +40,6 @@ struct map {
u32 prot;
u64 pgoff;
u64 reloc;
- u32 maj, min; /* only valid for MMAP2 record */
- u64 ino; /* only valid for MMAP2 record */
- u64 ino_generation;/* only valid for MMAP2 record */
/* ip -> dso rip */
u64 (*map_ip)(struct map *, u64);
@@ -40,6 +47,7 @@ struct map {
u64 (*unmap_ip)(struct map *, u64);
struct dso *dso;
+ struct dso_id dso_id;
refcount_t refcnt;
u32 flags;
};