@@ -85,9 +85,9 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = {
85
85
[OOM ] = { .name = "OOM" , .title = " OOM " , .description = "OOM (Out-of-Memory) killer score" , .flags = PROCESS_FLAG_LINUX_OOM , .defaultSortDesc = true, },
86
86
[IO_PRIORITY ] = { .name = "IO_PRIORITY" , .title = "IO " , .description = "I/O priority" , .flags = PROCESS_FLAG_LINUX_IOPRIO , },
87
87
#ifdef HAVE_DELAYACCT
88
- [PERCENT_CPU_DELAY ] = { .name = "PERCENT_CPU_DELAY" , .title = "CPUD% " , .description = "CPU delay %" , .flags = PROCESS_FLAG_LINUX_DELAYACCT , .defaultSortDesc = true, },
88
+ [PERCENT_CPU_DELAY ] = { .name = "PERCENT_CPU_DELAY" , .title = "CPUD%" , .description = "CPU delay %" , .flags = PROCESS_FLAG_LINUX_DELAYACCT , .defaultSortDesc = true, },
89
89
[PERCENT_IO_DELAY ] = { .name = "PERCENT_IO_DELAY" , .title = "IOD% " , .description = "Block I/O delay %" , .flags = PROCESS_FLAG_LINUX_DELAYACCT , .defaultSortDesc = true, },
90
- [PERCENT_SWAP_DELAY ] = { .name = "PERCENT_SWAP_DELAY" , .title = "SWAPD% " , .description = "Swapin delay %" , .flags = PROCESS_FLAG_LINUX_DELAYACCT , .defaultSortDesc = true, },
90
+ [PERCENT_SWAP_DELAY ] = { .name = "PERCENT_SWAP_DELAY" , .title = "SWPD% " , .description = "Swapin delay %" , .flags = PROCESS_FLAG_LINUX_DELAYACCT , .defaultSortDesc = true, },
91
91
#endif
92
92
[M_PSS ] = { .name = "M_PSS" , .title = " PSS " , .description = "proportional set size, same as M_RESIDENT but each page is divided by the number of processes sharing it" , .flags = PROCESS_FLAG_LINUX_SMAPS , .defaultSortDesc = true, },
93
93
[M_SWAP ] = { .name = "M_SWAP" , .title = " SWAP " , .description = "Size of the process's swapped pages" , .flags = PROCESS_FLAG_LINUX_SMAPS , .defaultSortDesc = true, },
@@ -189,20 +189,6 @@ bool LinuxProcess_changeAutogroupPriorityBy(Process* this, Arg delta) {
189
189
return success ;
190
190
}
191
191
192
- #ifdef HAVE_DELAYACCT
193
- static void LinuxProcess_printDelay (float delay_percent , char * buffer , int n , int * attr ) {
194
- if (isnan (delay_percent )) {
195
- xSnprintf (buffer , n , " N/A " );
196
- * attr = CRT_colors [PROCESS_SHADOW ];
197
- } else {
198
- xSnprintf (buffer , n , "%4.1f " , delay_percent );
199
- if (delay_percent < 0.05 ) {
200
- * attr = CRT_colors [PROCESS_SHADOW ];
201
- }
202
- }
203
- }
204
- #endif
205
-
206
192
static void LinuxProcess_writeField (const Process * this , RichString * str , ProcessField field ) {
207
193
const LinuxProcess * lp = (const LinuxProcess * ) this ;
208
194
bool coloring = this -> settings -> highlightMegabytes ;
@@ -281,9 +267,9 @@ static void LinuxProcess_writeField(const Process* this, RichString* str, Proces
281
267
break ;
282
268
}
283
269
#ifdef HAVE_DELAYACCT
284
- case PERCENT_CPU_DELAY : LinuxProcess_printDelay (lp -> cpu_delay_percent , buffer , n , & attr ); break ;
285
- case PERCENT_IO_DELAY : LinuxProcess_printDelay (lp -> blkio_delay_percent , buffer , n , & attr ); break ;
286
- case PERCENT_SWAP_DELAY : LinuxProcess_printDelay (lp -> swapin_delay_percent , buffer , n , & attr ); break ;
270
+ case PERCENT_CPU_DELAY : Process_printPercentage (lp -> cpu_delay_percent , buffer , n , & attr ); break ;
271
+ case PERCENT_IO_DELAY : Process_printPercentage (lp -> blkio_delay_percent , buffer , n , & attr ); break ;
272
+ case PERCENT_SWAP_DELAY : Process_printPercentage (lp -> swapin_delay_percent , buffer , n , & attr ); break ;
287
273
#endif
288
274
case CTXT :
289
275
if (lp -> ctxt_diff > 1000 ) {
0 commit comments