Lines Matching refs:env
344 struct cgroup *cgroup__findnew(struct perf_env *env, uint64_t id,
349 down_write(&env->cgroups.lock);
350 cgrp = __cgroup__findnew(&env->cgroups.tree, id, true, path);
351 up_write(&env->cgroups.lock);
355 struct cgroup *cgroup__find(struct perf_env *env, uint64_t id)
359 down_read(&env->cgroups.lock);
360 cgrp = __cgroup__findnew(&env->cgroups.tree, id, false, NULL);
361 up_read(&env->cgroups.lock);
365 void perf_env__purge_cgroups(struct perf_env *env)
370 down_write(&env->cgroups.lock);
371 while (!RB_EMPTY_ROOT(&env->cgroups.tree)) {
372 node = rb_first(&env->cgroups.tree);
375 rb_erase(node, &env->cgroups.tree);
378 up_write(&env->cgroups.lock);