Commit eebd0bfc authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf env: Rename some leftovers from rename to perf_env



In ce80d3be ("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: default avatarWang 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f0ce888c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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);
}
+2 −2
Original line number Diff line number Diff line
#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 */
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}
+1 −1
Original line number Diff line number Diff line
@@ -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);