Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224306

[PATCH 12/27] perf env: Rename some leftovers from rename to perf_env

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 12/27] perf env: Rename some leftovers from rename to perf_env
Date 2015-09-14 18:50 +0200
Message-ID <q8F73-3qM-3@gated-at.bofh.it> (permalink)
References <q8EXn-3f1-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

In ce80d3bef9ff ("perf tools: Rename perf_session_env to perf_env") we
forgot to rename a few functions to the "perf_env" prefix, do it now.

Tested-by: Wang Nan <wangnan0@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-b3ui3z6ock89z1814pu2er98@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/common.c       | 10 ++++------
 tools/perf/arch/common.h       |  4 ++--
 tools/perf/builtin-annotate.c  |  2 +-
 tools/perf/builtin-top.c       |  2 +-
 tools/perf/ui/browsers/hists.c |  2 +-
 5 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index b00dfd92ea73..e83c8ce24303 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -128,9 +128,8 @@ static const char *normalize_arch(char *arch)
 	return arch;
 }
 
-static int perf_session_env__lookup_binutils_path(struct perf_env *env,
-						  const char *name,
-						  const char **path)
+static int perf_env__lookup_binutils_path(struct perf_env *env,
+					  const char *name, const char **path)
 {
 	int idx;
 	const char *arch, *cross_env;
@@ -206,7 +205,7 @@ out_error:
 	return -1;
 }
 
-int perf_session_env__lookup_objdump(struct perf_env *env)
+int perf_env__lookup_objdump(struct perf_env *env)
 {
 	/*
 	 * For live mode, env->arch will be NULL and we can use
@@ -215,6 +214,5 @@ int perf_session_env__lookup_objdump(struct perf_env *env)
 	if (env->arch == NULL)
 		return 0;
 
-	return perf_session_env__lookup_binutils_path(env, "objdump",
-						      &objdump_path);
+	return perf_env__lookup_binutils_path(env, "objdump", &objdump_path);
 }
diff --git a/tools/perf/arch/common.h b/tools/perf/arch/common.h
index 20176df69fc8..7529cfb143ce 100644
--- a/tools/perf/arch/common.h
+++ b/tools/perf/arch/common.h
@@ -1,10 +1,10 @@
 #ifndef ARCH_PERF_COMMON_H
 #define ARCH_PERF_COMMON_H
 
-#include "../util/session.h"
+#include "../util/env.h"
 
 extern const char *objdump_path;
 
-int perf_session_env__lookup_objdump(struct perf_env *env);
+int perf_env__lookup_objdump(struct perf_env *env);
 
 #endif /* ARCH_PERF_COMMON_H */
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 8edc205ff9a7..2bf9b3fd9e61 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -211,7 +211,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
 	}
 
 	if (!objdump_path) {
-		ret = perf_session_env__lookup_objdump(&session->header.env);
+		ret = perf_env__lookup_objdump(&session->header.env);
 		if (ret)
 			goto out;
 	}
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 8c465c83aabf..e5ca6848f01d 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -952,7 +952,7 @@ static int __cmd_top(struct perf_top *top)
 	machines__set_symbol_filter(&top->session->machines, symbol_filter);
 
 	if (!objdump_path) {
-		ret = perf_session_env__lookup_objdump(&top->session->header.env);
+		ret = perf_env__lookup_objdump(&top->session->header.env);
 		if (ret)
 			goto out_delete;
 	}
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index cf86f2d3a5e7..17d6c6dbb27f 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1437,7 +1437,7 @@ do_annotate(struct hist_browser *browser, struct popup_action *act)
 	struct hist_entry *he;
 	int err;
 
-	if (!objdump_path && perf_session_env__lookup_objdump(browser->env))
+	if (!objdump_path && perf_env__lookup_objdump(browser->env))
 		return 0;
 
 	notes = symbol__annotation(act->ms.sym);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/27] perf/core2 improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:40 +0200
  [PATCH 01/27] perf tests: Take into account address of each objdump line Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:40 +0200
  [PATCH 03/27] perf tests: Stop reading if objdump output crossed sections Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:40 +0200
  [PATCH 12/27] perf env: Rename some leftovers from rename to perf_env Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 16/27] perf tools: Add tools/include into tags directories Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 14/27] perf hists browser: Fixup the "cpu" column width calculation Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 21/27] perf env: Introduce read_cpu_topology_map() method Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 19/27] tools lib api cpu: Introduce cpu.[ch] to obtain cpu related information Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 22/27] perf machine: Add pointer to sample's environment Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 11/27] perf env: Move perf_env out of header.h and session.c into separate object Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 27/27] perf test: Add entry for hists socket filter Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 15/27] perf evsel: Remove forward declaration of 'struct perf_evlist' Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 10/27] perf tests: Introduce iterator function for tests Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 20/27] perf cpu_map: Use sysfs__read_int in get_{core,socket}_id() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 13/27] perf env: Adopt perf_header__set_cmdline Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 24/27] perf tools: Introduce new sort type "socket" for the processor socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 08/27] perf tools: Switch to tracing_path interface on appropriate places Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 23/27] perf tools: Add processor socket info to hist_entry and addr_location Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 25/27] perf report: Introduce --socket-filter option Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 26/27] perf hists browser: Zoom in/out for processor socket Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 18/27] tools lib api fs: Introduce sysfs__read_{int,ull}() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 17/27] perf env: Read msr pmu type from header Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 09/27] perf test: Add entry to test cpu topology Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 18:50 +0200
  [PATCH 07/27] tools lib api fs: Remove debugfs, tracefs and findfs objects Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 19:00 +0200
  [PATCH 06/27] tools lib api fs: Replace debugfs/tracefs objects interface with fs.c Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 19:00 +0200
  [PATCH 05/27] tools lib api fs: Make tracing_path_strerror_open message generic Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-14 19:00 +0200
  Re: [GIT PULL 00/27] perf/core2 improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-09-15 09:00 +0200

csiph-web