Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce80d3be authored by Kan Liang's avatar Kan Liang Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Rename perf_session_env to perf_env



As it is not necessarily tied to a perf.data file and needs using in
places where a perf_session is not required.

Suggested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarKan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1440755289-30939-4-git-send-email-kan.liang@intel.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9f30fffc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -128,7 +128,7 @@ static const char *normalize_arch(char *arch)
	return arch;
	return arch;
}
}


static int perf_session_env__lookup_binutils_path(struct perf_session_env *env,
static int perf_session_env__lookup_binutils_path(struct perf_env *env,
						  const char *name,
						  const char *name,
						  const char **path)
						  const char **path)
{
{
@@ -206,7 +206,7 @@ static int perf_session_env__lookup_binutils_path(struct perf_session_env *env,
	return -1;
	return -1;
}
}


int perf_session_env__lookup_objdump(struct perf_session_env *env)
int perf_session_env__lookup_objdump(struct perf_env *env)
{
{
	/*
	/*
	 * For live mode, env->arch will be NULL and we can use
	 * For live mode, env->arch will be NULL and we can use
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,6 +5,6 @@


extern const char *objdump_path;
extern const char *objdump_path;


int perf_session_env__lookup_objdump(struct perf_session_env *env);
int perf_session_env__lookup_objdump(struct perf_env *env);


#endif /* ARCH_PERF_COMMON_H */
#endif /* ARCH_PERF_COMMON_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -61,8 +61,8 @@ int ui_browser__help_window(struct ui_browser *browser, const char *text);
bool ui_browser__dialog_yesno(struct ui_browser *browser, const char *text);
bool ui_browser__dialog_yesno(struct ui_browser *browser, const char *text);
int ui_browser__input_window(const char *title, const char *text, char *input,
int ui_browser__input_window(const char *title, const char *text, char *input,
			     const char *exit_msg, int delay_sec);
			     const char *exit_msg, int delay_sec);
struct perf_session_env;
struct perf_env;
int tui__header_window(struct perf_session_env *env);
int tui__header_window(struct perf_env *env);


void ui_browser__argv_seek(struct ui_browser *browser, off_t offset, int whence);
void ui_browser__argv_seek(struct ui_browser *browser, off_t offset, int whence);
unsigned int ui_browser__argv_refresh(struct ui_browser *browser);
unsigned int ui_browser__argv_refresh(struct ui_browser *browser);
+1 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@ static int ui__list_menu(int argc, char * const argv[])
	return list_menu__run(&menu);
	return list_menu__run(&menu);
}
}


int tui__header_window(struct perf_session_env *env)
int tui__header_window(struct perf_env *env)
{
{
	int i, argc = 0;
	int i, argc = 0;
	char **argv;
	char **argv;
+6 −6
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@ struct hist_browser {
	struct map_symbol   *selection;
	struct map_symbol   *selection;
	struct hist_browser_timer *hbt;
	struct hist_browser_timer *hbt;
	struct pstack	    *pstack;
	struct pstack	    *pstack;
	struct perf_session_env *env;
	struct perf_env *env;
	int		     print_seq;
	int		     print_seq;
	bool		     show_dso;
	bool		     show_dso;
	bool		     show_headers;
	bool		     show_headers;
@@ -1214,7 +1214,7 @@ static int hist_browser__dump(struct hist_browser *browser)


static struct hist_browser *hist_browser__new(struct hists *hists,
static struct hist_browser *hist_browser__new(struct hists *hists,
					      struct hist_browser_timer *hbt,
					      struct hist_browser_timer *hbt,
					      struct perf_session_env *env)
					      struct perf_env *env)
{
{
	struct hist_browser *browser = zalloc(sizeof(*browser));
	struct hist_browser *browser = zalloc(sizeof(*browser));


@@ -1695,7 +1695,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
				    bool left_exits,
				    bool left_exits,
				    struct hist_browser_timer *hbt,
				    struct hist_browser_timer *hbt,
				    float min_pcnt,
				    float min_pcnt,
				    struct perf_session_env *env)
				    struct perf_env *env)
{
{
	struct hists *hists = evsel__hists(evsel);
	struct hists *hists = evsel__hists(evsel);
	struct hist_browser *browser = hist_browser__new(hists, hbt, env);
	struct hist_browser *browser = hist_browser__new(hists, hbt, env);
@@ -2016,7 +2016,7 @@ struct perf_evsel_menu {
	struct perf_evsel *selection;
	struct perf_evsel *selection;
	bool lost_events, lost_events_warned;
	bool lost_events, lost_events_warned;
	float min_pcnt;
	float min_pcnt;
	struct perf_session_env *env;
	struct perf_env *env;
};
};


static void perf_evsel_menu__write(struct ui_browser *browser,
static void perf_evsel_menu__write(struct ui_browser *browser,
@@ -2169,7 +2169,7 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
					   int nr_entries, const char *help,
					   int nr_entries, const char *help,
					   struct hist_browser_timer *hbt,
					   struct hist_browser_timer *hbt,
					   float min_pcnt,
					   float min_pcnt,
					   struct perf_session_env *env)
					   struct perf_env *env)
{
{
	struct perf_evsel *pos;
	struct perf_evsel *pos;
	struct perf_evsel_menu menu = {
	struct perf_evsel_menu menu = {
@@ -2202,7 +2202,7 @@ static int __perf_evlist__tui_browse_hists(struct perf_evlist *evlist,
int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
				  struct hist_browser_timer *hbt,
				  struct hist_browser_timer *hbt,
				  float min_pcnt,
				  float min_pcnt,
				  struct perf_session_env *env)
				  struct perf_env *env)
{
{
	int nr_entries = evlist->nr_entries;
	int nr_entries = evlist->nr_entries;


Loading