Lines Matching refs:child_ctx
10986 struct perf_event_context *child_ctx, in perf_event_exit_event() argument
11003 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_event()
11004 WARN_ON_ONCE(child_ctx->is_active); in perf_event_exit_event()
11008 list_del_event(child_event, child_ctx); in perf_event_exit_event()
11010 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_event()
11043 struct perf_event_context *child_ctx, *clone_ctx = NULL; in perf_event_exit_task_context() local
11048 child_ctx = perf_pin_task_context(child, ctxn); in perf_event_exit_task_context()
11049 if (!child_ctx) in perf_event_exit_task_context()
11062 mutex_lock(&child_ctx->mutex); in perf_event_exit_task_context()
11069 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_task_context()
11070 task_ctx_sched_out(__get_cpu_context(child_ctx), child_ctx, EVENT_ALL); in perf_event_exit_task_context()
11077 put_ctx(child_ctx); /* cannot be last */ in perf_event_exit_task_context()
11078 WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); in perf_event_exit_task_context()
11081 clone_ctx = unclone_ctx(child_ctx); in perf_event_exit_task_context()
11082 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_task_context()
11092 perf_event_task(child, child_ctx, 0); in perf_event_exit_task_context()
11094 list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) in perf_event_exit_task_context()
11095 perf_event_exit_event(child_event, child_ctx, child); in perf_event_exit_task_context()
11097 mutex_unlock(&child_ctx->mutex); in perf_event_exit_task_context()
11099 put_ctx(child_ctx); in perf_event_exit_task_context()
11253 struct perf_event_context *child_ctx) in inherit_event() argument
11278 !child_ctx->task_ctx_data) { in inherit_event()
11281 child_ctx->task_ctx_data = kzalloc(pmu->task_ctx_size, in inherit_event()
11283 if (!child_ctx->task_ctx_data) { in inherit_event()
11304 get_ctx(child_ctx); in inherit_event()
11326 child_event->ctx = child_ctx; in inherit_event()
11340 raw_spin_lock_irqsave(&child_ctx->lock, flags); in inherit_event()
11341 add_event_to_ctx(child_event, child_ctx); in inherit_event()
11342 raw_spin_unlock_irqrestore(&child_ctx->lock, flags); in inherit_event()
11367 struct perf_event_context *child_ctx) in inherit_group() argument
11374 child, NULL, child_ctx); in inherit_group()
11384 child, leader, child_ctx); in inherit_group()
11409 struct perf_event_context *child_ctx; in inherit_task_group() local
11416 child_ctx = child->perf_event_ctxp[ctxn]; in inherit_task_group()
11417 if (!child_ctx) { in inherit_task_group()
11424 child_ctx = alloc_perf_context(parent_ctx->pmu, child); in inherit_task_group()
11425 if (!child_ctx) in inherit_task_group()
11428 child->perf_event_ctxp[ctxn] = child_ctx; in inherit_task_group()
11432 child, child_ctx); in inherit_task_group()
11445 struct perf_event_context *child_ctx, *parent_ctx; in perf_event_init_context() local
11507 child_ctx = child->perf_event_ctxp[ctxn]; in perf_event_init_context()
11509 if (child_ctx && inherited_all) { in perf_event_init_context()
11519 child_ctx->parent_ctx = cloned_ctx; in perf_event_init_context()
11520 child_ctx->parent_gen = parent_ctx->parent_gen; in perf_event_init_context()
11522 child_ctx->parent_ctx = parent_ctx; in perf_event_init_context()
11523 child_ctx->parent_gen = parent_ctx->generation; in perf_event_init_context()
11525 get_ctx(child_ctx->parent_ctx); in perf_event_init_context()