Lines Matching refs:task_ctx

220 	struct perf_event_context *task_ctx = cpuctx->task_ctx;  in event_function()  local
225 perf_ctx_lock(cpuctx, task_ctx); in event_function()
248 WARN_ON_ONCE(task_ctx != ctx); in event_function()
255 perf_ctx_unlock(cpuctx, task_ctx); in event_function()
318 struct perf_event_context *task_ctx = NULL; in event_function_local() local
326 task_ctx = ctx; in event_function_local()
329 perf_ctx_lock(cpuctx, task_ctx); in event_function_local()
345 if (WARN_ON_ONCE(cpuctx->task_ctx != ctx)) in event_function_local()
354 perf_ctx_unlock(cpuctx, task_ctx); in event_function_local()
819 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
845 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
2363 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in __perf_remove_from_context()
2364 cpuctx->task_ctx = NULL; in __perf_remove_from_context()
2681 if (!cpuctx->task_ctx) in task_ctx_sched_out()
2684 if (WARN_ON_ONCE(ctx != cpuctx->task_ctx)) in task_ctx_sched_out()
2718 struct perf_event_context *task_ctx, in ctx_resched() argument
2734 if (task_ctx) in ctx_resched()
2735 task_ctx_sched_out(cpuctx, task_ctx, event_type); in ctx_resched()
2749 perf_event_sched_in(cpuctx, task_ctx, current); in ctx_resched()
2756 struct perf_event_context *task_ctx = cpuctx->task_ctx; in perf_pmu_resched() local
2758 perf_ctx_lock(cpuctx, task_ctx); in perf_pmu_resched()
2759 ctx_resched(cpuctx, task_ctx, EVENT_ALL|EVENT_CPU); in perf_pmu_resched()
2760 perf_ctx_unlock(cpuctx, task_ctx); in perf_pmu_resched()
2774 struct perf_event_context *task_ctx = cpuctx->task_ctx; in __perf_install_in_context() local
2781 task_ctx = ctx; in __perf_install_in_context()
2797 WARN_ON_ONCE(reprogram && cpuctx->task_ctx && cpuctx->task_ctx != ctx); in __perf_install_in_context()
2798 } else if (task_ctx) { in __perf_install_in_context()
2799 raw_spin_lock(&task_ctx->lock); in __perf_install_in_context()
2817 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_install_in_context()
2823 perf_ctx_unlock(cpuctx, task_ctx); in __perf_install_in_context()
2953 struct perf_event_context *task_ctx; in __perf_event_enable() local
2982 task_ctx = cpuctx->task_ctx; in __perf_event_enable()
2984 WARN_ON_ONCE(task_ctx != ctx); in __perf_event_enable()
2986 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_event_enable()
3246 WARN_ON_ONCE(cpuctx->task_ctx); in ctx_sched_out()
3255 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_out()
3257 cpuctx->task_ctx = NULL; in ctx_sched_out()
3418 if (!cpuctx->task_ctx) in perf_event_context_sched_out()
3541 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3544 pmu->sched_task(cpuctx->task_ctx, sched_in); in __perf_pmu_sched_task()
3547 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3561 if (cpuctx->task_ctx) in perf_pmu_sched_task()
3810 cpuctx->task_ctx = ctx; in ctx_sched_in()
3812 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_in()
3859 if (cpuctx->task_ctx == ctx) { in perf_event_context_sched_in()
3887 pmu->sched_task(cpuctx->task_ctx, true); in perf_event_context_sched_in()
4158 struct perf_event_context *task_ctx = NULL; in perf_rotate_context() local
4167 task_ctx = cpuctx->task_ctx; in perf_rotate_context()
4168 task_rotate = task_ctx ? task_ctx->rotate_necessary : 0; in perf_rotate_context()
4173 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4177 task_event = ctx_event_to_rotate(task_ctx); in perf_rotate_context()
4185 if (task_event || (task_ctx && cpu_event)) in perf_rotate_context()
4186 ctx_sched_out(task_ctx, cpuctx, EVENT_FLEXIBLE); in perf_rotate_context()
4191 rotate_ctx(task_ctx, task_event); in perf_rotate_context()
4195 perf_event_sched_in(cpuctx, task_ctx, current); in perf_rotate_context()
4198 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4370 if (ctx->task && cpuctx->task_ctx != ctx) in __perf_event_read()
7617 struct perf_event_context *task_ctx) in perf_iterate_sb() argument
7630 if (task_ctx) { in perf_iterate_sb()
7631 perf_iterate_ctx(task_ctx, output, data, false); in perf_iterate_sb()
7744 if (cpuctx->task_ctx) in __perf_pmu_output_stop()
7745 perf_iterate_ctx(cpuctx->task_ctx, __perf_event_output_stop, in __perf_pmu_output_stop()
7790 struct perf_event_context *task_ctx; member
7854 struct perf_event_context *task_ctx, in perf_event_task() argument
7866 .task_ctx = task_ctx, in perf_event_task()
7883 task_ctx); in perf_event_task()