From owner-svn-src-head@FreeBSD.ORG Sat Jun 21 19:29:41 2014 Return-Path: Delivered-To: svn-src-head@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 44898509; Sat, 21 Jun 2014 19:29:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 188632C7C; Sat, 21 Jun 2014 19:29:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5LJTevo052584; Sat, 21 Jun 2014 19:29:40 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5LJTeBH052583; Sat, 21 Jun 2014 19:29:40 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201406211929.s5LJTeBH052583@svn.freebsd.org> From: Mark Johnston Date: Sat, 21 Jun 2014 19:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267706 - head/sys/cddl/dev/sdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2014 19:29:41 -0000 Author: markj Date: Sat Jun 21 19:29:40 2014 New Revision: 267706 URL: http://svnweb.freebsd.org/changeset/base/267706 Log: 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. Reported by: hiren Tested by: hiren MFC after: 2 weeks Modified: head/sys/cddl/dev/sdt/sdt.c Modified: head/sys/cddl/dev/sdt/sdt.c ============================================================================== --- head/sys/cddl/dev/sdt/sdt.c Sat Jun 21 18:47:30 2014 (r267705) +++ head/sys/cddl/dev/sdt/sdt.c Sat Jun 21 19:29:40 2014 (r267706) @@ -257,27 +257,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); + } } }