diff options
author | jhb <jhb@FreeBSD.org> | 2008-08-19 21:30:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-08-19 21:30:36 +0000 |
commit | 67b02c52de29cfb44eea11a7c46f7bf5de57bf36 (patch) | |
tree | 46a6b9c4299efa74349c2c72fe125414690cb591 /lib/libkvm/kvm.h | |
parent | 10e058a3a20b6ed4f8c0fe21dbadb75ad69ff6b7 (diff) | |
download | FreeBSD-src-67b02c52de29cfb44eea11a7c46f7bf5de57bf36.zip FreeBSD-src-67b02c52de29cfb44eea11a7c46f7bf5de57bf36.tar.gz |
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
Diffstat (limited to 'lib/libkvm/kvm.h')
-rw-r--r-- | lib/libkvm/kvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libkvm/kvm.h b/lib/libkvm/kvm.h index c60d211..0427bd1 100644 --- a/lib/libkvm/kvm.h +++ b/lib/libkvm/kvm.h @@ -70,6 +70,7 @@ struct kvm_swap { __BEGIN_DECLS int kvm_close(kvm_t *); char **kvm_getargv(kvm_t *, const struct kinfo_proc *, int); +int kvm_getcptime(kvm_t *, long *); char **kvm_getenvv(kvm_t *, const struct kinfo_proc *, int); char *kvm_geterr(kvm_t *); char *kvm_getfiles(kvm_t *, int, int, int *); |