函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_bucket_stats

函数原型:static void test_bucket_stats(struct rhashtable *ht, unsigned int entries)

返回类型:void

参数:

类型参数名称
struct rhashtable *ht
unsigned intentries
177  total等于0, chain_len等于0
181  hashtable_walk_enter - Initialise an iterator*@ht: Table to walk over*@iter: Hash table Iterator* This function prepares a hash table walk.* Note that if you restart a walk after rhashtable_walk_stop you* may see the same object twice
182  rhashtable_walk_start( & hti)
184 pos等于hashtable_walk_next - Return the next object and advance the iterator*@iter: Hash table iterator* Note that you must call rhashtable_walk_stop when you are finished* with the walk.* Returns the next object or NULL when the end of the table is reached.循环
185  如果错误恒等于负EAGAIN
186  打印信息("Info: encountered resize\n")
187  chain_len自加
188  继续下一循环
189  否则如果是错误
190  打印警告信息("Test failed: rhashtable_walk_next() error: %ld\n", 错误)
192  退出
195  total自加
198  哈希表作用完成
199  释放迭代器
201  打印信息(" Traversal complete: counted=%u, nelems=%u, entries=%d, table-jumps=%u\n", total, atomic_read( & nelems), entries, chain_len)
204  如果total不等于atomic_read( & nelems)或total不等于entries打印警告信息("Test failed: Total count mismatch ^^^")
调用者
名称描述
test_rhashtable