summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorsson <sson@FreeBSD.org>2009-05-26 21:39:09 +0000
committersson <sson@FreeBSD.org>2009-05-26 21:39:09 +0000
commit527dd575556c8d79007e7a35cd752f1b46343fd2 (patch)
tree626fb22e642e1f12607624578d9f484a88a1e405 /sys/modules
parente8484adb4444a310104af340656308e3b8d60088 (diff)
downloadFreeBSD-src-527dd575556c8d79007e7a35cd752f1b46343fd2.zip
FreeBSD-src-527dd575556c8d79007e7a35cd752f1b46343fd2.tar.gz
Add the ksyms(4) pseudo driver. The ksyms driver allows a process to
get a quick snapshot of the kernel's symbol table including the symbols from any loaded modules (the symbols are all merged into one symbol table). Unlike like other implementations, this ksyms driver maps memory in the process memory space to store the snapshot at the time /dev/ksyms is opened. It also checks to see if the process has already a snapshot open and won't allow it to open /dev/ksyms it again until it closes first. This prevents kernel and process memory from being exhausted. Note that /dev/ksyms is used by the lockstat(1) command. Reviewed by: gallatin kib (freebsd-arch) Approved by: gnn (mentor)
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/ksyms/Makefile10
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 01a044f..b9c7f1c 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -139,6 +139,7 @@ SUBDIR= ${_3dfx} \
joy \
kbdmux \
krpc \
+ ksyms \
le \
lge \
libalias \
diff --git a/sys/modules/ksyms/Makefile b/sys/modules/ksyms/Makefile
new file mode 100644
index 0000000..94e91d8
--- /dev/null
+++ b/sys/modules/ksyms/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../dev/ksyms
+
+KMOD= ksyms
+SRCS= ksyms.c linker_if.h
+
+MFILES= kern/linker_if.m
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud