Lines Matching refs:task_ctx

221 	struct perf_event_context *task_ctx = cpuctx->task_ctx;  in event_function()  local
226 perf_ctx_lock(cpuctx, task_ctx); in event_function()
249 WARN_ON_ONCE(task_ctx != ctx); in event_function()
256 perf_ctx_unlock(cpuctx, task_ctx); in event_function()
319 struct perf_event_context *task_ctx = NULL; in event_function_local() local
327 task_ctx = ctx; in event_function_local()
330 perf_ctx_lock(cpuctx, task_ctx); in event_function_local()
346 if (WARN_ON_ONCE(cpuctx->task_ctx != ctx)) in event_function_local()
355 perf_ctx_unlock(cpuctx, task_ctx); in event_function_local()
852 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
870 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
2383 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in __perf_remove_from_context()
2384 cpuctx->task_ctx = NULL; in __perf_remove_from_context()
2667 if (!cpuctx->task_ctx) in task_ctx_sched_out()
2670 if (WARN_ON_ONCE(ctx != cpuctx->task_ctx)) in task_ctx_sched_out()
2703 struct perf_event_context *task_ctx, in ctx_resched() argument
2719 if (task_ctx) in ctx_resched()
2720 task_ctx_sched_out(cpuctx, task_ctx, event_type); in ctx_resched()
2734 perf_event_sched_in(cpuctx, task_ctx); in ctx_resched()
2741 struct perf_event_context *task_ctx = cpuctx->task_ctx; in perf_pmu_resched() local
2743 perf_ctx_lock(cpuctx, task_ctx); in perf_pmu_resched()
2744 ctx_resched(cpuctx, task_ctx, EVENT_ALL|EVENT_CPU); in perf_pmu_resched()
2745 perf_ctx_unlock(cpuctx, task_ctx); in perf_pmu_resched()
2759 struct perf_event_context *task_ctx = cpuctx->task_ctx; in __perf_install_in_context() local
2766 task_ctx = ctx; in __perf_install_in_context()
2782 WARN_ON_ONCE(reprogram && cpuctx->task_ctx && cpuctx->task_ctx != ctx); in __perf_install_in_context()
2783 } else if (task_ctx) { in __perf_install_in_context()
2784 raw_spin_lock(&task_ctx->lock); in __perf_install_in_context()
2802 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_install_in_context()
2808 perf_ctx_unlock(cpuctx, task_ctx); in __perf_install_in_context()
2941 struct perf_event_context *task_ctx; in __perf_event_enable() local
2970 task_ctx = cpuctx->task_ctx; in __perf_event_enable()
2972 WARN_ON_ONCE(task_ctx != ctx); in __perf_event_enable()
2974 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_event_enable()
3250 WARN_ON_ONCE(cpuctx->task_ctx); in ctx_sched_out()
3280 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_out()
3282 cpuctx->task_ctx = NULL; in ctx_sched_out()
3427 if (!cpuctx->task_ctx) in perf_event_context_sched_out()
3563 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3566 pmu->sched_task(cpuctx->task_ctx, sched_in); in __perf_pmu_sched_task()
3569 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3583 if (cpuctx->task_ctx) in perf_pmu_sched_task()
3847 cpuctx->task_ctx = ctx; in ctx_sched_in()
3849 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_in()
3888 if (cpuctx->task_ctx == ctx) { in perf_event_context_sched_in()
3916 pmu->sched_task(cpuctx->task_ctx, true); in perf_event_context_sched_in()
4177 struct perf_event_context *task_ctx = NULL; in perf_rotate_context() local
4186 task_ctx = cpuctx->task_ctx; in perf_rotate_context()
4187 task_rotate = task_ctx ? task_ctx->rotate_necessary : 0; in perf_rotate_context()
4192 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4196 task_event = ctx_event_to_rotate(task_ctx); in perf_rotate_context()
4204 if (task_event || (task_ctx && cpu_event)) in perf_rotate_context()
4205 ctx_sched_out(task_ctx, cpuctx, EVENT_FLEXIBLE); in perf_rotate_context()
4210 rotate_ctx(task_ctx, task_event); in perf_rotate_context()
4214 perf_event_sched_in(cpuctx, task_ctx); in perf_rotate_context()
4217 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4388 if (ctx->task && cpuctx->task_ctx != ctx) in __perf_event_read()
7729 struct perf_event_context *task_ctx) in perf_iterate_sb() argument
7742 if (task_ctx) { in perf_iterate_sb()
7743 perf_iterate_ctx(task_ctx, output, data, false); in perf_iterate_sb()
7856 if (cpuctx->task_ctx) in __perf_pmu_output_stop()
7857 perf_iterate_ctx(cpuctx->task_ctx, __perf_event_output_stop, in __perf_pmu_output_stop()
7902 struct perf_event_context *task_ctx; member
7966 struct perf_event_context *task_ctx, in perf_event_task() argument
7978 .task_ctx = task_ctx, in perf_event_task()
7995 task_ctx); in perf_event_task()