diff options
author | Namhyung Kim <namhyung@kernel.org> | 2020-03-25 13:45:31 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-04-03 14:37:55 +0200 |
commit | d1277aa36bff4bfc1a187a469fc6a6a1d17cf59c (patch) | |
tree | 682d45f57bf534a8eda1195c6b46cb8f7be0953c /tools/perf/util/env.c | |
parent | perf tools: Basic support for CGROUP event (diff) | |
download | linux-d1277aa36bff4bfc1a187a469fc6a6a1d17cf59c.tar.xz linux-d1277aa36bff4bfc1a187a469fc6a6a1d17cf59c.zip |
perf cgroup: Maintain cgroup hierarchy
Each cgroup is kept in the perf_env's cgroup_tree sorted by the cgroup
id. Hist entries have cgroup id can compare it directly and later it
can be used to find a group name using this tree.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200325124536.2800725-5-namhyung@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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 4154f944f474..fadc59708ece 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -6,6 +6,7 @@ #include <linux/ctype.h> #include <linux/zalloc.h> #include "bpf-event.h" +#include "cgroup.h" #include <errno.h> #include <sys/utsname.h> #include <bpf/libbpf.h> @@ -168,6 +169,7 @@ void perf_env__exit(struct perf_env *env) int i; perf_env__purge_bpf(env); + perf_env__purge_cgroups(env); zfree(&env->hostname); zfree(&env->os_release); zfree(&env->version); |