summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/bpf_counter_cgroup.c5
-rw-r--r--tools/perf/util/cgroup.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/util/bpf_counter_cgroup.c b/tools/perf/util/bpf_counter_cgroup.c
index 1c82377ed78b..ea29c372f339 100644
--- a/tools/perf/util/bpf_counter_cgroup.c
+++ b/tools/perf/util/bpf_counter_cgroup.c
@@ -136,9 +136,8 @@ static int bperf_load_program(struct evlist *evlist)
cgrp = evsel->cgrp;
if (read_cgroup_id(cgrp) < 0) {
- pr_err("Failed to get cgroup id\n");
- err = -1;
- goto out;
+ pr_debug("Failed to get cgroup id for %s\n", cgrp->name);
+ cgrp->id = 0;
}
map_fd = bpf_map__fd(skel->maps.cgrp_idx);
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index fcb509058499..0f759dd96db7 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -465,9 +465,11 @@ int evlist__expand_cgroup(struct evlist *evlist, const char *str,
name = cn->name + prefix_len;
if (name[0] == '/' && name[1])
name++;
+
+ /* the cgroup can go away in the meantime */
cgrp = cgroup__new(name, open_cgroup);
if (cgrp == NULL)
- goto out_err;
+ continue;
leader = NULL;
evlist__for_each_entry(orig_list, pos) {