From owner-svn-src-all@FreeBSD.ORG Tue Aug 5 00:25:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01FEDDC2 for ; Tue, 5 Aug 2014 00:25:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3A7D20FC for ; Tue, 5 Aug 2014 00:25:19 +0000 (UTC) Received: from markj (uid 1309) (envelope-from markj@FreeBSD.org) id 5b0d by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 00:25:19 +0000 From: Mark Johnston Date: Tue, 5 Aug 2014 00:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269544 - stable/9/sys/cddl/dev/sdt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e0246f.5b0d.121998b@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 00:25:20 -0000 Author: markj Date: Tue Aug 5 00:25:19 2014 New Revision: 269544 URL: http://svnweb.freebsd.org/changeset/base/269544 Log: MFC r267706: Allow creation of SDT probes from a module in which no providers are defined. This ensures that the sdt:zfs:: probes appear despite the fact the sdt provider is defined in the kernel rather than in zfs.ko. Modified: stable/9/sys/cddl/dev/sdt/sdt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:07:21 2014 (r269543) +++ stable/9/sys/cddl/dev/sdt/sdt.c Tue Aug 5 00:25:19 2014 (r269544) @@ -259,27 +259,28 @@ sdt_kld_load(void *arg __unused, struct struct sdt_probe **probe, **p_begin, **p_end; struct sdt_argtype **argtype, **a_begin, **a_end; - if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, NULL)) - return; - for (prov = begin; prov < end; prov++) - sdt_create_provider(*prov); + if (linker_file_lookup_set(lf, "sdt_providers_set", &begin, &end, + NULL) == 0) { + for (prov = begin; prov < end; prov++) + sdt_create_provider(*prov); + } if (linker_file_lookup_set(lf, "sdt_probes_set", &p_begin, &p_end, - NULL)) - return; - for (probe = p_begin; probe < p_end; probe++) { - (*probe)->sdtp_lf = lf; - sdt_create_probe(*probe); - TAILQ_INIT(&(*probe)->argtype_list); + NULL) == 0) { + for (probe = p_begin; probe < p_end; probe++) { + (*probe)->sdtp_lf = lf; + sdt_create_probe(*probe); + TAILQ_INIT(&(*probe)->argtype_list); + } } if (linker_file_lookup_set(lf, "sdt_argtypes_set", &a_begin, &a_end, - NULL)) - return; - for (argtype = a_begin; argtype < a_end; argtype++) { - (*argtype)->probe->n_args++; - TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, *argtype, - argtype_entry); + NULL) == 0) { + for (argtype = a_begin; argtype < a_end; argtype++) { + (*argtype)->probe->n_args++; + TAILQ_INSERT_TAIL(&(*argtype)->probe->argtype_list, + *argtype, argtype_entry); + } } }