All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 13/17] perf tools: Remove machine__load_kallsyms function
Date: Tue,  6 Feb 2018 19:18:09 +0100	[thread overview]
Message-ID: <20180206181813.10943-14-jolsa@kernel.org> (raw)
In-Reply-To: <20180206181813.10943-1-jolsa@kernel.org>

And replacing it with __machine__load_kallsyms function.

The current machine__load_kallsyms function has no caller,
so replacing it directly with __machine__load_kallsyms.
Also removing the no_kcore argument as it was always called
with true value.

Link: http://lkml.kernel.org/n/tip-kj9bpn6v213n6vaoe6ryxv2q@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/vmlinux-kallsyms.c |  2 +-
 tools/perf/util/machine.c           | 14 ++++----------
 tools/perf/util/machine.h           |  2 --
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index f6789fb029d6..58349297f9fb 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -56,7 +56,7 @@ int test__vmlinux_matches_kallsyms(struct test *test __maybe_unused, int subtest
 	 * be compacted against the list of modules found in the "vmlinux"
 	 * code and with the one got from /proc/modules from the "kallsyms" code.
 	 */
-	if (__machine__load_kallsyms(&kallsyms, "/proc/kallsyms", type, true) <= 0) {
+	if (machine__load_kallsyms(&kallsyms, "/proc/kallsyms", type) <= 0) {
 		pr_debug("dso__load_kallsyms ");
 		goto out;
 	}
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 441d09d97f3d..a9e470139722 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -151,7 +151,7 @@ struct machine *machine__new_kallsyms(void)
 	 *    ask for not using the kcore parsing code, once this one is fixed
 	 *    to create a map per module.
 	 */
-	if (machine && __machine__load_kallsyms(machine, "/proc/kallsyms", MAP__FUNCTION, true) <= 0) {
+	if (machine && machine__load_kallsyms(machine, "/proc/kallsyms", MAP__FUNCTION) <= 0) {
 		machine__delete(machine);
 		machine = NULL;
 	}
@@ -992,11 +992,11 @@ int machines__create_kernel_maps(struct machines *machines, pid_t pid)
 	return machine__create_kernel_maps(machine);
 }
 
-int __machine__load_kallsyms(struct machine *machine, const char *filename,
-			     enum map_type type, bool no_kcore)
+int machine__load_kallsyms(struct machine *machine, const char *filename,
+			     enum map_type type)
 {
 	struct map *map = machine__kernel_map(machine);
-	int ret = __dso__load_kallsyms(map->dso, filename, map, no_kcore);
+	int ret = __dso__load_kallsyms(map->dso, filename, map, true);
 
 	if (ret > 0) {
 		dso__set_loaded(map->dso, type);
@@ -1011,12 +1011,6 @@ int __machine__load_kallsyms(struct machine *machine, const char *filename,
 	return ret;
 }
 
-int machine__load_kallsyms(struct machine *machine, const char *filename,
-			   enum map_type type)
-{
-	return __machine__load_kallsyms(machine, filename, type, false);
-}
-
 int machine__load_vmlinux_path(struct machine *machine, enum map_type type)
 {
 	struct map *map = machine__kernel_map(machine);
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 50d587d34459..66cc200ef86f 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -225,8 +225,6 @@ struct map *machine__findnew_module_map(struct machine *machine, u64 start,
 					const char *filename);
 int arch__fix_module_text_start(u64 *start, const char *name);
 
-int __machine__load_kallsyms(struct machine *machine, const char *filename,
-			     enum map_type type, bool no_kcore);
 int machine__load_kallsyms(struct machine *machine, const char *filename,
 			   enum map_type type);
 int machine__load_vmlinux_path(struct machine *machine, enum map_type type);
-- 
2.13.6

  parent reply	other threads:[~2018-02-06 18:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 18:17 [PATCH 00/17] perf tools: Assorted fixes Jiri Olsa
2018-02-06 18:17 ` [PATCH 01/17] perf report: Ask ordered events for --tasks option Jiri Olsa
2018-02-06 18:48   ` Arnaldo Carvalho de Melo
2018-02-06 18:59     ` Jiri Olsa
2018-02-06 19:20       ` Arnaldo Carvalho de Melo
2018-02-17 11:22   ` [tip:perf/core] perf report: Ask for " tip-bot for Jiri Olsa
2018-02-06 18:17 ` [PATCH 02/17] perf record: Put new line after target override warning Jiri Olsa
2018-02-17 11:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-02-06 18:17 ` [PATCH 03/17] perf script: Add --show-round-event to display PERF_RECORD_FINISHED_ROUND Jiri Olsa
2018-02-17 11:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-02-06 18:18 ` [PATCH 04/17] tools lib api fs: Add filename__read_xll function Jiri Olsa
2018-02-17 11:20   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-02-06 18:18 ` [PATCH 05/17] tools lib api fs: Add sysfs__read_xll function Jiri Olsa
2018-02-06 19:08   ` Arnaldo Carvalho de Melo
2018-02-17 11:21   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-02-06 18:18 ` [PATCH 06/17] tools lib symbol: Skip non-address kallsyms line Jiri Olsa
2018-02-06 19:06   ` Arnaldo Carvalho de Melo
2018-02-06 19:07     ` Arnaldo Carvalho de Melo
2018-02-06 18:18 ` [PATCH 07/17] perf tools: Free root_dir in machine__init error path Jiri Olsa
2018-02-06 19:09   ` Arnaldo Carvalho de Melo
2018-02-06 18:18 ` [PATCH 08/17] perf tools: Move kernel mmap name into struct machine Jiri Olsa
2018-02-06 19:10   ` Arnaldo Carvalho de Melo
2018-02-06 18:18 ` [PATCH 09/17] perf tools: Don't search for active kernel start in __machine__create_kernel_maps Jiri Olsa
2018-02-06 18:18 ` [PATCH 10/17] perf tools: Generalize machine__set_kernel_mmap function Jiri Olsa
2018-02-06 18:18 ` [PATCH 11/17] perf tools: Use machine__set_kernel_mmap instead of map_groups__fixup_end Jiri Olsa
2018-02-06 18:18 ` [PATCH 12/17] perf tools: Rename __map_groups__fixup_end to map_groups__fixup_end Jiri Olsa
2018-02-06 18:18 ` Jiri Olsa [this message]
2018-02-06 18:18 ` [PATCH 14/17] perf tools: Do not create kernel maps in sample__resolve Jiri Olsa
2018-02-06 18:18 ` [PATCH 15/17] perf tools: Check if we read regular file in dso__load Jiri Olsa
2018-02-06 18:18 ` [PATCH 16/17] perf tests: Fix dwarf unwind for stripped binaries Jiri Olsa
2018-02-06 19:15   ` Arnaldo Carvalho de Melo
2018-02-17 11:21   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-02-06 18:18 ` [PATCH 17/17] perf tools: Fix comment for sort__* compare functions Jiri Olsa
2018-02-06 19:16   ` Arnaldo Carvalho de Melo
2018-02-17 11:22   ` [tip:perf/core] " tip-bot for Jiri Olsa

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=20180206181813.10943-14-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.