[<prev] [next>] [day] [month] [year] [list]
Message-ID: <157380361326.29467.15056834595261302192.tip-bot2@tip-bot2>
Date: Fri, 15 Nov 2019 07:40:13 -0000
From: "tip-bot2 for Arnaldo Carvalho de Melo" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf map: Remove ->groups from 'struct map'
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 7b018e298752b9bcaf34eba8e1d3c08e3207dfd8
Gitweb: https://git.kernel.org/tip/7b018e298752b9bcaf34eba8e1d3c08e3207dfd8
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 04 Nov 2019 16:55:53 -03:00
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitterDate: Tue, 12 Nov 2019 08:20:53 -03:00
perf map: Remove ->groups from 'struct map'
With this 'struct map' uses a bit over 3 cachelines:
$ pahole -C map ~/bin/perf
<SNIP>
/* --- cacheline 2 boundary (128 bytes) --- */
u64 (*unmap_ip)(struct map *, u64); /* 128 8 */
struct dso * dso; /* 136 8 */
refcount_t refcnt; /* 144 4 */
/* size: 152, cachelines: 3, members: 18 */
/* sum members: 145, holes: 1, sum holes: 3 */
/* padding: 4 */
/* forced alignments: 2 */
/* last cacheline: 24 bytes */
} __attribute__((__aligned__(8)));
$
We probably can move map->map/unmap_ip() moved to 'struct map_groups',
that will shave more 16 bytes, getting this almost to two cachelines.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: https://lkml.kernel.org/n/tip-ymlv3nzpofv2fugnjnizkrwy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/map.c | 4 ----
tools/perf/util/map.h | 1 -
2 files changed, 5 deletions(-)
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 27d8508..3598468 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -140,7 +140,6 @@ void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso)
map->map_ip = map__map_ip;
map->unmap_ip = map__unmap_ip;
RB_CLEAR_NODE(&map->rb_node);
- map->groups = NULL;
map->erange_warned = false;
refcount_set(&map->refcnt, 1);
}
@@ -388,7 +387,6 @@ struct map *map__clone(struct map *from)
refcount_set(&map->refcnt, 1);
RB_CLEAR_NODE(&map->rb_node);
dso__get(map->dso);
- map->groups = NULL;
}
return map;
@@ -582,7 +580,6 @@ void map_groups__init(struct map_groups *mg, struct machine *machine)
void map_groups__insert(struct map_groups *mg, struct map *map)
{
maps__insert(&mg->maps, map);
- map->groups = mg;
}
static void __maps__purge(struct maps *maps)
@@ -749,7 +746,6 @@ static void __map_groups__insert(struct map_groups *mg, struct map *map)
{
__maps__insert(&mg->maps, map);
__maps__insert_name(&mg->maps, map);
- map->groups = mg;
}
int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, FILE *fp)
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index c361419..365deb6 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -42,7 +42,6 @@ struct map {
u64 (*unmap_ip)(struct map *, u64);
struct dso *dso;
- struct map_groups *groups;
refcount_t refcnt;
};
Powered by blists - more mailing lists