diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-08 19:30:00 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-14 18:50:19 +0300 |
commit | f0ce888c064e07c73a103822f2ad8e77649fd107 (patch) | |
tree | 981973a60045de468e3e016228c1aa4a343e4883 /tools/perf/util/env.c | |
parent | e8210cefb7e1ec0760a6fe581ad0727a2dcf8dd1 (diff) | |
download | linux-f0ce888c064e07c73a103822f2ad8e77649fd107.tar.xz |
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/env.c')
-rw-r--r-- | tools/perf/util/env.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c new file mode 100644 index 000000000000..0b3e1b2e5263 --- /dev/null +++ b/tools/perf/util/env.c @@ -0,0 +1,19 @@ +#include "env.h" +#include "util.h" + +void perf_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); +} |