Lines Matching refs:ctl

8576 	struct modctl *ctl;
8601 ctl = &modules;
8603 if (ctl->mod_busy || ctl->mod_mp == NULL)
8606 prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl);
8608 } while ((ctl = ctl->mod_next) != &modules);
8610 ctl = dtrace_modctl_list;
8611 while (ctl) {
8612 prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl);
8613 ctl = ctl->mod_next;
16215 struct modctl * ctl;
16217 for (ctl = dtrace_modctl_list; ctl; ctl=ctl->mod_next) {
16218 if (ctl->mod_id == kmod->id)
16219 return(ctl);
16230 dtrace_modctl_remove(struct modctl * ctl)
16232 ASSERT(ctl != NULL);
16237 for (curp=ctl->mod_stale; curp != NULL; curp=nextp) {
16247 while (curp != ctl) {
16253 prevp->mod_next = ctl->mod_next;
16256 dtrace_modctl_list = ctl->mod_next;
16260 ASSERT(ctl->mod_user_symbols == NULL);
16262 kmem_free (ctl, sizeof(modctl_t));
16278 dtrace_module_loaded(struct modctl *ctl)
16290 ASSERT(ctl->mod_busy);
16300 struct modctl *ctl = NULL;
16311 ctl = dtrace_modctl_lookup(kmod);
16313 if (ctl != NULL) {
16318 cmn_err(CE_WARN, "dtrace load module already exists '%s %u' is failing against '%s %u'", kmod->name, (uint_t)kmod->id, ctl->mod_modname, ctl->mod_id);
16322 ctl = kmem_alloc(sizeof(struct modctl), KM_SLEEP);
16323 if (ctl == NULL) {
16330 ctl->mod_next = NULL;
16331 ctl->mod_stale = NULL;
16332 strlcpy (ctl->mod_modname, kmod->name, sizeof(ctl->mod_modname));
16333 ctl->mod_loadcnt = kmod->id;
16334 ctl->mod_nenabled = 0;
16335 ctl->mod_address = kmod->address;
16336 ctl->mod_size = kmod->size;
16337 ctl->mod_id = kmod->id;
16338 ctl->mod_loaded = 1;
16339 ctl->mod_flags = 0;
16340 ctl->mod_user_symbols = NULL;
16345 kernel_mach_header_t* header = (kernel_mach_header_t *)ctl->mod_address;
16351 memcpy(ctl->mod_uuid, uuid_cmd->uuid, sizeof(uuid_cmd->uuid));
16352 ctl->mod_flags |= MODCTL_HAS_UUID;
16358 if (ctl->mod_address == g_kernel_kmod_info.address) {
16359 ctl->mod_flags |= MODCTL_IS_MACH_KERNEL;
16362 dtrace_modctl_add(ctl);
16400 ctl->mod_flags |= MODCTL_HAS_KERNEL_SYMBOLS;
16410 prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl);
16418 ctl->mod_flags &= ~MODCTL_HAS_KERNEL_SYMBOLS;
16478 dtrace_module_unloaded(struct modctl *ctl)
16483 template.dtpr_mod = ctl->mod_modname;
16519 "enabled probes", ctl->mod_modname);
16581 struct modctl *ctl = NULL;
16594 ctl = dtrace_modctl_lookup(kmod);
16595 if (ctl == NULL)
16602 ctl->mod_loaded = 0;
16603 ctl->mod_address = 0;
16604 ctl->mod_size = 0;
16612 if (ctl != NULL)
16613 (void)dtrace_modctl_remove(ctl);
16643 ctl = syncctl;
16647 template.dtpr_mod = ctl->mod_modname;
16675 "enabled probes", ctl->mod_modname);
16722 dtrace_modctl_remove(ctl);
19030 struct modctl* ctl = dtrace_modctl_list;
19031 while (ctl) {
19032 ASSERT(!MOD_HAS_USERSPACE_SYMBOLS(ctl));
19033 if (!MOD_SYMBOLS_DONE(ctl)) {
19037 ctl = ctl->mod_next;
19077 struct modctl* ctl = dtrace_modctl_list;
19078 while (ctl) {
19084 ASSERT(!MOD_HAS_USERSPACE_SYMBOLS(ctl));
19085 if (!MOD_SYMBOLS_DONE(ctl)) {
19088 memcpy(uuid, ctl->mod_uuid, sizeof(UUID));
19091 ctl = ctl->mod_next;
19185 struct modctl* ctl = dtrace_modctl_list;
19186 while (ctl) {
19187 ASSERT(!MOD_HAS_USERSPACE_SYMBOLS(ctl));
19188 if (MOD_HAS_UUID(ctl) && !MOD_SYMBOLS_DONE(ctl)) {
19189 if (memcmp(module_symbols->dtmodsyms_uuid, ctl->mod_uuid, sizeof(UUID)) == 0) {
19191 ctl->mod_user_symbols = module_symbols;
19195 ctl = ctl->mod_next;
19198 if (ctl) {
19206 prv->dtpv_pops.dtps_provide_module(prv->dtpv_arg, ctl);
19211 ctl->mod_user_symbols = NULL; /* MUST reset this to clear HAS_USERSPACE_SYMBOLS */