perf cgroup: Add evlist__findnew_cgroup()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Mar 2018 18:27:08 +0000 (15:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Mar 2018 13:22:26 +0000 (10:22 -0300)
commit69239ec81d596c57e0cf2d2f26cfe92e8cbd0929
tree78c50a1d1a414a8571e49c830ab8cbe4862d6ae0
parent4b5ea3bd674f707180b0e8c4f514d30e49f293b3
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>
tools/perf/util/cgroup.c
tools/perf/util/cgroup.h