diff options
author | rwatson <rwatson@FreeBSD.org> | 2010-03-01 00:27:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2010-03-01 00:27:55 +0000 |
commit | 2c2940cdf7c5fa033c50f9c80a5b9f860d82d858 (patch) | |
tree | 04416be9d793aa3a6797065cfdbdfbee0a289fde /lib/libkvm/kvm.h | |
parent | 67dd56fb510222481fc77553f9ef25a5fd1f9620 (diff) | |
download | FreeBSD-src-2c2940cdf7c5fa033c50f9c80a5b9f860d82d858.zip FreeBSD-src-2c2940cdf7c5fa033c50f9c80a5b9f860d82d858.tar.gz |
A first cut at teaching libkvm how to deal with dynamic per-CPU storage
(DPCPU):
A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
of DPCPU. Calls to kvm_nlist(3) will automatically translate DPCPU
symbols and return a pointer to the current CPU's version of the data.
Consumers needing to read the same symbol on several CPUs will invoke a
series of setcpu/nlist calls, one per CPU of interest.
This addition makes it possible for tools like netstat(1) to query the
values of DPCPU variables during crashdump analysis, and is based on
similar code handling virtualized global variables.
MFC after: 1 week
Sponsored by: Juniper Networks, Inc.
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 0427bd1..6b5160b 100644 --- a/lib/libkvm/kvm.h +++ b/lib/libkvm/kvm.h @@ -69,6 +69,7 @@ struct kvm_swap { __BEGIN_DECLS int kvm_close(kvm_t *); +int kvm_dpcpu_setcpu(kvm_t *, u_int); 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); |