函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\debug.c Create Date:2022-07-27 10:44:40
Last Modify:2020-03-17 13:39:02 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:proc_sched_show_task

函数原型:void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns, struct seq_file *m)

返回类型:void

参数:

类型参数名称
struct task_struct *p
struct pid_namespace *ns
struct seq_file *m
861  This allows printing both to /proc/sched_debug and* to the console(m, "%s (%d, #threads: %d)\n", 是否使用FPU, task_pid_nr_ns(p, ns), get_nr_threads(p))
863  This allows printing both to /proc/sched_debug and* to the console(m, "-------------------------------------------------------------------\n")
879  PN(exec_start)
880  PN(vruntime)
881  PN(sum_exec_runtime)
883  nr_switches等于切换计数上下文切换计数
885  P(nr_migrations)
887  如果schedstat_enabled()则
890  PN_SCHEDSTAT(sum_sleep_runtime)
891  PN_SCHEDSTAT(wait_start)
892  PN_SCHEDSTAT(sleep_start)
893  PN_SCHEDSTAT(block_start)
894  PN_SCHEDSTAT(sleep_max)
895  PN_SCHEDSTAT(block_max)
896  PN_SCHEDSTAT(exec_max)
897  PN_SCHEDSTAT(slice_max)
898  PN_SCHEDSTAT(wait_max)
899  PN_SCHEDSTAT(wait_sum)
900  P_SCHEDSTAT(wait_count)
901  PN_SCHEDSTAT(iowait_sum)
902  P_SCHEDSTAT(iowait_count)
903  P_SCHEDSTAT(nr_migrations_cold)
904  P_SCHEDSTAT(nr_failed_migrations_affine)
905  P_SCHEDSTAT(nr_failed_migrations_running)
906  P_SCHEDSTAT(nr_failed_migrations_hot)
907  P_SCHEDSTAT(nr_forced_migrations)
908  P_SCHEDSTAT(nr_wakeups)
909  P_SCHEDSTAT(nr_wakeups_sync)
910  P_SCHEDSTAT(nr_wakeups_migrate)
911  P_SCHEDSTAT(nr_wakeups_local)
912  P_SCHEDSTAT(nr_wakeups_remote)
913  P_SCHEDSTAT(nr_wakeups_affine)
914  P_SCHEDSTAT(nr_wakeups_affine_attempts)
915  P_SCHEDSTAT(nr_wakeups_passive)
916  P_SCHEDSTAT(nr_wakeups_idle)
918  avg_atom等于sum_exec_runtime
919  如果nr_switchesavg_atom等于div64_ul(avg_atom, nr_switches)
921  否则avg_atom等于负1LL
924  avg_per_cpu等于sum_exec_runtime
925  如果nr_migrations
928  否则
929  avg_per_cpu等于负1LL
932  __PN(avg_atom)
933  __PN(avg_per_cpu)
936  __P(nr_switches)
937  This allows printing both to /proc/sched_debug and* to the console(m, "%-45s:%21Ld\n", "nr_voluntary_switches", (longlong)切换计数)
939  This allows printing both to /proc/sched_debug and* to the console(m, "%-45s:%21Ld\n", "nr_involuntary_switches", (longlong)上下文切换计数)
942  P(weight)
943  P(runnable_weight)
955  P(policy)
956  P(prio)
957  如果task_has_dl_policy(p)则
958  P(runtime)
959  P(deadline)
969  this_cpu等于These macros fold the SMP functionality into a single CPU system()
972  t0等于cpu_clock(this_cpu)
973  t1等于cpu_clock(this_cpu)
974  This allows printing both to /proc/sched_debug and* to the console(m, "%-45s:%21Ld\n", "clock-delta", (longlong)(t1 - t0))
978  sched_show_numa(p, m)