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:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:probe_wakeup

Proto:static void probe_wakeup(void *ignore, struct task_struct *p)

Type:void

Parameter:

TypeParameterName
void *ignore
struct task_struct *p
529  cpu = smp_processor_id()
534  If Value is more likely to compile time(!tracer_enabled) Then Return
537  Helpers to record a specific task information
538  Helpers to record a specific task information
548  If tracing_dl || wakeup_dl && Not dl_task(p) || wakeup_rt && Not dl_task(p) && Not rt_task(p) || Not dl_task(p) && ( prio >= wakeup_prio || prio >= prio ) Then Return
553  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.
554  disabled = atomic_inc_return( & disabled)
555  If Value for the false possibility is greater at compile time(disabled != 1) Then Go to out
559  r sched/core.c and kernel_lock.c: ( & wakeup_lock)
562  If Not tracer_enabled || tracing_dl || Not dl_task(p) && prio >= wakeup_prio Then Go to out_locked
567  __wakeup_reset(wakeup_trace)
569  wakeup_cpu = task_cpu(p)
570  wakeup_current_cpu = wakeup_cpu
571  wakeup_prio = prio
577  If dl_task(p) Then tracing_dl = 1
579  Else tracing_dl = 0
582  wakeup_task = get_task_struct(p)
584  local_save_flags(flags)
586  data = per_cpu_ptr(data, wakeup_cpu)
587  preempt_timestamp = ftrace_now(cpu)
588  tracing_sched_wakeup_trace(wakeup_trace, p, current process, flags, pc)
589  __trace_stack(wakeup_trace, flags, 0, pc)
596  __trace_function(wakeup_trace, CALLER_ADDR1, CALLER_ADDR2, flags, pc)
598  out_locked :
599  arch_spin_unlock( & wakeup_lock)
600  out :
601  atomic_dec( & disabled)