c1044da3b7
Adds two new sort modes that target the VFS-level byte counts
exposed by /proc/[pid]/io:rchar and wchar. These differ from
the existing read_bytes/write_bytes:
read_bytes: storage-level bytes that hit the disk
rchar: VFS-level bytes (includes cache hits, tty output)
Useful for the 'is this proc doing lots of syscalls?' question
that read_bytes misses (cache-served reads count toward rchar
but not read_bytes).
- New fields on ProcessInfo: io_rchar_kb: u64, io_wchar_kb: u64
(u64, not Option: rchar/wchar default to 0 if absent on
very old kernels, never sentinel-needed)
- read_io_file() now returns a 4-tuple
(read_bytes, write_bytes, rchar, wchar) instead of 2-tuple
- New SortMode variants RChar and WChar
- cycle: Rss -> Cpu -> Io -> ... -> IoWriteRate -> RChar
-> WChar -> VSize -> Pid -> Name -> Rss
- name(): 'RChr' and 'WChr'
- sort(): descending by io_rchar_kb / io_wchar_kb
- Column-swap: when sort is RChar, MEM column shows RChr value;
when WChar, shows WChr. Default and other modes use RSS.
Test count 123 -> 125 (+2):
- sort_by_rchar_descending (VFS reads, pid 2 with 5000 first)
- sort_by_wchar_descending (VFS writes, pid 1 with 999_999 first)
- sort_cycle and io_name_is_io updated for RChar/WChar
Redox stripped binary: 4,225,896 bytes (+12 KiB from v1.32).
Compile warnings: 55 (unchanged).