svn commit: r269545 - stable/10/sys/cddl/dev/sdt

Mark Johnston markj at FreeBSD.org
Tue Aug 5 00:25:47 UTC 2014


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);
+		}
 	}
 }
 


More information about the svn-src-all mailing list