diff options
Diffstat (limited to 'Documentation/vm/slabinfo.c')
-rw-r--r-- | Documentation/vm/slabinfo.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 686a8e04a4f3..d4f21ffd1404 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c | |||
@@ -242,6 +242,9 @@ void decode_numa_list(int *numa, char *t) | |||
242 | 242 | ||
243 | memset(numa, 0, MAX_NODES * sizeof(int)); | 243 | memset(numa, 0, MAX_NODES * sizeof(int)); |
244 | 244 | ||
245 | if (!t) | ||
246 | return; | ||
247 | |||
245 | while (*t == 'N') { | 248 | while (*t == 'N') { |
246 | t++; | 249 | t++; |
247 | node = strtoul(t, &t, 10); | 250 | node = strtoul(t, &t, 10); |
@@ -259,11 +262,17 @@ void decode_numa_list(int *numa, char *t) | |||
259 | 262 | ||
260 | void slab_validate(struct slabinfo *s) | 263 | void slab_validate(struct slabinfo *s) |
261 | { | 264 | { |
265 | if (strcmp(s->name, "*") == 0) | ||
266 | return; | ||
267 | |||
262 | set_obj(s, "validate", 1); | 268 | set_obj(s, "validate", 1); |
263 | } | 269 | } |
264 | 270 | ||
265 | void slab_shrink(struct slabinfo *s) | 271 | void slab_shrink(struct slabinfo *s) |
266 | { | 272 | { |
273 | if (strcmp(s->name, "*") == 0) | ||
274 | return; | ||
275 | |||
267 | set_obj(s, "shrink", 1); | 276 | set_obj(s, "shrink", 1); |
268 | } | 277 | } |
269 | 278 | ||
@@ -386,7 +395,9 @@ void report(struct slabinfo *s) | |||
386 | { | 395 | { |
387 | if (strcmp(s->name, "*") == 0) | 396 | if (strcmp(s->name, "*") == 0) |
388 | return; | 397 | return; |
389 | printf("\nSlabcache: %-20s Aliases: %2d Order : %2d\n", s->name, s->aliases, s->order); | 398 | |
399 | printf("\nSlabcache: %-20s Aliases: %2d Order : %2d Objects: %d\n", | ||
400 | s->name, s->aliases, s->order, s->objects); | ||
390 | if (s->hwcache_align) | 401 | if (s->hwcache_align) |
391 | printf("** Hardware cacheline aligned\n"); | 402 | printf("** Hardware cacheline aligned\n"); |
392 | if (s->cache_dma) | 403 | if (s->cache_dma) |
@@ -545,6 +556,9 @@ int slab_empty(struct slabinfo *s) | |||
545 | 556 | ||
546 | void slab_debug(struct slabinfo *s) | 557 | void slab_debug(struct slabinfo *s) |
547 | { | 558 | { |
559 | if (strcmp(s->name, "*") == 0) | ||
560 | return; | ||
561 | |||
548 | if (sanity && !s->sanity_checks) { | 562 | if (sanity && !s->sanity_checks) { |
549 | set_obj(s, "sanity", 1); | 563 | set_obj(s, "sanity", 1); |
550 | } | 564 | } |
@@ -791,11 +805,11 @@ void totals(void) | |||
791 | 805 | ||
792 | store_size(b1, total_size);store_size(b2, total_waste); | 806 | store_size(b1, total_size);store_size(b2, total_waste); |
793 | store_size(b3, total_waste * 100 / total_used); | 807 | store_size(b3, total_waste * 100 / total_used); |
794 | printf("Memory used: %6s # Loss : %6s MRatio: %6s%%\n", b1, b2, b3); | 808 | printf("Memory used: %6s # Loss : %6s MRatio:%6s%%\n", b1, b2, b3); |
795 | 809 | ||
796 | store_size(b1, total_objects);store_size(b2, total_partobj); | 810 | store_size(b1, total_objects);store_size(b2, total_partobj); |
797 | store_size(b3, total_partobj * 100 / total_objects); | 811 | store_size(b3, total_partobj * 100 / total_objects); |
798 | printf("# Objects : %6s # PartObj: %6s ORatio: %6s%%\n", b1, b2, b3); | 812 | printf("# Objects : %6s # PartObj: %6s ORatio:%6s%%\n", b1, b2, b3); |
799 | 813 | ||
800 | printf("\n"); | 814 | printf("\n"); |
801 | printf("Per Cache Average Min Max Total\n"); | 815 | printf("Per Cache Average Min Max Total\n"); |
@@ -818,7 +832,7 @@ void totals(void) | |||
818 | store_size(b1, avg_ppart);store_size(b2, min_ppart); | 832 | store_size(b1, avg_ppart);store_size(b2, min_ppart); |
819 | store_size(b3, max_ppart); | 833 | store_size(b3, max_ppart); |
820 | store_size(b4, total_partial * 100 / total_slabs); | 834 | store_size(b4, total_partial * 100 / total_slabs); |
821 | printf("%%PartSlab %10s%% %10s%% %10s%% %10s%%\n", | 835 | printf("%%PartSlab%10s%% %10s%% %10s%% %10s%%\n", |
822 | b1, b2, b3, b4); | 836 | b1, b2, b3, b4); |
823 | 837 | ||
824 | store_size(b1, avg_partobj);store_size(b2, min_partobj); | 838 | store_size(b1, avg_partobj);store_size(b2, min_partobj); |
@@ -830,7 +844,7 @@ void totals(void) | |||
830 | store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj); | 844 | store_size(b1, avg_ppartobj);store_size(b2, min_ppartobj); |
831 | store_size(b3, max_ppartobj); | 845 | store_size(b3, max_ppartobj); |
832 | store_size(b4, total_partobj * 100 / total_objects); | 846 | store_size(b4, total_partobj * 100 / total_objects); |
833 | printf("%% PartObj %10s%% %10s%% %10s%% %10s%%\n", | 847 | printf("%% PartObj%10s%% %10s%% %10s%% %10s%%\n", |
834 | b1, b2, b3, b4); | 848 | b1, b2, b3, b4); |
835 | 849 | ||
836 | store_size(b1, avg_size);store_size(b2, min_size); | 850 | store_size(b1, avg_size);store_size(b2, min_size); |
@@ -1100,6 +1114,8 @@ void output_slabs(void) | |||
1100 | ops(slab); | 1114 | ops(slab); |
1101 | else if (show_slab) | 1115 | else if (show_slab) |
1102 | slabcache(slab); | 1116 | slabcache(slab); |
1117 | else if (show_report) | ||
1118 | report(slab); | ||
1103 | } | 1119 | } |
1104 | } | 1120 | } |
1105 | 1121 | ||