summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2013-02-03 09:57:39 +0000
committeravg <avg@FreeBSD.org>2013-02-03 09:57:39 +0000
commit08016a40d72d610ac6322ad147f8a8ff7ac0e1e7 (patch)
tree0cbd8af6d2fcc2391a51c88f2c190865a8310018 /sys/conf
parente1f3d4e1aa9f4cf116f0046597bb1fe1ee36951b (diff)
downloadFreeBSD-src-08016a40d72d610ac6322ad147f8a8ff7ac0e1e7.zip
FreeBSD-src-08016a40d72d610ac6322ad147f8a8ff7ac0e1e7.tar.gz
allow for large KTR_ENTRIES values by allocating ktr_buf using malloc(9)
Only during very early boot, before malloc(9) is functional (SI_SUB_KMEM), the static ktr_buf_init is used. Size of the static buffer is determined by a new kernel option KTR_BOOT_ENTRIES. Its default value is 1024. This commit builds on top of r243046. Reviewed by: alc MFC after: 17 days
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/NOTES5
-rw-r--r--sys/conf/options1
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 216d2f5..ff245ed 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -446,6 +446,8 @@ options KTRACE_REQUEST_POOL=101
# KTR is a kernel tracing facility imported from BSD/OS. It is
# enabled with the KTR option. KTR_ENTRIES defines the number of
# entries in the circular trace buffer; it may be an arbitrary number.
+# KTR_BOOT_ENTRIES defines the number of entries during the early boot,
+# before malloc(9) is functional.
# KTR_COMPILE defines the mask of events to compile into the kernel as
# defined by the KTR_* constants in <sys/ktr.h>. KTR_MASK defines the
# initial value of the ktr_mask variable which determines at runtime
@@ -459,7 +461,8 @@ options KTRACE_REQUEST_POOL=101
# if KTR_VERBOSE is not defined. See ktr(4) and ktrdump(8) for details.
#
options KTR
-options KTR_ENTRIES=1024
+options KTR_BOOT_ENTRIES=1024
+options KTR_ENTRIES=(128 * 1024)
options KTR_COMPILE=(KTR_INTR|KTR_PROC)
options KTR_MASK=KTR_INTR
options KTR_CPUMASK=0x3
diff --git a/sys/conf/options b/sys/conf/options
index 8224275..5722ac4 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -669,6 +669,7 @@ KTR_ALQ opt_ktr.h
KTR_MASK opt_ktr.h
KTR_CPUMASK opt_ktr.h
KTR_COMPILE opt_global.h
+KTR_BOOT_ENTRIES opt_global.h
KTR_ENTRIES opt_global.h
KTR_VERBOSE opt_ktr.h
WITNESS opt_global.h
OpenPOWER on IntegriCloud