Function report |
Source Code:kernel\events\core.c |
Create Date:2022-07-28 13:33:30 |
Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:perf_event_context_sched_out
Proto:static void perf_event_context_sched_out(struct task_struct *task, int ctxn, struct task_struct *next)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | task | |
int | ctxn | |
struct task_struct * | next |
3204 | ctx = perf_event_ctxp[ctxn] |
3208 | do_switch = 1 |
3210 | If Value is more likely to compile time(!ctx) Then Return |
3213 | cpuctx = __get_cpu_context(ctx) |
3214 | If Not task_ctx Then Return |
3218 | next_ctx = perf_event_ctxp[ctxn] |
3222 | parent = fetch RCU-protected pointer for dereferencing(These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor.) |
3223 | next_parent = fetch RCU-protected pointer for dereferencing(These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor.) |
3226 | If Not parent && Not next_parent Then Go to unlock |
3229 | If next_parent == ctx || next_ctx == parent || next_parent == parent Then |
3241 | If Test whether two contexts are equivalent, i Then |
3244 | WRITE_ONCE(task, next) |
3245 | WRITE_ONCE(task, task) |
3253 | If swap_task_ctx Then swap_task_ctx(ctx, next_ctx) |
3255 | Else swap - swap values of @a and @b*@a: first value*@b: second value(pmu specific data , pmu specific data ) |
3268 | do_switch = 0 |
3270 | perf_event_sync_stat(ctx, next_ctx) |
3275 | unlock : |
3278 | If do_switch Then |
3280 | task_ctx_sched_out(cpuctx, ctx, EVENT_ALL) |
Name | Describe |
---|---|
__perf_event_task_sched_out | Called from scheduler to remove the events of the current task,* with interrupts disabled |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |