Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_sched_wakeup.c Create Date:2022-07-28 12:10:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:probe_wakeup_sched_switch

Proto:static void notrace probe_wakeup_sched_switch(void *ignore, bool preempt, struct task_struct *prev, struct task_struct *next)

Type:void

Parameter:

TypeParameterName
void *ignore
boolpreempt
struct task_struct *prev
struct task_struct *next
441  Helpers to record a specific task information
443  If Value for the false possibility is greater at compile time(!tracer_enabled) Then Return
453  smp_rmb()
455  If next != wakeup_task Then Return
458  pc = We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt.
461  cpu = These macros fold the SMP functionality into a single CPU system()
462  disabled = atomic_inc_return( & disabled)
463  If Value is more likely to compile time(disabled != 1) Then Go to out
466  local_irq_save(flags)
467  r sched/core.c and kernel_lock.c: ( & wakeup_lock)
470  If Value for the false possibility is greater at compile time(!tracer_enabled || next != wakeup_task) Then Go to 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 = T1 - T0
484  If Not Should this new latency be reported/recorded? Then Go to out_unlock
487  If Value is more likely to compile time(!is_tracing_stopped()) Then
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)