Files

29 lines
640 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2011-02-14 11:20:01 +02:00
#ifndef __CGROUP_H__
#define __CGROUP_H__
#include <linux/refcount.h>
2015-05-15 16:12:20 -03:00
2011-02-14 11:20:01 +02:00
struct option;
struct cgroup {
2011-02-14 11:20:01 +02:00
char *name;
int fd;
refcount_t refcnt;
2011-02-14 11:20:01 +02:00
};
extern int nr_cgroups; /* number of explicit cgroups defined */
2018-03-06 10:18:40 -03:00
struct cgroup *cgroup__get(struct cgroup *cgroup);
void cgroup__put(struct cgroup *cgroup);
2018-03-06 15:27:08 -03:00
struct perf_evlist;
struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, const char *name);
2018-03-06 15:27:08 -03:00
void evlist__set_default_cgroup(struct perf_evlist *evlist, struct cgroup *cgroup);
int parse_cgroups(const struct option *opt, const char *str, int unset);
2011-02-14 11:20:01 +02:00
#endif /* __CGROUP_H__ */