diff options
author | markj <markj@FreeBSD.org> | 2014-08-05 00:25:46 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2014-08-05 00:25:46 +0000 |
commit | 92ee24a48600d2c5ba18e62c5540e9f70d091ec3 (patch) | |
tree | 11ff013a1e0042aedd10ed61a28b3ab5e6b9184d /sys/cddl/dev/sdt | |
parent | a14261c0897b808f7557a5960fb3c6432f216d36 (diff) | |
download | FreeBSD-src-92ee24a48600d2c5ba18e62c5540e9f70d091ec3.zip FreeBSD-src-92ee24a48600d2c5ba18e62c5540e9f70d091ec3.tar.gz |
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.
Diffstat (limited to 'sys/cddl/dev/sdt')
-rw-r--r-- | sys/cddl/dev/sdt/sdt.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c index 03b6d86..0dd159e 100644 --- a/sys/cddl/dev/sdt/sdt.c +++ b/sys/cddl/dev/sdt/sdt.c @@ -259,27 +259,28 @@ sdt_kld_load(void *arg __unused, struct linker_file *lf) 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); + } } } |