From de788839e206a12d284edce3ff9fbb67843dab34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20Sp=C3=B6rlein?= Date: Sun, 23 Jan 2011 11:08:36 +0000 Subject: libkvm: fix process runtime calculation on crashdumps Fix a long standing bug, where the procs ticks where assumed to be in us. Instead, read cpu_tick_frequency from the kernel and use the same logic to convert runtime. This is still too optimistic in that it assumes cpu_tick_frequency is available and fixed. Since this function is only called on crashdumps, I think we can live with that. Testing has shown the values to be correct for different kern.hz inside Virtualbox. Bump WARNS. Alignment issues on some archs mean this is still at 3. Reviewed by: bde --- lib/libkvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libkvm/Makefile') diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile index 24a6e326ce6e..cda977135213 100644 --- a/lib/libkvm/Makefile +++ b/lib/libkvm/Makefile @@ -15,7 +15,7 @@ KVM_ARCH=${MACHINE_ARCH} KVM_ARCH=${MACHINE_CPUARCH} .endif -WARNS?= 0 +WARNS?= 3 SRCS= kvm.c kvm_${KVM_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c -- cgit v1.2.3