On Tue, Nov 27, 2018 at 05:52:15PM -0800, Greg Steuck wrote: > I booted the patched kernel and it seems to have gone farther and I believe > reached init before crashing.
By performing a semi-automated bisect I was able to identify the source files that are incompatible with tracing. Common for all source files seems to be that they define routines called early on in the boot process before curcpu() is usable. I do not have any plans on committing the diff below but please give it a try. Instead, I'm working on extending the files.conf(5) grammar in order to infer a different make target for the files. Index: arch/amd64/conf/Makefile.amd64 =================================================================== RCS file: /cvs/src/sys/arch/amd64/conf/Makefile.amd64,v retrieving revision 1.106 diff -u -p -r1.106 Makefile.amd64 --- arch/amd64/conf/Makefile.amd64 30 Oct 2018 11:08:30 -0000 1.106 +++ arch/amd64/conf/Makefile.amd64 1 Dec 2018 15:32:58 -0000 @@ -151,7 +151,31 @@ vers.o: ${SYSTEM_DEP:Ngap.o} ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c .if ${SYSTEM_OBJ:Mkcov.o} && ${COMPILER_VERSION:Mclang} +amd64_mem.o: $S/arch/amd64/amd64/amd64_mem.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +cpu.o: $S/arch/amd64/amd64/cpu.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +fpu.o: $S/arch/amd64/amd64/fpu.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +gdt.o: $S/arch/amd64/amd64/gdt.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +intr.o: $S/arch/amd64/amd64/intr.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +lapic.o: $S/arch/amd64/amd64/lapic.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +machdep.o: $S/arch/amd64/amd64/machdep.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +tsc.o: $S/arch/amd64/amd64/tsc.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc kcov.o: $S/dev/kcov.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +pvbus.o: $S/dev/pv/pvbus.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +kern_lock.o: $S/kern/kern_lock.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +kern_sched.o: $S/kern/kern_sched.c + ${NORMAL_C} -fno-sanitize-coverage=trace-pc +kern_tc.o: $S/kern/kern_tc.c ${NORMAL_C} -fno-sanitize-coverage=trace-pc .endif