linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH 04/22] perf map: Remove unused functions
Date: Thu, 28 Nov 2019 10:40:09 -0300	[thread overview]
Message-ID: <20191128134027.23726-5-acme@kernel.org> (raw)
In-Reply-To: <20191128134027.23726-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

At some point those stopped being used, prune them.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-p2k98mj3ff2uk1z95sbl5r6e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/map.c        | 30 ++++++++----------------------
 tools/perf/util/map_groups.h |  5 -----
 2 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index b59944eb469e..267d951b5dfd 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -568,6 +568,12 @@ void map_groups__insert(struct map_groups *mg, struct map *map)
 	up_write(&maps->lock);
 }
 
+static void __maps__remove(struct maps *maps, struct map *map)
+{
+	rb_erase_init(&map->rb_node, &maps->entries);
+	map__put(map);
+}
+
 void map_groups__remove(struct map_groups *mg, struct map *map)
 {
 	struct maps *maps = &mg->maps;
@@ -654,8 +660,8 @@ static bool map__contains_symbol(struct map *map, struct symbol *sym)
 	return ip >= map->start && ip < map->end;
 }
 
-struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
-					 struct map **mapp)
+static struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name,
+						struct map **mapp)
 {
 	struct symbol *sym;
 	struct map *pos;
@@ -890,26 +896,6 @@ static void __maps__insert(struct maps *maps, struct map *map)
 	map__get(map);
 }
 
-void maps__insert(struct maps *maps, struct map *map)
-{
-	down_write(&maps->lock);
-	__maps__insert(maps, map);
-	up_write(&maps->lock);
-}
-
-void __maps__remove(struct maps *maps, struct map *map)
-{
-	rb_erase_init(&map->rb_node, &maps->entries);
-	map__put(map);
-}
-
-void maps__remove(struct maps *maps, struct map *map)
-{
-	down_write(&maps->lock);
-	__maps__remove(maps, map);
-	up_write(&maps->lock);
-}
-
 struct map *maps__find(struct maps *maps, u64 ip)
 {
 	struct rb_node *p;
diff --git a/tools/perf/util/map_groups.h b/tools/perf/util/map_groups.h
index 63ed211fe241..f6270243ac4b 100644
--- a/tools/perf/util/map_groups.h
+++ b/tools/perf/util/map_groups.h
@@ -19,9 +19,6 @@ struct maps {
 	struct rw_semaphore lock;
 };
 
-void maps__insert(struct maps *maps, struct map *map);
-void maps__remove(struct maps *maps, struct map *map);
-void __maps__remove(struct maps *maps, struct map *map);
 struct map *maps__find(struct maps *maps, u64 addr);
 struct map *maps__first(struct maps *maps);
 struct map *map__next(struct map *map);
@@ -32,8 +29,6 @@ struct map *map__next(struct map *map);
 #define maps__for_each_entry_safe(maps, map, next) \
 	for (map = maps__first(maps), next = map__next(map); map; map = next, next = map__next(map))
 
-struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name, struct map **mapp);
-
 struct map_groups {
 	struct maps	 maps;
 	struct machine	 *machine;
-- 
2.21.0


  parent reply	other threads:[~2019-11-28 13:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 13:40 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 01/22] perf script: Move map__fprintf_srccode() to near its only user Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 02/22] perf map: Ditch leftover map__reloc_vmlinux() prototype Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 03/22] perf map: Remove needless struct forward declarations Arnaldo Carvalho de Melo
2019-11-28 13:40 ` Arnaldo Carvalho de Melo [this message]
2019-11-28 13:40 ` [PATCH 05/22] x86/insn: Add some more Intel instructions to the opcode map Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 06/22] x86/insn: perf tools: Add some more instructions to the new instructions test Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 07/22] perf maps: Merge 'struct maps' with 'struct map_groups' Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 08/22] perf thread: Rename thread->mg to thread->maps Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 09/22] perf addr_location: Rename al->mg to al->maps Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 10/22] perf map_symbol: Rename ms->mg to ms->maps Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 11/22] perf maps: Rename 'mg' variables to 'maps' Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 12/22] perf maps: Rename map_groups.h to maps.h Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 13/22] perf tests: Rename thread-mg-share to thread-maps-share Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 14/22] perf tests: Rename tests/map_groups.c to tests/maps.c Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 15/22] perf tools: Allow to link with libbpf dynamicaly Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 16/22] perf diff: Use llabs() with 64-bit values Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 17/22] " Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 18/22] perf regs: Make perf_reg_name() return "unknown" instead of NULL Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 19/22] perf pmu: Use file system cache to optimize sysfs access Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 20/22] perf affinity: Add infrastructure to save/restore affinity Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 21/22] perf script: Fix brstackinsn for AUXTRACE Arnaldo Carvalho de Melo
2019-11-28 13:40 ` [PATCH 22/22] perf script: Fix invalid LBR/binary mismatch error Arnaldo Carvalho de Melo
2019-11-29  5:58 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191128134027.23726-5-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).