Lines Matching refs:task_ctx
186 return this_cpu_ptr(&perf_cpu_context)->task_ctx; in perf_cpu_task_ctx()
223 struct perf_event_context *task_ctx = cpuctx->task_ctx; in event_function() local
228 perf_ctx_lock(cpuctx, task_ctx); in event_function()
251 WARN_ON_ONCE(task_ctx != ctx); in event_function()
258 perf_ctx_unlock(cpuctx, task_ctx); in event_function()
321 struct perf_event_context *task_ctx = NULL; in event_function_local() local
329 task_ctx = ctx; in event_function_local()
332 perf_ctx_lock(cpuctx, task_ctx); in event_function_local()
348 if (WARN_ON_ONCE(cpuctx->task_ctx != ctx)) in event_function_local()
357 perf_ctx_unlock(cpuctx, task_ctx); in event_function_local()
865 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
883 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_cgroup_switch()
2389 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in __perf_remove_from_context()
2390 cpuctx->task_ctx = NULL; in __perf_remove_from_context()
2663 if (!cpuctx->task_ctx) in task_ctx_sched_out()
2666 if (WARN_ON_ONCE(ctx != cpuctx->task_ctx)) in task_ctx_sched_out()
2704 struct perf_event_context *task_ctx, in ctx_resched() argument
2719 if (task_ctx) { in ctx_resched()
2720 perf_ctx_disable(task_ctx, false); in ctx_resched()
2721 task_ctx_sched_out(task_ctx, event_type); in ctx_resched()
2736 perf_event_sched_in(cpuctx, task_ctx); in ctx_resched()
2739 if (task_ctx) in ctx_resched()
2740 perf_ctx_enable(task_ctx, false); in ctx_resched()
2746 struct perf_event_context *task_ctx = cpuctx->task_ctx; in perf_pmu_resched() local
2748 perf_ctx_lock(cpuctx, task_ctx); in perf_pmu_resched()
2749 ctx_resched(cpuctx, task_ctx, EVENT_ALL|EVENT_CPU); in perf_pmu_resched()
2750 perf_ctx_unlock(cpuctx, task_ctx); in perf_pmu_resched()
2764 struct perf_event_context *task_ctx = cpuctx->task_ctx; in __perf_install_in_context() local
2771 task_ctx = ctx; in __perf_install_in_context()
2787 WARN_ON_ONCE(reprogram && cpuctx->task_ctx && cpuctx->task_ctx != ctx); in __perf_install_in_context()
2788 } else if (task_ctx) { in __perf_install_in_context()
2789 raw_spin_lock(&task_ctx->lock); in __perf_install_in_context()
2807 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_install_in_context()
2813 perf_ctx_unlock(cpuctx, task_ctx); in __perf_install_in_context()
2944 struct perf_event_context *task_ctx; in __perf_event_enable() local
2973 task_ctx = cpuctx->task_ctx; in __perf_event_enable()
2975 WARN_ON_ONCE(task_ctx != ctx); in __perf_event_enable()
2977 ctx_resched(cpuctx, task_ctx, get_event_type(event)); in __perf_event_enable()
3297 WARN_ON_ONCE(cpuctx->task_ctx); in ctx_sched_out()
3327 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_out()
3329 cpuctx->task_ctx = NULL; in ctx_sched_out()
3629 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3635 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in __perf_pmu_sched_task()
3646 if (prev == next || cpuctx->task_ctx) in perf_pmu_sched_task()
3921 cpuctx->task_ctx = ctx; in ctx_sched_in()
3923 WARN_ON_ONCE(cpuctx->task_ctx != ctx); in ctx_sched_in()
3950 if (cpuctx->task_ctx == ctx) { in perf_event_context_sched_in()
3985 perf_ctx_sched_task_cb(cpuctx->task_ctx, true); in perf_event_context_sched_in()
4287 perf_ctx_lock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4318 perf_ctx_unlock(cpuctx, cpuctx->task_ctx); in perf_rotate_context()
4491 if (ctx->task && cpuctx->task_ctx != ctx) in __perf_event_read()
7984 struct perf_event_context *task_ctx) in perf_iterate_sb() argument
7996 if (task_ctx) { in perf_iterate_sb()
7997 perf_iterate_ctx(task_ctx, output, data, false); in perf_iterate_sb()
8104 if (cpuctx->task_ctx) in __perf_pmu_output_stop()
8105 perf_iterate_ctx(cpuctx->task_ctx, __perf_event_output_stop, in __perf_pmu_output_stop()
8150 struct perf_event_context *task_ctx; member
8214 struct perf_event_context *task_ctx, in perf_event_task() argument
8226 .task_ctx = task_ctx, in perf_event_task()
8243 task_ctx); in perf_event_task()