svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

Jeremy Chadwick jdc at koitsu.org
Tue Apr 16 16:19:21 UTC 2013


On Tue, Apr 16, 2013 at 04:09:28PM +0000, Brooks Davis wrote:
> Author: brooks
> Date: Tue Apr 16 16:09:27 2013
> New Revision: 249549
> URL: http://svnweb.freebsd.org/changeset/base/249549
> 
> Log:
>   MFC (much delayed) 234504:
>   
>   Enable DTrace hooks in GENERIC.
> 
> Modified:
>   stable/9/sys/amd64/conf/GENERIC
>   stable/9/sys/i386/conf/GENERIC
> Directory Properties:
>   stable/9/sys/   (props changed)
> 
> Modified: stable/9/sys/amd64/conf/GENERIC
> ==============================================================================
> --- stable/9/sys/amd64/conf/GENERIC	Tue Apr 16 14:22:16 2013	(r249548)
> +++ stable/9/sys/amd64/conf/GENERIC	Tue Apr 16 16:09:27 2013	(r249549)
> @@ -22,6 +22,7 @@ cpu		HAMMER
>  ident		GENERIC
>  
>  makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
> +makeoptions	WITH_CTF=1		# Run ctfconvert(1) for DTrace support
>  
>  options 	SCHED_ULE		# ULE scheduler
>  options 	PREEMPTION		# Enable kernel thread preemption
> @@ -63,11 +64,12 @@ options 	KBD_INSTALL_CDEV	# install a CD
>  options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
>  options 	AUDIT			# Security event auditing
>  options 	MAC			# TrustedBSD MAC Framework
> -#options 	KDTRACE_FRAME		# Ensure frames are compiled in
> -#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
> +options 	KDTRACE_FRAME		# Ensure frames are compiled in
> +options 	KDTRACE_HOOKS		# Kernel DTrace hooks
>  options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
>  options 	KDB			# Kernel debugger related code
>  options 	KDB_TRACE		# Print a stack trace for a panic
> +options 	DDB_CTF			# kernel ELF linker loads CTF data
>  
>  # Make an SMP-capable kernel by default
>  options 	SMP			# Symmetric MultiProcessor Kernel
> 
> Modified: stable/9/sys/i386/conf/GENERIC
> ==============================================================================
> --- stable/9/sys/i386/conf/GENERIC	Tue Apr 16 14:22:16 2013	(r249548)
> +++ stable/9/sys/i386/conf/GENERIC	Tue Apr 16 16:09:27 2013	(r249549)
> @@ -24,6 +24,7 @@ cpu		I686_CPU
>  ident		GENERIC
>  
>  makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
> +makeoptions	WITH_CTF=1		# Run ctfconvert(1) for DTrace support
>  
>  options 	SCHED_ULE		# ULE scheduler
>  options 	PREEMPTION		# Enable kernel thread preemption
> @@ -64,10 +65,11 @@ options 	KBD_INSTALL_CDEV	# install a CD
>  options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
>  options 	AUDIT			# Security event auditing
>  options 	MAC			# TrustedBSD MAC Framework
> -#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
> +options 	KDTRACE_HOOKS		# Kernel DTrace hooks
>  options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
>  options 	KDB			# Kernel debugger related code
>  options 	KDB_TRACE		# Print a stack trace for a panic
> +options 	DDB_CTF			# kernel ELF linker loads CTF data
>  
>  # To make an SMP kernel, the next two lines are needed
>  options 	SMP			# Symmetric MultiProcessor Kernel

Now that this has been enabled by default, I should warn folks of a
caveat that I found in the buildworld/buildkernel framework.  It's
easiest to explain like this:

1. Install FreeBSD 9.x, svn checkout of stable/9, etc...
2. Add WITHOUT_CDDL=true to /etc/src.conf
3. Rebuild + install kernel/world per src/Makefile procedure
4. Remove WITHOUT_CDDL=true from /etc/src.conf
5. rm -fr /usr/obj/*
6. Rebuild world
7. Rebuild kernel -- fails, stating "ctfconvert: not found".

For whatever reason the buildkernel bits make the assumption that
ctfconvert exists on the system (presumably in $PATH or possibly a
hard-coded), when ideally it should try to use the recently-built
version in /usr/obj first.

-- 
| Jeremy Chadwick                                   jdc at koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Mountain View, CA, US                                            |
| Making life hard for others since 1977.             PGP 4BD6C0CB |


More information about the svn-src-stable-9 mailing list