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
This commit is contained in:
parent
c26daf53f5
commit
9338d20884
@ -257,27 +257,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user