函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_sched_wakeup.c Create Date:2022-07-27 13:16:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:probe_wakeup_sched_switch

函数原型:static void notrace probe_wakeup_sched_switch(void *ignore, bool preempt, struct task_struct *prev, struct task_struct *next)

返回类型:void

参数:

类型参数名称
void *ignore
boolpreempt
struct task_struct *prev
struct task_struct *next
441  Helpers to record a specific task information
443  如果此条件成立可能性小(为编译器优化)(!tracer_enabled)则返回
453  smp_rmb()
455  如果next不等于wakeup_task则返回
458  pc等于抢占计数值
461  cpu等于These macros fold the SMP functionality into a single CPU system()
462  disabled等于atomic_inc_return( & disabled)
463  如果此条件成立可能性大(为编译器优化)(disabled != 1)则转到:out
466  local_irq_save(flags)
467  r sched/core.c and kernel_lock.c: ( & wakeup_lock)
470  如果此条件成立可能性小(为编译器优化)(!tracer_enabled || next != wakeup_task)则转到:out_unlock
474  data等于per_cpu_ptr(data, wakeup_cpu)
476  __trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc)
477  tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc)
478  __trace_stack(wakeup_trace, flags, 0, pc)
480  T0等于preempt_timestamp
481  T1等于ftrace_now(cpu)
482  delta等于T1T0
484  如果非Should this new latency be reported/recorded?则转到:out_unlock
487  如果此条件成立可能性大(为编译器优化)(!is_tracing_stopped())则
488  max_latency等于delta
489  update_max_tr(wakeup_trace, wakeup_task, wakeup_cpu, NULL)
492  out_unlock :
493  __wakeup_reset(wakeup_trace)
494  arch_spin_unlock( & wakeup_lock)
495  local_irq_restore(flags)
496  out :
497  atomic_dec( & disabled)