Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\debug.c Create Date:2022-07-28 09:44:14
Last Modify:2020-03-17 13:39:02 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:proc_sched_show_task

Proto:void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns, struct seq_file *m)

Type:void

Parameter:

TypeParameterName
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", * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), 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 = Context switch counts: + nivcsw
885  P(nr_migrations)
887  If schedstat_enabled() Then
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  If nr_switches Then avg_atom = div64_ul(avg_atom, nr_switches)
921  Else avg_atom = -1LL
924  avg_per_cpu = sum_exec_runtime
925  If nr_migrations Then
928  Else
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) Context switch counts: )
939  This allows printing both to /proc/sched_debug and* to the console(m, "%-45s:%21Ld\n", "nr_involuntary_switches", (longlong)nivcsw)
942  P(weight)
943  P(runnable_weight)
955  P(policy)
956  P(prio)
957  If task_has_dl_policy(p) Then
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)