- printf("Mach Virtual Memory Statistics: ");
- printf("(page size of %d bytes, cache hits %u%%)\n",
- pageSize, percent);
- printf("%6s %6s %4s %4s %8s %8s %8s %8s %8s %8s\n",
- "free",
- "active",
- "inac",
- "wire",
- "faults",
- "copy",
- "zerofill",
- "reactive",
- "pageins",
- "pageout");
- bzero(&last, sizeof(last));
+ printf("Mach Virtual Memory Statistics: (page size of %llu bytes)\n", (mach_vm_size_t)vm_kernel_page_size);
+
+ sspstat("Pages free:", (uint64_t) (vm_stat.free_count - vm_stat.speculative_count));
+ sspstat("Pages active:", (uint64_t) (vm_stat.active_count));
+ sspstat("Pages inactive:", (uint64_t) (vm_stat.inactive_count));
+ sspstat("Pages speculative:", (uint64_t) (vm_stat.speculative_count));
+ sspstat("Pages throttled:", (uint64_t) (vm_stat.throttled_count));
+ sspstat("Pages wired down:", (uint64_t) (vm_stat.wire_count));
+ sspstat("Pages purgeable:", (uint64_t) (vm_stat.purgeable_count));
+ sspstat("\"Translation faults\":", (uint64_t) (vm_stat.faults));
+ sspstat("Pages copy-on-write:", (uint64_t) (vm_stat.cow_faults));
+ sspstat("Pages zero filled:", (uint64_t) (vm_stat.zero_fill_count));
+ sspstat("Pages reactivated:", (uint64_t) (vm_stat.reactivations));
+ sspstat("Pages purged:", (uint64_t) (vm_stat.purges));
+ sspstat("File-backed pages:", (uint64_t) (vm_stat.external_page_count));
+ sspstat("Anonymous pages:", (uint64_t) (vm_stat.internal_page_count));
+ sspstat("Pages stored in compressor:", (uint64_t) (vm_stat.total_uncompressed_pages_in_compressor));
+ sspstat("Pages occupied by compressor:", (uint64_t) (vm_stat.compressor_page_count));
+ sspstat("Decompressions:", (uint64_t) (vm_stat.decompressions));
+ sspstat("Compressions:", (uint64_t) (vm_stat.compressions));
+ sspstat("Pageins:", (uint64_t) (vm_stat.pageins));
+ sspstat("Pageouts:", (uint64_t) (vm_stat.pageouts));
+ sspstat("Swapins:", (uint64_t) (vm_stat.swapins));
+ sspstat("Swapouts:", (uint64_t) (vm_stat.swapouts));