Add support for our own DTrace scripts and those from the DTraceToolkit

to the build system.  FreeBSD written scripts are stored in
src/share and the toolkit scripts are brought from the cddl directory
into a working tree via install.

MFC after:	2 weeks
This commit is contained in:
George V. Neville-Neil 2012-05-18 16:40:15 +00:00
parent ff3dd71982
commit 4d37a12307
5 changed files with 54 additions and 0 deletions

View file

@ -200,6 +200,10 @@
..
..
..
dtrace
toolkit
..
..
examples
BSD_daemon
..

View file

@ -8,6 +8,7 @@
SUBDIR= ${_colldef} \
${_dict} \
${_doc} \
dtrace \
${_examples} \
${_i18n} \
${_man} \

21
share/dtrace/Makefile Normal file
View file

@ -0,0 +1,21 @@
# $FreeBSD$
#
# Hand installing our scripts and optionally (based on MK_CDDL) installing
# the DTraceToolkit.
#
.include <bsd.own.mk>
SUBDIR= ${_toolkit}
.if ${MK_CDDL} != "no"
_toolkit= toolkit
.endif
SCRIPTS= nfsclienttime
SCRIPTSDIR= ${SHAREDIR}/dtrace/
NO_OBJ=
.include <bsd.prog.mk>

11
share/dtrace/README Normal file
View file

@ -0,0 +1,11 @@
$FreeBSD$
This directory contains scripts for use with the DTrace system. The
toolkit/ directory contains the latest vendor import of Brendan
Gregg's DTRaceToolkit while all the other files and directories
contain code generated by the FreeBSD Project for use with DTrace on
FreeBSD.
NOTE: Do not add new scripts to the DTraceToolkit contained in this
directory. New DTraceToolkit scripts should be send to the maintainer
of the toolkit and then brought back into FreeBSD via future vendor imports.

View file

@ -0,0 +1,17 @@
#$FreeBSD$
#
# Install scripts from the DTraceToolkit
#
DTRACETOOLKIT= ../../../cddl/contrib/dtracetoolkit
SCRIPTS= ${DTRACETOOLKIT}/execsnoop \
${DTRACETOOLKIT}/hotuser \
${DTRACETOOLKIT}/hotkernel \
${DTRACETOOLKIT}/opensnoop \
${DTRACETOOLKIT}/procsystime \
SCRIPTSDIR= ${SHAREDIR}/dtrace/toolkit
NO_OBJ=
.include <bsd.prog.mk>