Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kdb_bt

Proto:int kdb_bt(int argc, const char **argv)

Type:int

Parameter:

TypeParameterName
intargc
const char **argv
130  btaprompt = 1
136  kdbgetintenv - This function will return the value of an* integer-valued environment variable
138  If strcmp(argv[0], "bta") == 0 Then
141  mask = kdb_task_state_string(argc ? argv[1] : NULL)
143  If argc == 0 Then 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.
147  p = kdb_curr_task(cpu)
153  If KDB_FLAG(CMD_INTERRUPT) Then Return 0
159  kdb_while_each_thread(g, p)
160  Else if strcmp(argv[0], "btp") == 0 Then
163  If argc != 1 Then Return KDB_ARGCOUNT
165  diag = kdbgetularg - This function will convert a numeric string into an* unsigned long value.* Parameters:* arg A character string representing a numeric value* Outputs:* *value the unsigned long represntation of arg.* Returns:
166  If diag Then Return diag
168  p = Must be called under rcu_read_lock().
169  If p Then
173  kdb_printf("No process with pid == %ld found\n", pid)
174  Return 0
175  Else if strcmp(argv[0], "btt") == 0 Then
176  If argc != 1 Then Return KDB_ARGCOUNT
178  diag = kdbgetularg - This function will convert a numeric string into an* unsigned long value.* Parameters:* arg A character string representing a numeric value* Outputs:* *value the unsigned long represntation of arg.* Returns:
179  If diag Then Return diag
181  kdb_set_current_task((structtask_struct * )addr)
182  Return kdb_bt* This function implements the 'bt' command
183  Else if strcmp(argv[0], "btc") == 0 Then
184  cpu = ~0
185  save_current_task = kdb_current_task
186  If argc > 1 Then Return KDB_ARGCOUNT
188  If argc == 1 Then
190  If diag Then Return diag
193  If cpu != ~0 Then
194  kdb_bt_cpu(cpu)
195  Else
200  argv = NULL
201  kdb_printf("btc: cpu status: ")
202  kdb_parse("cpu\n")
209  Return 0
210  Else
211  If argc Then
212  nextarg = 1
215  If diag Then Return diag
218  Return 0
219  Else
225  Return 0