summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-09-08 13:30:00 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-14 12:50:19 -0300
commitf0ce888c064e07c73a103822f2ad8e77649fd107 (patch)
tree981973a60045de468e3e016228c1aa4a343e4883 /tools/perf/util/session.c
parente8210cefb7e1ec0760a6fe581ad0727a2dcf8dd1 (diff)
downloadlinux-f0ce888c064e07c73a103822f2ad8e77649fd107.tar.gz
linux-f0ce888c064e07c73a103822f2ad8e77649fd107.tar.bz2
linux-f0ce888c064e07c73a103822f2ad8e77649fd107.zip
perf env: Move perf_env out of header.h and session.c into separate object
Since it can be used separately from 'perf_session' and 'perf_header', move it to separate include file and object, next csets will try to move a perf_env__init() routine. 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-ff2rw99tsn670y1b6gxbwdsi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 23fed17307ff..728cb115fbb8 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -170,31 +170,13 @@ static void perf_session__delete_threads(struct perf_session *session)
machine__delete_threads(&session->machines.host);
}
-static void perf_session_env__exit(struct perf_env *env)
-{
- zfree(&env->hostname);
- zfree(&env->os_release);
- zfree(&env->version);
- zfree(&env->arch);
- zfree(&env->cpu_desc);
- zfree(&env->cpuid);
-
- zfree(&env->cmdline);
- zfree(&env->cmdline_argv);
- zfree(&env->sibling_cores);
- zfree(&env->sibling_threads);
- zfree(&env->numa_nodes);
- zfree(&env->pmu_mappings);
- zfree(&env->cpu);
-}
-
void perf_session__delete(struct perf_session *session)
{
auxtrace__free(session);
auxtrace_index__free(&session->auxtrace_index);
perf_session__destroy_kernel_maps(session);
perf_session__delete_threads(session);
- perf_session_env__exit(&session->header.env);
+ perf_env__exit(&session->header.env);
machines__exit(&session->machines);
if (session->file)
perf_data_file__close(session->file);