static int add_cgroup(struct perf_evlist *evlist, char *str)
{
struct perf_evsel *counter;
- struct cgroup_sel *cgrp = NULL;
+ struct cgroup *cgrp = NULL;
int n;
/*
* check if cgrp is already defined, if so we reuse it
return 0;
}
-void close_cgroup(struct cgroup_sel *cgrp)
+void close_cgroup(struct cgroup *cgrp)
{
if (cgrp && refcount_dec_and_test(&cgrp->refcnt)) {
close(cgrp->fd);
{
struct perf_evlist *evlist = *(struct perf_evlist **)opt->value;
struct perf_evsel *counter;
- struct cgroup_sel *cgrp = NULL;
+ struct cgroup *cgrp = NULL;
const char *p, *e, *eos = str + strlen(str);
char *s;
int ret, i;
struct option;
-struct cgroup_sel {
+struct cgroup {
char *name;
int fd;
refcount_t refcnt;
extern int nr_cgroups; /* number of explicit cgroups defined */
-void close_cgroup(struct cgroup_sel *cgrp);
+void close_cgroup(struct cgroup *cgrp);
+
int parse_cgroups(const struct option *opt, const char *str, int unset);
#endif /* __CGROUP_H__ */
u64 period;
};
-struct cgroup_sel;
+struct cgroup;
/*
* The 'struct perf_evsel_config_term' is used to pass event
struct perf_stat_evsel *stats;
void *priv;
u64 db_id;
- struct cgroup_sel *cgrp;
+ struct cgroup *cgrp;
void *handler;
struct cpu_map *cpus;
struct cpu_map *own_cpus;