Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The user may not realize that ps/bta with no parameters does not print idle* or sleeping system daemon processes, so tell them how many were suppressed.

Proto:void kdb_ps_suppressed(void)

Type:void

Parameter:Nothing

2288  idle = 0 , daemon = 0
2289  mask_I = kdb_task_state_string("I") , mask_M = kdb_task_state_string("M")
2293  for_each_online_cpu(cpu)
2294  p = kdb_curr_task(cpu)
2295  If kdb_task_state(p, mask_I) Then ++idle
2298  Simplify coexistence with NPTL (g, p)
2299  If kdb_task_state(p, mask_M) Then ++daemon
2301  kdb_while_each_thread(g, p)
2302  If idle || daemon Then
2303  If idle Then kdb_printf("%d idle process%s (state I)%s\n", idle, idle == 1 ? "" : "es", daemon ? " and " : "")
2307  If daemon Then kdb_printf("%d sleeping system daemon (state M) process%s", daemon, daemon == 1 ? "" : "es")
2311  kdb_printf(" suppressed,\nuse 'ps A' to see all.\n")
Caller
NameDescribe
kdb_ps
kdb_bt