diff --git a/proc/slab.c b/proc/slab.c index aa7299cf..6736f0c8 100644 --- a/proc/slab.c +++ b/proc/slab.c @@ -89,9 +89,35 @@ void free_slabinfo(struct slab_info *list) } } -/* - * parse_slabinfo20 - actual parse routine for slabinfo 2.0 (2.6 kernels) - */ +// parse_slabinfo20 - actual parse routine for slabinfo 2.x (2.6 kernels) +// Note: difference between 2.0 and 2.1 is in the ": globalstat" part where version 2.1 +// has extra column . We don't use ": globalstat" part in both versions. +// +// Formats (we don't use "statistics" extensions) +// +// slabinfo - version: 2.1 +// # name \ +// : tunables \ +// : slabdata +// +// slabinfo - version: 2.1 (statistics) +// # name \ +// : tunables \ +// : slabdata \ +// : globalstat \ +// : cpustat +// +// slabinfo - version: 2.0 +// # name \ +// : tunables \ +// : slabdata +// +// slabinfo - version: 2.0 (statistics) +// # name \ +// : tunables \ +// : slabdata \ +// : globalstat \ +// : cpustat static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats, FILE *f) {