summaryrefslogtreecommitdiff
path: root/tools/vm
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2012-11-14 18:15:32 +0000
committerJames Simmons <jsimmons@infradead.org>2012-11-14 18:15:32 +0000
commitb44959f2817032bc4668434bbe1cf9ab28b8cb21 (patch)
treede3bd861b36c836ac9b7b6e8dc179ca1985b6593 /tools/vm
parente22956a2faa9cf34cec4a471131d50c6be75b0c2 (diff)
parent2216c9e74fb3baac3cb73952158dbe38b703997e (diff)
Merge branch 'drm-core-next'HEADmaster
Conflicts: drivers/gpu/drm/tdfx/tdfx_drv.c
Diffstat (limited to 'tools/vm')
-rw-r--r--tools/vm/slabinfo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
index 164cbcf6110..808d5a9d5dc 100644
--- a/tools/vm/slabinfo.c
+++ b/tools/vm/slabinfo.c
@@ -437,34 +437,34 @@ static void slab_stats(struct slabinfo *s)
printf("Fastpath %8lu %8lu %3lu %3lu\n",
s->alloc_fastpath, s->free_fastpath,
s->alloc_fastpath * 100 / total_alloc,
- s->free_fastpath * 100 / total_free);
+ total_free ? s->free_fastpath * 100 / total_free : 0);
printf("Slowpath %8lu %8lu %3lu %3lu\n",
total_alloc - s->alloc_fastpath, s->free_slowpath,
(total_alloc - s->alloc_fastpath) * 100 / total_alloc,
- s->free_slowpath * 100 / total_free);
+ total_free ? s->free_slowpath * 100 / total_free : 0);
printf("Page Alloc %8lu %8lu %3lu %3lu\n",
s->alloc_slab, s->free_slab,
s->alloc_slab * 100 / total_alloc,
- s->free_slab * 100 / total_free);
+ total_free ? s->free_slab * 100 / total_free : 0);
printf("Add partial %8lu %8lu %3lu %3lu\n",
s->deactivate_to_head + s->deactivate_to_tail,
s->free_add_partial,
(s->deactivate_to_head + s->deactivate_to_tail) * 100 / total_alloc,
- s->free_add_partial * 100 / total_free);
+ total_free ? s->free_add_partial * 100 / total_free : 0);
printf("Remove partial %8lu %8lu %3lu %3lu\n",
s->alloc_from_partial, s->free_remove_partial,
s->alloc_from_partial * 100 / total_alloc,
- s->free_remove_partial * 100 / total_free);
+ total_free ? s->free_remove_partial * 100 / total_free : 0);
printf("Cpu partial list %8lu %8lu %3lu %3lu\n",
s->cpu_partial_alloc, s->cpu_partial_free,
s->cpu_partial_alloc * 100 / total_alloc,
- s->cpu_partial_free * 100 / total_free);
+ total_free ? s->cpu_partial_free * 100 / total_free : 0);
printf("RemoteObj/SlabFrozen %8lu %8lu %3lu %3lu\n",
s->deactivate_remote_frees, s->free_frozen,
s->deactivate_remote_frees * 100 / total_alloc,
- s->free_frozen * 100 / total_free);
+ total_free ? s->free_frozen * 100 / total_free : 0);
printf("Total %8lu %8lu\n\n", total_alloc, total_free);