diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-06 15:27:08 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-07 10:22:26 -0300 |
commit | 69239ec81d596c57e0cf2d2f26cfe92e8cbd0929 (patch) | |
tree | 78c50a1d1a414a8571e49c830ab8cbe4862d6ae0 /tools/perf/util/cgroup.h | |
parent | 4b5ea3bd674f707180b0e8c4f514d30e49f293b3 (diff) | |
download | linux-rpi-69239ec81d596c57e0cf2d2f26cfe92e8cbd0929.tar.gz linux-rpi-69239ec81d596c57e0cf2d2f26cfe92e8cbd0929.tar.bz2 linux-rpi-69239ec81d596c57e0cf2d2f26cfe92e8cbd0929.zip |
perf cgroup: Add evlist__findnew_cgroup()
Similar to machine__findnew_thread(), etc, i.e. try to find, get a
refcount if found and return it, otherwise return a new cgroup object.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-im1omevlihhyneiic4nl3g24@git.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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/cgroup.h b/tools/perf/util/cgroup.h index 34a6c11543dc..0e377e6340dd 100644 --- a/tools/perf/util/cgroup.h +++ b/tools/perf/util/cgroup.h @@ -18,6 +18,10 @@ extern int nr_cgroups; /* number of explicit cgroups defined */ struct cgroup *cgroup__get(struct cgroup *cgroup); void cgroup__put(struct cgroup *cgroup); +struct perf_evlist; + +struct cgroup *evlist__findnew_cgroup(struct perf_evlist *evlist, char *name); + int parse_cgroups(const struct option *opt, const char *str, int unset); #endif /* __CGROUP_H__ */ |