diff options
author | rsc <devnull@localhost> | 2006-01-27 03:53:22 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-01-27 03:53:22 +0000 |
commit | 62a826a250a3926fa54536975565d05cd3b92db6 (patch) | |
tree | d2b9468949267d6c77a2944872cd4b7f29a52e8e /src/cmd/auxstats | |
parent | e827c793f309fa65a3d49d8c461749502407d19d (diff) | |
download | plan9port-62a826a250a3926fa54536975565d05cd3b92db6.tar.gz plan9port-62a826a250a3926fa54536975565d05cd3b92db6.tar.bz2 plan9port-62a826a250a3926fa54536975565d05cd3b92db6.zip |
ifdef vm_swapusage for os x
Diffstat (limited to 'src/cmd/auxstats')
-rw-r--r-- | src/cmd/auxstats/Darwin.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/auxstats/Darwin.c b/src/cmd/auxstats/Darwin.c index 484f28bd..8905edca 100644 --- a/src/cmd/auxstats/Darwin.c +++ b/src/cmd/auxstats/Darwin.c @@ -35,7 +35,9 @@ struct Sample uint64_t time, p_time; vm_statistics_data_t vm_stat, p_vm_stat; boolean_t purgeable_is_valid; +#ifdef VM_SWAPUSAGE /* 10.4+ */ struct xsw_usage xsu; +#endif boolean_t xsu_valid; integer_t syscalls_mach, p_syscalls_mach; integer_t syscalls_unix, p_syscalls_unix; @@ -236,13 +238,15 @@ xsample(int first) if(sample.seq == 1) sample.p_vm_stat = sample.vm_stat; +#ifdef VM_SWAPUSAGE mib[0] = CTL_VM; mib[1] = VM_SWAPUSAGE; len = sizeof sample.xsu; sample.xsu_valid = TRUE; if(sysctl(mib, 2, &sample.xsu, &len, NULL, 0) < 0 && errno == ENOENT) sample.xsu_valid = FALSE; - +#endif + samplenet(); sampleevents(); |