Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\locktorture.c Create Date:2022-07-28 09:54:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Create an lock-torture-statistics message in the specified buffer.

Proto:static void __torture_print_stats(char *page, struct lock_stress_stats *statp, bool write)

Type:void

Parameter:

TypeParameterName
char *page
struct lock_stress_stats *statp
boolwrite
689  fail = 0
691  max = 0 , min = If statp Then n_lock_acquired Else 0
692  sum = 0
694  n_stress = If write Then nrealwriters_stress Else nrealreaders_stress
695  When i < n_stress cycle
696  If n_lock_fail Then fail = true
698  sum += n_lock_acquired
699  If max < n_lock_fail Then max = n_lock_fail
701  If min > n_lock_fail Then min = n_lock_fail
704  page += sprintf(page, "%s: Total: %lld Max/Min: %ld/%ld %s Fail: %d %s\n", write ? "Writes" : "Reads ", sum, max, min, max / 2 > min ? "???" : "", fail, fail ? "!!!" : "")
709  If fail Then atomic_inc( & n_lock_torture_errors)
Caller
NameDescribe
lock_torture_stats_printPrint torture statistics