From nobody Wed Jul 06 13:04:16 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D371C1D14C93; Wed, 6 Jul 2022 13:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LdKW45TNqz4Sh0; Wed, 6 Jul 2022 13:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657112656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLPA3ocC05Jdns+RiDsd3JIpO6uVpffT6RNejvFNh1I=; b=paOeX0UQOH9VB3X3zK02hzfvXhC1crpKdqHB9EsrE1cWvbkB99wg68G8vKxjqJo/BOPDkA wV8vIyPsOwOStSzvTvmMfbf3mW0TnBAvthtpaBeXRKAaWdVbmlT1EIDg/w57Mg5aLnYgT9 J7wncAks2O6+mre/nFA6cTPRmzkqY5gJsEgNP+Vlom5kJlzF4rdeXuRBZfvq3qP9I4eegr KITbEpZzSgb08Vtk2Byvuw1F0bGH1K3mFA41eZ7mwNOE6NG9J0gJfH9i0CiYEKkCV2zj1f OMwcGg2zrJhSnrdXyzXcOECRI+khzYUDF0VKGI3dBwttY4Pn0+Sz0ZNn8c+R4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 981571ACC2; Wed, 6 Jul 2022 13:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 266D4Gwr059118; Wed, 6 Jul 2022 13:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 266D4GSt059117; Wed, 6 Jul 2022 13:04:16 GMT (envelope-from git) Date: Wed, 6 Jul 2022 13:04:16 GMT Message-Id: <202207061304.266D4GSt059117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3bf66365129a - main - cddl/*: add a WITH(OUT)_DTRACE option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bf66365129a13933f77d1f4421d5136861cffb4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657112656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLPA3ocC05Jdns+RiDsd3JIpO6uVpffT6RNejvFNh1I=; b=TkfAcQP9UDEBTIm75Vbp13juTSggeqzXmAp08hWAY/GrAb80sa+qql4ERhQbWKVDHhu4D8 UGJcQ3YgD3JkF7x7Dl/qMMFCn+z4/0+5PU7/kwNDwcOa1ndl/1XoJTfil27HvASrTb/rjA v8V+Sg/6mLrdyrhUjwqkiecTSY08INvTVEJPEIT358c3Lc7VyBwkFyAX+ARuZZS4EeUuNp j6rW+PKIN6fHGzZgPk2Cz5RE4qgShmdOrdRa1v0JUjWCl398PGCP086nU6j/i04yxr+KCC J5nkirWFtIVs/70r/bBfVB9yjqpmyO9Z1jKGjzVlDZCgwuWAFuzWW7T3rxJOVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657112656; a=rsa-sha256; cv=none; b=ZAfsuTTwhyemyQOHkubXHue9ezz2qL3M7Jg+pmJGM5Tnmqme33oqtrt+G07hAV2uPvSpbF U10TYE51794n2dQYXnLeIwcBgaEUJKdXmYS/eK9OkqM+BnQlZ/ncOvakJDyV0lmXJub8Yl r1lf/pZJtK6nCemDBqf+ggHW+j4Tg8COdR3V0ftPoLZnWM3CkA+RLySzoeKWRGMHygeMy/ 7hKSyrIGLiAMkwifR4QeaX/ZSb6MUcWReI8Sy6FRJd4DE9krFcu+4RtQqoWpVTc1FyLYXQ VjcM6KFpcWx9Ye1q1+o8Rzopzy+3dGY+8x0B42BlvYi8iAWDyaxgyuHfv6EH7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3bf66365129a13933f77d1f4421d5136861cffb4 commit 3bf66365129a13933f77d1f4421d5136861cffb4 Author: Brooks Davis AuthorDate: 2022-07-06 13:03:48 +0000 Commit: Brooks Davis CommitDate: 2022-07-06 13:03:48 +0000 cddl/*: add a WITH(OUT)_DTRACE option Add an option to enable/disable DTrace without disabling ZFS. New architectures such as CHERI may support ZFS before they support DTrace and the old model of WITHOUT_CDDL disabling both wasn't helpful. For compatiblity, the CDDL option remains and WITHOUT_CDDL implies WITHOUT_DTRACE. WITHOUT_DTRACE also implies WITHOUT_CTF. As part of this change, largely convert cddl/*/Makefile to using the more compact SUBDIR.${MK_}+= form rather than using intermediate variables. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35718 --- cddl/lib/Makefile | 49 ++++++++++++++------------------ cddl/sbin/Makefile | 9 ++---- cddl/share/Makefile | 6 +--- cddl/usr.bin/Makefile | 16 ++++------- cddl/usr.libexec/Makefile | 7 ++--- cddl/usr.sbin/Makefile | 20 ++++++------- share/man/man5/src.conf.5 | 12 +++++++- share/mk/src.opts.mk | 10 +++++-- sys/conf/kern.opts.mk | 5 ++++ sys/modules/Makefile | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 34 +++++++++++----------- tools/build/options/WITHOUT_DTRACE | 2 ++ 12 files changed, 85 insertions(+), 87 deletions(-) diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index 5ca0d56b291a..e66109a21138 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -2,39 +2,32 @@ .include -SUBDIR= drti \ - libavl \ +.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes +SUBDIR= libspl +.endif + +SUBDIR.${MK_DTRACE}+= \ + drti \ libctf \ - libdtrace \ - ${_libicp} \ - ${_libicp_rescue} \ + libdtrace + +SUBDIR.${MK_TESTS}+= tests + +SUBDIR.${MK_ZFS}+= \ + libavl \ + libicp \ + libicp_rescue \ libnvpair \ - libspl \ - ${_libtpool} \ + libtpool \ libumem \ libuutil \ - ${_libzfs_core} \ - ${_libzfs} \ - ${_libzfsbootenv} \ - ${_libzpool} \ - ${_libzutil} \ - ${_pam_zfs_key} - -SUBDIR.${MK_TESTS}+= tests + libzfs \ + libzfs_core \ + libzfsbootenv \ + libzpool \ + libzutil -.if ${MK_ZFS} != "no" -_libzfs_core= libzfs_core -_libicp= libicp -_libicp_rescue= libicp_rescue -_libzfs= libzfs -_libzutil= libzutil -_libzfsbootenv= libzfsbootenv -_libzpool= libzpool -_libtpool= libtpool -.if ${MK_OPENSSL} != "no" -_pam_zfs_key= pam_zfs_key -.endif -.endif +SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key SUBDIR_DEPEND_libavl= libspl SUBDIR_DEPEND_libctf= libspl diff --git a/cddl/sbin/Makefile b/cddl/sbin/Makefile index 99c4a91a3e69..2b3dcf886246 100644 --- a/cddl/sbin/Makefile +++ b/cddl/sbin/Makefile @@ -2,14 +2,11 @@ .include -SUBDIR= ${_zfs} ${_zpool} - SUBDIR.${MK_TESTS}+= tests -.if ${MK_ZFS} != "no" -_zfs= zfs -_zpool= zpool -.endif +SUBDIR.${MK_ZFS}+= \ + zfs \ + zpool SUBDIR_PARALLEL= diff --git a/cddl/share/Makefile b/cddl/share/Makefile index 68670ffbe7e0..258b60877f75 100644 --- a/cddl/share/Makefile +++ b/cddl/share/Makefile @@ -2,11 +2,7 @@ .include -SUBDIR= ${_zfs} - -.if ${MK_ZFS} != "no" -_zfs= zfs -.endif +SUBDIR.${MK_ZFS}+= zfs SUBDIR_PARALLEL= diff --git a/cddl/usr.bin/Makefile b/cddl/usr.bin/Makefile index 10d55215c0b3..97c4639cece0 100644 --- a/cddl/usr.bin/Makefile +++ b/cddl/usr.bin/Makefile @@ -2,21 +2,17 @@ .include -SUBDIR= \ +SUBDIR.${MK_DTRACE}+= \ ctfconvert \ ctfdump \ - ctfmerge \ - ${_zinject} \ - ${_zstream} \ - ${_ztest} + ctfmerge SUBDIR.${MK_TESTS}+= tests -.if ${MK_ZFS} != "no" -_zinject= zinject -_ztest= ztest -_zstream = zstream -.endif +SUBDIR.${MK_ZFS}+= \ + zinject \ + ztest \ + zstream SUBDIR_PARALLEL= diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile index 6280cbab5766..7b7dfc7bd354 100644 --- a/cddl/usr.libexec/Makefile +++ b/cddl/usr.libexec/Makefile @@ -2,11 +2,8 @@ .include -SUBDIR= ${_zpool_influxdb} - -.if ${MK_ZFS} != "no" -_zpool_influxdb= zpool_influxdb -.endif +SUBDIR.${MK_ZFS}+= \ + zpool_influxdb SUBDIR_PARALLEL= diff --git a/cddl/usr.sbin/Makefile b/cddl/usr.sbin/Makefile index 4dde136dc412..68dc735b3d1b 100644 --- a/cddl/usr.sbin/Makefile +++ b/cddl/usr.sbin/Makefile @@ -2,23 +2,19 @@ .include -SUBDIR= ${_dtrace} \ +SUBDIR.${MK_DTRACE}+= \ + ${_dtrace} \ ${_dwatch} \ ${_lockstat} \ - ${_plockstat} \ - ${_zdb} \ - ${_zfsd} \ - ${_zhack} + ${_plockstat} SUBDIR.${MK_TESTS}+= tests -.if ${MK_ZFS} != "no" -_zdb= zdb -_zhack= zhack -. if ${MK_CXX} != "no" -_zfsd= zfsd -. endif -.endif +SUBDIR.${MK_ZFS}+= \ + zdb \ + zhack +SUBDIR.${MK_ZFS}.${MK_CXX}+= \ + zfsd .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _dtrace= dtrace diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index f1ca36e5597d..82c32772e762 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 22, 2022 +.Dd July 6, 2022 .Dt SRC.CONF 5 .Os .Sh NAME @@ -328,6 +328,8 @@ When set, it enforces these options: .It .Va WITHOUT_CTF .It +.Va WITHOUT_DTRACE +.It .Va WITHOUT_LOADER_ZFS .It .Va WITHOUT_ZFS @@ -612,6 +614,14 @@ Do not build dma Mail Transport Agent. .It Va WITHOUT_DOCCOMPRESS Do not install compressed system documentation. Only the uncompressed version will be installed. +.It Va WITHOUT_DTRACE +Do not build DTrace framework kernel modules, libraries, and user commands. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_CTF +.El .It Va WITH_DTRACE_TESTS Build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index a7e414fd0432..4ac61f13cee2 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -92,6 +92,7 @@ __DEFAULT_YES_OPTIONS = \ DIALOG \ DICT \ DMAGENT \ + DTRACE \ DYNAMICROOT \ EE \ EFI \ @@ -364,9 +365,10 @@ MK_SOURCELESS_UCODE:= no .endif .if ${MK_CDDL} == "no" -MK_ZFS:= no -MK_LOADER_ZFS:= no MK_CTF:= no +MK_DTRACE:= no +MK_LOADER_ZFS:= no +MK_ZFS:= no .endif .if ${MK_CRYPT} == "no" @@ -389,6 +391,10 @@ MK_TESTS:= no MK_BSDINSTALL:= no .endif +.if ${MK_DTRACE} == "no" +MK_CTF:= no +.endif + .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 2d6e2d1eb729..eae05882cb17 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -35,6 +35,7 @@ __DEFAULT_YES_OPTIONS = \ CDDL \ CRYPT \ CUSE \ + DTRACE \ EFI \ FORMAT_EXTENSIONS \ INET \ @@ -183,6 +184,10 @@ MK_${var}_SUPPORT:= yes MK_KERNEL_SYMBOLS:= no .endif +.if ${MK_CDDL} == "no" +MK_DTRACE:= no +.endif + # Some modules only compile successfully if option FDT is set, due to #ifdef FDT # wrapped around declarations. Module makefiles can optionally compile such # things using .if !empty(OPT_FDT) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 68f1ae38a712..e494c93b4ba7 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -411,7 +411,7 @@ SUBDIR= \ _autofs= autofs .endif -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) +.if ${MK_DTRACE} != "no" || defined(ALL_MODULES) .if ${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "" .if ${KERN_OPTS:MKDTRACE_HOOKS} SUBDIR+= dtrace diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 85257d41140c..7f67b0c8056d 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -902,13 +902,9 @@ OLD_FILES+=usr/share/man/man4/ccd.4.gz OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz .endif -.if ${MK_CDDL} == no -OLD_LIBS+=lib/libavl.so.2 +.if ${MK_DTRACE} == no OLD_LIBS+=lib/libctf.so.2 OLD_LIBS+=lib/libdtrace.so.2 -OLD_LIBS+=lib/libnvpair.so.2 -OLD_LIBS+=lib/libumem.so.2 -OLD_LIBS+=lib/libuutil.so.2 OLD_FILES+=usr/bin/ctfconvert OLD_FILES+=usr/bin/ctfdump OLD_FILES+=usr/bin/ctfmerge @@ -929,24 +925,12 @@ OLD_FILES+=usr/lib/dtrace/tcp.d OLD_FILES+=usr/lib/dtrace/udp.d OLD_FILES+=usr/lib/dtrace/udplite.d OLD_FILES+=usr/lib/dtrace/unistd.d -OLD_FILES+=usr/lib/libavl.a -OLD_FILES+=usr/lib/libavl.so -OLD_FILES+=usr/lib/libavl_p.a OLD_FILES+=usr/lib/libctf.a OLD_FILES+=usr/lib/libctf.so OLD_FILES+=usr/lib/libctf_p.a OLD_FILES+=usr/lib/libdtrace.a OLD_FILES+=usr/lib/libdtrace.so OLD_FILES+=usr/lib/libdtrace_p.a -OLD_FILES+=usr/lib/libnvpair.a -OLD_FILES+=usr/lib/libnvpair.so -OLD_FILES+=usr/lib/libnvpair_p.a -OLD_FILES+=usr/lib/libumem.a -OLD_FILES+=usr/lib/libumem.so -OLD_FILES+=usr/lib/libumem_p.a -OLD_FILES+=usr/lib/libuutil.a -OLD_FILES+=usr/lib/libuutil.so -OLD_FILES+=usr/lib/libuutil_p.a OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/libexec/dwatch/chmod OLD_FILES+=usr/libexec/dwatch/errno @@ -1080,6 +1064,10 @@ OLD_FILES+=etc/periodic/daily/404.status-zfs OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_FILES+=etc/zfs/exports OLD_DIRS+=etc/zfs +OLD_LIBS+=lib/libavl.so.2 +OLD_LIBS+=lib/libnvpair.so.2 +OLD_LIBS+=lib/libumem.so.2 +OLD_LIBS+=lib/libuutil.so.2 OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=lib/libzfs.so.3 OLD_LIBS+=lib/libzfs_core.so.2 @@ -1098,6 +1086,18 @@ OLD_FILES+=usr/lib/libbe.a OLD_FILES+=usr/lib/libbe_p.a OLD_FILES+=usr/lib/libbe.so OLD_LIBS+=lib/libbe.so.1 +OLD_FILES+=usr/lib/libavl.a +OLD_FILES+=usr/lib/libavl.so +OLD_FILES+=usr/lib/libavl_p.a +OLD_FILES+=usr/lib/libnvpair.a +OLD_FILES+=usr/lib/libnvpair.so +OLD_FILES+=usr/lib/libnvpair_p.a +OLD_FILES+=usr/lib/libumem.a +OLD_FILES+=usr/lib/libumem.so +OLD_FILES+=usr/lib/libumem_p.a +OLD_FILES+=usr/lib/libuutil.a +OLD_FILES+=usr/lib/libuutil.so +OLD_FILES+=usr/lib/libuutil_p.a OLD_FILES+=usr/lib/libzfs.a OLD_FILES+=usr/lib/libzfs.so OLD_FILES+=usr/lib/libzfs_core.a diff --git a/tools/build/options/WITHOUT_DTRACE b/tools/build/options/WITHOUT_DTRACE new file mode 100644 index 000000000000..7a246ee5ee3d --- /dev/null +++ b/tools/build/options/WITHOUT_DTRACE @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Do not build DTrace framework kernel modules, libraries, and user commands.