PERFORCE change 134578 for review

John Birrell jb at FreeBSD.org
Thu Jan 31 20:06:06 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=134578

Change 134578 by jb at jb_freebsd1 on 2008/02/01 04:05:05

	Add a kernel option to force stack frames to be compiled in.
	In the past it was just DDB which needed them. Now, in order
	to pass the DTrace Test Suite we need them. Leaving out this
	option (and DDB) will give a performance improvement at the
	expense of less available Function Boundary Trace (fbt)
	probes. That is, less that 10,000 probes in a GENERIC kernel
	without the option and over 28,000 with, so it's a lot of
	functions we can't trace.
	
	We need to work on instrumenting the 'sub %rsp' opcodes to
	avoid needing this option.

Affected files ...

.. //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#31 edit
.. //depot/projects/dtrace/src/sys/conf/Makefile.amd64#6 edit
.. //depot/projects/dtrace/src/sys/conf/options.amd64#9 edit
.. //depot/projects/dtrace7/src/sys/amd64/conf/GENERIC#5 edit
.. //depot/projects/dtrace7/src/sys/conf/Makefile.amd64#2 edit
.. //depot/projects/dtrace7/src/sys/conf/options.amd64#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#31 (text+ko) ====

@@ -64,6 +64,8 @@
 options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
 options 	AUDIT			# Security event auditing
 options 	PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
+options 	KDTRACE_FRAME		# Ensure frames are compiled in
+options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 
 # Debugging for use in -current
 options 	KDB			# Enable kernel debugger support.

==== //depot/projects/dtrace/src/sys/conf/Makefile.amd64#6 (text+ko) ====

@@ -32,8 +32,9 @@
 .include "$S/conf/kern.pre.mk"
 
 DDB_ENABLED!=	grep DDB opt_ddb.h || true
+DTR_ENABLED!=	grep KDTRACE_FRAME opt_kdtrace.h || true
 HWPMC_ENABLED!=	grep HWPMC opt_hwpmc_hooks.h || true
-.if !empty(DDB_ENABLED) || !empty(HWPMC_ENABLED)
+.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED)
 CFLAGS+=	-fno-omit-frame-pointer
 .endif
 

==== //depot/projects/dtrace/src/sys/conf/options.amd64#9 (text+ko) ====

@@ -65,6 +65,7 @@
 
 # Debugging
 STOP_NMI		opt_cpu.h
+KDTRACE_FRAME		opt_kdtrace.h
 
 # BPF just-in-time compiler
 BPF_JITTER		opt_bpf.h

==== //depot/projects/dtrace7/src/sys/amd64/conf/GENERIC#5 (text+ko) ====

@@ -63,6 +63,7 @@
 options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
 options 	AUDIT			# Security event auditing
 options 	PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
+options 	KDTRACE_FRAME		# Ensure frames are compiled in
 options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 
 # Make an SMP-capable kernel by default

==== //depot/projects/dtrace7/src/sys/conf/Makefile.amd64#2 (text+ko) ====

@@ -32,7 +32,8 @@
 .include "$S/conf/kern.pre.mk"
 
 DDB_ENABLED!=	grep DDB opt_ddb.h || true
-.if !empty(DDB_ENABLED)
+DTR_ENABLED!=	grep KDTRACE_FRAME opt_kdtrace.h || true
+.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED)
 CFLAGS+=	-fno-omit-frame-pointer
 .endif
 

==== //depot/projects/dtrace7/src/sys/conf/options.amd64#2 (text+ko) ====

@@ -64,6 +64,7 @@
 
 # Debugging
 STOP_NMI		opt_cpu.h
+KDTRACE_FRAME		opt_kdtrace.h
 
 # BPF just-in-time compiler
 BPF_JITTER		opt_bpf.h


More information about the p4-projects mailing list