Lines Matching refs:child_ctx
12901 struct perf_event_context *child_ctx, *clone_ctx = NULL; in perf_event_exit_task_context() local
12906 child_ctx = perf_pin_task_context(child, ctxn); in perf_event_exit_task_context()
12907 if (!child_ctx) in perf_event_exit_task_context()
12920 mutex_lock(&child_ctx->mutex); in perf_event_exit_task_context()
12927 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_task_context()
12928 task_ctx_sched_out(__get_cpu_context(child_ctx), child_ctx, EVENT_ALL); in perf_event_exit_task_context()
12935 put_ctx(child_ctx); /* cannot be last */ in perf_event_exit_task_context()
12936 WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); in perf_event_exit_task_context()
12939 clone_ctx = unclone_ctx(child_ctx); in perf_event_exit_task_context()
12940 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_task_context()
12950 perf_event_task(child, child_ctx, 0); in perf_event_exit_task_context()
12952 list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) in perf_event_exit_task_context()
12953 perf_event_exit_event(child_event, child_ctx); in perf_event_exit_task_context()
12955 mutex_unlock(&child_ctx->mutex); in perf_event_exit_task_context()
12957 put_ctx(child_ctx); in perf_event_exit_task_context()
13125 struct perf_event_context *child_ctx) in inherit_event() argument
13150 !child_ctx->task_ctx_data) { in inherit_event()
13153 child_ctx->task_ctx_data = alloc_task_ctx_data(pmu); in inherit_event()
13154 if (!child_ctx->task_ctx_data) { in inherit_event()
13175 get_ctx(child_ctx); in inherit_event()
13197 child_event->ctx = child_ctx; in inherit_event()
13211 raw_spin_lock_irqsave(&child_ctx->lock, flags); in inherit_event()
13212 add_event_to_ctx(child_event, child_ctx); in inherit_event()
13214 raw_spin_unlock_irqrestore(&child_ctx->lock, flags); in inherit_event()
13239 struct perf_event_context *child_ctx) in inherit_group() argument
13246 child, NULL, child_ctx); in inherit_group()
13256 child, leader, child_ctx); in inherit_group()
13285 struct perf_event_context *child_ctx; in inherit_task_group() local
13295 child_ctx = child->perf_event_ctxp[ctxn]; in inherit_task_group()
13296 if (!child_ctx) { in inherit_task_group()
13303 child_ctx = alloc_perf_context(parent_ctx->pmu, child); in inherit_task_group()
13304 if (!child_ctx) in inherit_task_group()
13307 child->perf_event_ctxp[ctxn] = child_ctx; in inherit_task_group()
13311 child, child_ctx); in inherit_task_group()
13325 struct perf_event_context *child_ctx, *parent_ctx; in perf_event_init_context() local
13389 child_ctx = child->perf_event_ctxp[ctxn]; in perf_event_init_context()
13391 if (child_ctx && inherited_all) { in perf_event_init_context()
13401 child_ctx->parent_ctx = cloned_ctx; in perf_event_init_context()
13402 child_ctx->parent_gen = parent_ctx->parent_gen; in perf_event_init_context()
13404 child_ctx->parent_ctx = parent_ctx; in perf_event_init_context()
13405 child_ctx->parent_gen = parent_ctx->generation; in perf_event_init_context()
13407 get_ctx(child_ctx->parent_ctx); in perf_event_init_context()