Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 00:25:46 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269545 - stable/10/sys/cddl/dev/sdt
Message-ID:  <53e0248a.5b1f.74eb54e2@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Tue Aug  5 00:25:46 2014
New Revision: 269545
URL: http://svnweb.freebsd.org/changeset/base/269545

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/10/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c	Tue Aug  5 00:25:19 2014	(r269544)
+++ stable/10/sys/cddl/dev/sdt/sdt.c	Tue Aug  5 00:25:46 2014	(r269545)
@@ -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);
+		}
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e0248a.5b1f.74eb54e2>