+ lseek(mf, (long)nl[X_NCHSTATS].n_value, 0);
+ read(mf, &nchstats, sizeof nchstats);
+ nchtotal = nchstats.ncs_goodhits + nchstats.ncs_badhits +
+ nchstats.ncs_falsehits + nchstats.ncs_miss + nchstats.ncs_long;
+ printf("%9d total name lookups", nchtotal);
+ printf(" (cache hits %d%% system %d%% per-process)\n",
+ nchstats.ncs_goodhits * 100 / nz(nchtotal),
+ nchstats.ncs_pass2 * 100 / nz(nchtotal));
+ printf("%9s badhits %d, falsehits %d, toolong %d\n", "",
+ nchstats.ncs_badhits, nchstats.ncs_falsehits, nchstats.ncs_long);
+ lseek(mf, (long)nl[X_XSTATS].n_value, 0);
+ read(mf, &xstats, sizeof xstats);
+ printf("%9d total calls to xalloc (cache hits %d%%)\n",
+ xstats.alloc, xstats.alloc_cachehit * 100 / nz(xstats.alloc));
+ printf("%9s sticky %d flushed %d unused %d\n", "",
+ xstats.alloc_inuse, xstats.alloc_cacheflush, xstats.alloc_unused);
+ printf("%9d total calls to xfree", xstats.free);
+ printf(" (sticky %d cached %d swapped %d)\n",
+ xstats.free_inuse, xstats.free_cache, xstats.free_cacheswap);
+#if defined(tahoe)
+ lseek(mf, (long)nl[X_CKEYSTATS].n_value, 0);
+ read(mf, &keystats, sizeof keystats);
+ printf("%9d %s (free %d%% norefs %d%% taken %d%% shared %d%%)\n",
+ keystats.ks_allocs, "code cache keys allocated",
+ keystats.ks_free * 100 / nz(keystats.ks_allocs),
+ keystats.ks_norefs * 100 / nz(keystats.ks_allocs),
+ keystats.ks_taken * 100 / nz(keystats.ks_allocs),
+ keystats.ks_shared * 100 / nz(keystats.ks_allocs));
+ lseek(mf, (long)nl[X_DKEYSTATS].n_value, 0);
+ read(mf, &keystats, sizeof keystats);
+ printf("%9d %s (free %d%% norefs %d%% taken %d%% shared %d%%)\n",
+ keystats.ks_allocs, "data cache keys allocated",
+ keystats.ks_free * 100 / nz(keystats.ks_allocs),
+ keystats.ks_norefs * 100 / nz(keystats.ks_allocs),
+ keystats.ks_taken * 100 / nz(keystats.ks_allocs),
+ keystats.ks_shared * 100 / nz(keystats.ks_allocs));
+#endif