Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
char * | page | |
struct lock_stress_stats * | statp | |
bool | write |
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 |
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) |
Name | Describe |
---|---|
lock_torture_stats_print | Print torture statistics |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |