]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
perf tools: Rename perf_session_env to perf_env
authorKan Liang <kan.liang@intel.com>
Fri, 28 Aug 2015 09:48:04 +0000 (05:48 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 28 Aug 2015 17:53:55 +0000 (14:53 -0300)
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: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kan 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: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/common.c
tools/perf/arch/common.h
tools/perf/ui/browser.h
tools/perf/ui/browsers/header.c
tools/perf/ui/browsers/hists.c
tools/perf/util/header.h
tools/perf/util/hist.h
tools/perf/util/session.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h

index b7bb42c4469401d76527264f5e538b363b1d4bf9..b00dfd92ea731fe3c6319b703d2780207fe4cd6e 100644 (file)
@@ -128,7 +128,7 @@ static const char *normalize_arch(char *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 **path)
 {
@@ -206,7 +206,7 @@ out_error:
        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
index ede246eda9be6b9374e1854ae5a29e9e0eaf01a7..20176df69fc83fcf31d3c38817b367723b0bed06 100644 (file)
@@ -5,6 +5,6 @@
 
 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 */
index 52be87125defa46e17f033e4b89a8d3e14b8c7a4..f3cef564de02e7262c820d52b3063543adf9c2fc 100644 (file)
@@ -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);
 int ui_browser__input_window(const char *title, const char *text, char *input,
                             const char *exit_msg, int delay_sec);
-struct perf_session_env;
-int tui__header_window(struct perf_session_env *env);
+struct perf_env;
+int tui__header_window(struct perf_env *env);
 
 void ui_browser__argv_seek(struct ui_browser *browser, off_t offset, int whence);
 unsigned int ui_browser__argv_refresh(struct ui_browser *browser);
index f10681717f93f1bc162cca37fb959045763198b3..edbeaaf31acea117e2d94fd7c3d11f17ae4dbfaa 100644 (file)
@@ -91,7 +91,7 @@ static int ui__list_menu(int argc, char * const argv[])
        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;
        char **argv;
index 10c7ec041039e15e63b2dece4fb173755e4ef7b5..cf86f2d3a5e725cb625505283af7ce80ccc13ff6 100644 (file)
@@ -26,7 +26,7 @@ struct hist_browser {
        struct map_symbol   *selection;
        struct hist_browser_timer *hbt;
        struct pstack       *pstack;
-       struct perf_session_env *env;
+       struct perf_env *env;
        int                  print_seq;
        bool                 show_dso;
        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,
                                              struct hist_browser_timer *hbt,
-                                             struct perf_session_env *env)
+                                             struct perf_env *env)
 {
        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,
                                    struct hist_browser_timer *hbt,
                                    float min_pcnt,
-                                   struct perf_session_env *env)
+                                   struct perf_env *env)
 {
        struct hists *hists = evsel__hists(evsel);
        struct hist_browser *browser = hist_browser__new(hists, hbt, env);
@@ -2016,7 +2016,7 @@ struct perf_evsel_menu {
        struct perf_evsel *selection;
        bool lost_events, lost_events_warned;
        float min_pcnt;
-       struct perf_session_env *env;
+       struct perf_env *env;
 };
 
 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,
                                           struct hist_browser_timer *hbt,
                                           float min_pcnt,
-                                          struct perf_session_env *env)
+                                          struct perf_env *env)
 {
        struct perf_evsel *pos;
        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,
                                  struct hist_browser_timer *hbt,
                                  float min_pcnt,
-                                 struct perf_session_env *env)
+                                 struct perf_env *env)
 {
        int nr_entries = evlist->nr_entries;
 
index 9b53b6525ce8ac00e712ef90736f7a9e1b95a306..396e4965f0c97469056324e55183883a58b151b5 100644 (file)
@@ -66,7 +66,7 @@ struct perf_header;
 int perf_file_header__read(struct perf_file_header *header,
                           struct perf_header *ph, int fd);
 
-struct perf_session_env {
+struct perf_env {
        char                    *hostname;
        char                    *os_release;
        char                    *version;
@@ -98,7 +98,7 @@ struct perf_header {
        u64                             data_size;
        u64                             feat_offset;
        DECLARE_BITMAP(adds_features, HEADER_FEAT_BITS);
-       struct perf_session_env         env;
+       struct perf_env         env;
 };
 
 struct perf_evlist;
index bc528d54e4577ed783b64bec4fac0774657ecb5e..de6d58e7f0d561db9e204939453a5ca8b6a9cc11 100644 (file)
@@ -313,7 +313,7 @@ int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel,
 int perf_evlist__tui_browse_hists(struct perf_evlist *evlist, const char *help,
                                  struct hist_browser_timer *hbt,
                                  float min_pcnt,
-                                 struct perf_session_env *env);
+                                 struct perf_env *env);
 int script_browse(const char *script_opt);
 #else
 static inline
@@ -321,7 +321,7 @@ int perf_evlist__tui_browse_hists(struct perf_evlist *evlist __maybe_unused,
                                  const char *help __maybe_unused,
                                  struct hist_browser_timer *hbt __maybe_unused,
                                  float min_pcnt __maybe_unused,
-                                 struct perf_session_env *env __maybe_unused)
+                                 struct perf_env *env __maybe_unused)
 {
        return 0;
 }
index 18722e774a69c5c8fdbbc1c55454b0b85a0e1b16..8a4537ee9bc374166c31d05f6e48b6ca6943a4b3 100644 (file)
@@ -170,7 +170,7 @@ static void perf_session__delete_threads(struct perf_session *session)
        machine__delete_threads(&session->machines.host);
 }
 
-static void perf_session_env__exit(struct perf_session_env *env)
+static void perf_session_env__exit(struct perf_env *env)
 {
        zfree(&env->hostname);
        zfree(&env->os_release);
index 46ae0532a8a691ba40ced13c29865bc72ea84817..1f97ffb158a6af43e95cd1428ae0339d5fed3386 100644 (file)
@@ -1853,7 +1853,7 @@ static void vmlinux_path__exit(void)
        zfree(&vmlinux_path);
 }
 
-static int vmlinux_path__init(struct perf_session_env *env)
+static int vmlinux_path__init(struct perf_env *env)
 {
        struct utsname uts;
        char bf[PATH_MAX];
@@ -1964,7 +1964,7 @@ static bool symbol__read_kptr_restrict(void)
        return value;
 }
 
-int symbol__init(struct perf_session_env *env)
+int symbol__init(struct perf_env *env)
 {
        const char *symfs;
 
index a4cde92afbadf323c0a8e5b9200271b0ea79bb02..440ba8ae888f0a2fcbc91cb67a85a206bb7ca1c1 100644 (file)
@@ -252,8 +252,8 @@ int modules__parse(const char *filename, void *arg,
 int filename__read_debuglink(const char *filename, char *debuglink,
                             size_t size);
 
-struct perf_session_env;
-int symbol__init(struct perf_session_env *env);
+struct perf_env;
+int symbol__init(struct perf_env *env);
 void symbol__exit(void);
 void symbol__elf_init(void);
 struct symbol *symbol__new(u64 start, u64 len, u8 binding, const char *name);