Date: Tue, 19 Aug 2008 21:30:36 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libkvm Makefile kvm.h kvm_cptime.c kvm_getcptime.3 Message-ID: <200808192130.m7JLUlBU009582@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2008-08-19 21:30:36 UTC FreeBSD src repository Modified files: lib/libkvm Makefile kvm.h Added files: lib/libkvm kvm_cptime.c kvm_getcptime.3 Log: SVN rev 181880 on 2008-08-19 21:30:36Z by jhb Add a new routine kvm_getcptime(3) for fetching the equivalent of 'kern.cp_time'. For a live kernel it uses the sysctl. For a crashdump, it first checks to see if the kernel has a 'cp_time' global symbol. If it does, it uses that. If that doesn't work, when it uses the recently added kvm_getmaxcpu(3) and kvm_getpcpu(3) routines to walk all the CPUs and sum up their counters. MFC after: 1 week Revision Changes Path 1.19 +4 -3 src/lib/libkvm/Makefile 1.19 +1 -0 src/lib/libkvm/kvm.h 1.1 +132 -0 src/lib/libkvm/kvm_cptime.c (new) 1.1 +77 -0 src/lib/libkvm/kvm_getcptime.3 (new)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808192130.m7JLUlBU009582>