函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-27 12:48:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:debug_kusage

函数原型:void debug_kusage(void)

返回类型:void

参数:

872  debug_kusage_one_time等于1
874  如果非get_dap_lock()则
875  __release(Locking is awkward. The debug code is called from all contexts,* including non maskable interrupts. A normal spinlock is not safe* in NMI context. Try to get the debug allocator lock, if it cannot* be obtained after a second then give up)
876  返回
878  h_free等于debug_alloc_pooldah_first
879  如果dah_first恒等于0且size恒等于debug_alloc_pool_aligned的长度减dah_overheaddah_first_call的值则转到:out
883  如果非debug_kusage_one_time则转到:out
885  debug_kusage_one_time等于0
886  kdb_printf("%s: debug_kmalloc memory leak dah_first %d\n", __func__, dah_first)
888  如果dah_first
889  h_used等于debug_alloc_pool
890  kdb_printf("%s: h_used %px size %d\n", __func__, h_used, size)
893  循环
894  h_used等于h_freedah_overheadsize
896  kdb_printf("%s: h_used %px size %d caller %px\n", __func__, h_used, size, caller)
898  h_free等于debug_alloc_poolffset of next header from start of pool
900 ffset of next header from start of pool 循环
901  h_used等于h_freedah_overheadsize
903  如果h_useddebug_alloc_pool不等于debug_alloc_pool_aligned的长度则kdb_printf("%s: h_used %px size %d caller %px\n", __func__, h_used, size, caller)
907  out :
908  自旋锁解锁