diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-07-04 14:16:20 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-07-04 19:39:01 -0300 |
commit | c60da22aca8755b77b7f4d4caf57ada8654db939 (patch) | |
tree | 850dc675f62c2f3a3097a6d411d346002d86d067 /tools/perf/util/env.c | |
parent | 6430a94ead2a4c8f350441351a735303eb6d1c8a (diff) | |
download | linux-c60da22aca8755b77b7f4d4caf57ada8654db939.tar.bz2 |
perf header: Transform nodes string info to struct
Storing NUMA info within struct numa_node instead of strings. This way
it's usable in future patches.
Also it turned out it's slightly less code involved than using strings.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1467634583-29147-2-git-send-email-jolsa@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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 49a11d9d8b8f..bb964e86b09d 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -18,10 +18,13 @@ void perf_env__exit(struct perf_env *env) zfree(&env->cmdline_argv); zfree(&env->sibling_cores); zfree(&env->sibling_threads); - zfree(&env->numa_nodes); zfree(&env->pmu_mappings); zfree(&env->cpu); + for (i = 0; i < env->nr_numa_nodes; i++) + cpu_map__put(env->numa_nodes[i].map); + zfree(&env->numa_nodes); + for (i = 0; i < env->caches_cnt; i++) cpu_cache_level__free(&env->caches[i]); zfree(&env->caches); |