${HEADER}
Within the FreeBSD Perforce repository, there is a TESLA branch located at
//depot/projects/ctsrd/tesla/src
.
To build the FreeBSD base system with TESLA instrumentation, you will first
need to either:
With sh/bash/zsh, set:
export TESLA_SOURCE_DIR=/path/to/tesla
export TESLA_BUILD_DIR=$TESLA_SOURCE_DIR/build # or wherever you ran cmake
export PATH=$TESLA_SOURCE_DIR/scripts:$PATH
export LLVM_BIN=$LLVM_BUILD_DIR/bin
Or in csh/tcsh:
setenv TESLA_SOURCE_DIR /path/to/tesla
setenv TESLA_BUILD_DIR $TESLA_SOURCE_DIR/build # or wherever you ran cmake
setenv PATH $TESLA_SOURCE_DIR/scripts:$PATH
setenv LLVM_BIN $LLVM_BUILD_DIR/bin
Then, with either TESLA installed or with the above environmental variables
set, run make in the FreeBSD source tree with the following variables:
CONFIGARGS=-t -DNO_MODULES -DWITHOUT_FORMAT_EXTENSIONS \
XCC=$LLVM_BIN/clang \
XCXX=$LLVM_BIN/clang++ \
XCPP=$LLVM_BIN/clang-cpp \
XLLC=$LLVM_BIN/llc \
TESLA=$TESLA_SOURCE_DIR/scripts/tesla \
KERNCONF=TESLA
After the build is complete, there will be a kernel.instrumented
file alongside kernel
in
$OBJDIR/sys/TESLA
.
${FOOTER}