diff options
author | Namhyung Kim <namhyung@kernel.org> | 2021-06-25 00:18:24 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-07-01 15:00:33 -0300 |
commit | 21bcc7266129a68919438934a37c8793a528ff2b (patch) | |
tree | 2750846fc438dfc5115664cea295fc26a53800bf /tools/perf/util/cgroup.h | |
parent | 69e874db4dded0f2fe56ae623d7f54318395c87d (diff) |
perf tools: Add cgroup_is_v2() helper
The cgroup_is_v2() is to check if the given subsystem is mounted on
cgroup v2 or not. It'll be used by BPF cgroup code later.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210625071826.608504-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cgroup.h')
-rw-r--r-- | tools/perf/util/cgroup.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/cgroup.h b/tools/perf/util/cgroup.h index f3c978746999..de5b272560ab 100644 --- a/tools/perf/util/cgroup.h +++ b/tools/perf/util/cgroup.h @@ -48,4 +48,6 @@ static inline int read_cgroup_id(struct cgroup *cgrp __maybe_unused) } #endif /* HAVE_FILE_HANDLE */ +int cgroup_is_v2(const char *subsys); + #endif /* __CGROUP_H__ */ |