1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/refcount.h>
6 #include <linux/rbtree.h>
19 extern int nr_cgroups
; /* number of explicit cgroups defined */
21 struct cgroup
*cgroup__get(struct cgroup
*cgroup
);
22 void cgroup__put(struct cgroup
*cgroup
);
27 struct cgroup
*evlist__findnew_cgroup(struct evlist
*evlist
, const char *name
);
28 int evlist__expand_cgroup(struct evlist
*evlist
, const char *cgroups
,
29 struct rblist
*metric_events
, bool open_cgroup
);
31 void evlist__set_default_cgroup(struct evlist
*evlist
, struct cgroup
*cgroup
);
33 int parse_cgroups(const struct option
*opt
, const char *str
, int unset
);
35 struct cgroup
*cgroup__findnew(struct perf_env
*env
, uint64_t id
,
37 struct cgroup
*cgroup__find(struct perf_env
*env
, uint64_t id
);
39 void perf_env__purge_cgroups(struct perf_env
*env
);
41 #endif /* __CGROUP_H__ */