perf tools: Allow creation of cgroup without open
authorNamhyung Kim <namhyung@kernel.org>
Thu, 24 Sep 2020 12:44:54 +0000 (21:44 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Sep 2020 12:18:06 +0000 (09:18 -0300)
commit89fb1ca2abb7fba6587a5768cfee9f89daf9be6f
tree9b87501e7b82d97c3542deae1f5b0049738dde00
parentb214ba8c4275d66029ad34ad222326dca43e7e26
perf tools: Allow creation of cgroup without open

This is a preparation for a test case of expanding events for multiple
cgroups.  Instead of using real system cgroup, the test will use fake
cgroups so it needs a way to have them without a open file descriptor.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200924124455.336326-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c
tools/perf/util/cgroup.c
tools/perf/util/cgroup.h