Lines Matching refs:child_ctx

12242 		      struct perf_event_context *child_ctx,  in perf_event_exit_event()  argument
12259 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_event()
12260 WARN_ON_ONCE(child_ctx->is_active); in perf_event_exit_event()
12264 list_del_event(child_event, child_ctx); in perf_event_exit_event()
12266 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_event()
12299 struct perf_event_context *child_ctx, *clone_ctx = NULL; in perf_event_exit_task_context() local
12304 child_ctx = perf_pin_task_context(child, ctxn); in perf_event_exit_task_context()
12305 if (!child_ctx) in perf_event_exit_task_context()
12318 mutex_lock(&child_ctx->mutex); in perf_event_exit_task_context()
12325 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_task_context()
12326 task_ctx_sched_out(__get_cpu_context(child_ctx), child_ctx, EVENT_ALL); in perf_event_exit_task_context()
12333 put_ctx(child_ctx); /* cannot be last */ in perf_event_exit_task_context()
12334 WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); in perf_event_exit_task_context()
12337 clone_ctx = unclone_ctx(child_ctx); in perf_event_exit_task_context()
12338 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_task_context()
12348 perf_event_task(child, child_ctx, 0); in perf_event_exit_task_context()
12350 list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) in perf_event_exit_task_context()
12351 perf_event_exit_event(child_event, child_ctx, child); in perf_event_exit_task_context()
12353 mutex_unlock(&child_ctx->mutex); in perf_event_exit_task_context()
12355 put_ctx(child_ctx); in perf_event_exit_task_context()
12523 struct perf_event_context *child_ctx) in inherit_event() argument
12548 !child_ctx->task_ctx_data) { in inherit_event()
12551 child_ctx->task_ctx_data = alloc_task_ctx_data(pmu); in inherit_event()
12552 if (!child_ctx->task_ctx_data) { in inherit_event()
12573 get_ctx(child_ctx); in inherit_event()
12595 child_event->ctx = child_ctx; in inherit_event()
12609 raw_spin_lock_irqsave(&child_ctx->lock, flags); in inherit_event()
12610 add_event_to_ctx(child_event, child_ctx); in inherit_event()
12611 raw_spin_unlock_irqrestore(&child_ctx->lock, flags); in inherit_event()
12636 struct perf_event_context *child_ctx) in inherit_group() argument
12643 child, NULL, child_ctx); in inherit_group()
12653 child, leader, child_ctx); in inherit_group()
12682 struct perf_event_context *child_ctx; in inherit_task_group() local
12689 child_ctx = child->perf_event_ctxp[ctxn]; in inherit_task_group()
12690 if (!child_ctx) { in inherit_task_group()
12697 child_ctx = alloc_perf_context(parent_ctx->pmu, child); in inherit_task_group()
12698 if (!child_ctx) in inherit_task_group()
12701 child->perf_event_ctxp[ctxn] = child_ctx; in inherit_task_group()
12705 child, child_ctx); in inherit_task_group()
12718 struct perf_event_context *child_ctx, *parent_ctx; in perf_event_init_context() local
12780 child_ctx = child->perf_event_ctxp[ctxn]; in perf_event_init_context()
12782 if (child_ctx && inherited_all) { in perf_event_init_context()
12792 child_ctx->parent_ctx = cloned_ctx; in perf_event_init_context()
12793 child_ctx->parent_gen = parent_ctx->parent_gen; in perf_event_init_context()
12795 child_ctx->parent_ctx = parent_ctx; in perf_event_init_context()
12796 child_ctx->parent_gen = parent_ctx->generation; in perf_event_init_context()
12798 get_ctx(child_ctx->parent_ctx); in perf_event_init_context()