Lines Matching refs:child_ctx
11492 struct perf_event_context *child_ctx, in perf_event_exit_event() argument
11509 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_event()
11510 WARN_ON_ONCE(child_ctx->is_active); in perf_event_exit_event()
11514 list_del_event(child_event, child_ctx); in perf_event_exit_event()
11516 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_event()
11549 struct perf_event_context *child_ctx, *clone_ctx = NULL; in perf_event_exit_task_context() local
11554 child_ctx = perf_pin_task_context(child, ctxn); in perf_event_exit_task_context()
11555 if (!child_ctx) in perf_event_exit_task_context()
11568 mutex_lock(&child_ctx->mutex); in perf_event_exit_task_context()
11575 raw_spin_lock_irq(&child_ctx->lock); in perf_event_exit_task_context()
11576 task_ctx_sched_out(__get_cpu_context(child_ctx), child_ctx, EVENT_ALL); in perf_event_exit_task_context()
11583 put_ctx(child_ctx); /* cannot be last */ in perf_event_exit_task_context()
11584 WRITE_ONCE(child_ctx->task, TASK_TOMBSTONE); in perf_event_exit_task_context()
11587 clone_ctx = unclone_ctx(child_ctx); in perf_event_exit_task_context()
11588 raw_spin_unlock_irq(&child_ctx->lock); in perf_event_exit_task_context()
11598 perf_event_task(child, child_ctx, 0); in perf_event_exit_task_context()
11600 list_for_each_entry_safe(child_event, next, &child_ctx->event_list, event_entry) in perf_event_exit_task_context()
11601 perf_event_exit_event(child_event, child_ctx, child); in perf_event_exit_task_context()
11603 mutex_unlock(&child_ctx->mutex); in perf_event_exit_task_context()
11605 put_ctx(child_ctx); in perf_event_exit_task_context()
11773 struct perf_event_context *child_ctx) in inherit_event() argument
11798 !child_ctx->task_ctx_data) { in inherit_event()
11801 child_ctx->task_ctx_data = kzalloc(pmu->task_ctx_size, in inherit_event()
11803 if (!child_ctx->task_ctx_data) { in inherit_event()
11824 get_ctx(child_ctx); in inherit_event()
11846 child_event->ctx = child_ctx; in inherit_event()
11860 raw_spin_lock_irqsave(&child_ctx->lock, flags); in inherit_event()
11861 add_event_to_ctx(child_event, child_ctx); in inherit_event()
11862 raw_spin_unlock_irqrestore(&child_ctx->lock, flags); in inherit_event()
11887 struct perf_event_context *child_ctx) in inherit_group() argument
11894 child, NULL, child_ctx); in inherit_group()
11904 child, leader, child_ctx); in inherit_group()
11933 struct perf_event_context *child_ctx; in inherit_task_group() local
11940 child_ctx = child->perf_event_ctxp[ctxn]; in inherit_task_group()
11941 if (!child_ctx) { in inherit_task_group()
11948 child_ctx = alloc_perf_context(parent_ctx->pmu, child); in inherit_task_group()
11949 if (!child_ctx) in inherit_task_group()
11952 child->perf_event_ctxp[ctxn] = child_ctx; in inherit_task_group()
11956 child, child_ctx); in inherit_task_group()
11969 struct perf_event_context *child_ctx, *parent_ctx; in perf_event_init_context() local
12031 child_ctx = child->perf_event_ctxp[ctxn]; in perf_event_init_context()
12033 if (child_ctx && inherited_all) { in perf_event_init_context()
12043 child_ctx->parent_ctx = cloned_ctx; in perf_event_init_context()
12044 child_ctx->parent_gen = parent_ctx->parent_gen; in perf_event_init_context()
12046 child_ctx->parent_ctx = parent_ctx; in perf_event_init_context()
12047 child_ctx->parent_gen = parent_ctx->generation; in perf_event_init_context()
12049 get_ctx(child_ctx->parent_ctx); in perf_event_init_context()