Lines Matching refs:child_ctx
13023 struct perf_event_context *child_ctx, *clone_ctx = NULL; in perf_event_exit_task_context() local
13028 child_ctx = perf_pin_task_context(child); in perf_event_exit_task_context()
13029 if (!child_ctx) in perf_event_exit_task_context()
13042 mutex_lock(&child_ctx->mutex); in perf_event_exit_task_context()
13049 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_task_context()
13050 task_ctx_sched_out(child_ctx, EVENT_ALL); in perf_event_exit_task_context()
13057 put_ctx(child_ctx); /* cannot be last */ in perf_event_exit_task_context()
13058 WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); in perf_event_exit_task_context()
13061 clone_ctx = unclone_ctx(child_ctx); in perf_event_exit_task_context()
13062 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_task_context()
13072 perf_event_task(child, child_ctx, 0); in perf_event_exit_task_context()
13074 list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) in perf_event_exit_task_context()
13075 perf_event_exit_event(child_event, child_ctx); in perf_event_exit_task_context()
13077 mutex_unlock(&child_ctx->mutex); in perf_event_exit_task_context()
13079 put_ctx(child_ctx); in perf_event_exit_task_context()
13240 struct perf_event_context *child_ctx) in inherit_event() argument
13264 pmu_ctx = find_get_pmu_context(child_event->pmu, child_ctx, child_event); in inherit_event()
13286 get_ctx(child_ctx); in inherit_event()
13308 child_event->ctx = child_ctx; in inherit_event()
13322 raw_spin_lock_irqsave(&child_ctx->lock, flags); in inherit_event()
13323 add_event_to_ctx(child_event, child_ctx); in inherit_event()
13325 raw_spin_unlock_irqrestore(&child_ctx->lock, flags); in inherit_event()
13350 struct perf_event_context *child_ctx) in inherit_group() argument
13357 child, NULL, child_ctx); in inherit_group()
13367 child, leader, child_ctx); in inherit_group()
13397 struct perf_event_context *child_ctx; in inherit_task_group() local
13408 child_ctx = child->perf_event_ctxp; in inherit_task_group()
13409 if (!child_ctx) { in inherit_task_group()
13416 child_ctx = alloc_perf_context(child); in inherit_task_group()
13417 if (!child_ctx) in inherit_task_group()
13420 child->perf_event_ctxp = child_ctx; in inherit_task_group()
13423 ret = inherit_group(event, parent, parent_ctx, child, child_ctx); in inherit_task_group()
13435 struct perf_event_context *child_ctx, *parent_ctx; in perf_event_init_context() local
13497 child_ctx = child->perf_event_ctxp; in perf_event_init_context()
13499 if (child_ctx && inherited_all) { in perf_event_init_context()
13509 child_ctx->parent_ctx = cloned_ctx; in perf_event_init_context()
13510 child_ctx->parent_gen = parent_ctx->parent_gen; in perf_event_init_context()
13512 child_ctx->parent_ctx = parent_ctx; in perf_event_init_context()
13513 child_ctx->parent_gen = parent_ctx->generation; in perf_event_init_context()
13515 get_ctx(child_ctx->parent_ctx); in perf_event_init_context()