From owner-svn-src-head@freebsd.org Sun Dec 31 09:21:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 401E9EAC5D4; Sun, 31 Dec 2017 09:21:36 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AB3F6A8DB; Sun, 31 Dec 2017 09:21:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9LZUH045427; Sun, 31 Dec 2017 09:21:35 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9LYYp045424; Sun, 31 Dec 2017 09:21:34 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310921.vBV9LYYp045424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327424 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 327424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:21:36 -0000 Author: cperciva Date: Sun Dec 31 09:21:34 2017 New Revision: 327424 URL: https://svnweb.freebsd.org/changeset/base/327424 Log: Connect kern_tslog.c to the build and add TSLOG / TSLOGSIZE kernel options. These are intended for debugging purposes and should not be added to "generic" kernel configurations since they result in a nontrivial amount of memory being set aside for this purpose, can break if kernel modules are unloaded, and can potentially leak a dangerous amount of information about timestamps used as a source of kernel entropy. Modified: head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/NOTES Sun Dec 31 09:21:34 2017 (r327424) @@ -590,6 +590,20 @@ options STACK # options NUM_CORE_FILES=5 +# +# The TSLOG option enables timestamped logging of events, especially +# function entries/exits, in order to track the time spent by the kernel. +# In particular, this is useful when investigating the early boot process, +# before it is possible to use more sophisticated tools like DTrace. +# The TSLOGSIZE option controls the size of the (preallocated, fixed +# length) buffer used for storing these events (default: 262144 records). +# +# For security reasons the TSLOG option should not be enabled on systems +# used in production. +# +options TSLOG +options TSLOGSIZE=262144 + ##################################################################### # PERFORMANCE MONITORING OPTIONS Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/files Sun Dec 31 09:21:34 2017 (r327424) @@ -3802,6 +3802,7 @@ kern/kern_thr.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard +kern/kern_tslog.c optional tslog kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/options Sun Dec 31 09:21:34 2017 (r327424) @@ -67,6 +67,8 @@ EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h NUM_CORE_FILES opt_global.h +TSLOG opt_global.h +TSLOGSIZE opt_global.h # Miscellaneous options. ALQ