Lines Matching refs:provider

171 static dtrace_provider_t *dtrace_provider;	/* provider list */
172 static dtrace_meta_t *dtrace_meta_pid; /* user-land meta provider */
205 * (2) dtrace_provider_lock is required when manipulating provider state, or
206 * when provider state must be held constant.
208 * (3) dtrace_meta_lock is required when manipulating meta provider state, or
209 * when meta provider state must be held constant.
226 static kmutex_t dtrace_provider_lock; /* provider state lock */
227 static kmutex_t dtrace_meta_lock; /* meta-provider state lock */
232 * These are the variables relating to DTrace as a provider (that is, the
233 * provider of the BEGIN, END, and ERROR probes).
1523 * specified by the provider to determine if we drop the probe or
1593 * privileges. If the provider has indicated that limited privileges
6517 * print the provider name, module name, function name and name of
6845 * is the function called by the provider to fire a probe -- from which all
6950 * If dtrace itself is the provider of this probe,
6962 * We're not currently active. If our provider isn't
6963 * the dtrace pseudo provider, we're not interested.
8155 * Register the calling provider with the DTrace framework. This should
8162 dtrace_provider_t *provider;
8165 cmn_err(CE_WARN, "failed to register provider '%s': invalid "
8171 cmn_err(CE_WARN, "failed to register provider '%s': invalid "
8172 "provider name", name);
8180 cmn_err(CE_WARN, "failed to register provider '%s': invalid "
8181 "provider ops", name);
8190 cmn_err(CE_WARN, "failed to register provider '%s': invalid "
8191 "provider attributes", name);
8196 cmn_err(CE_WARN, "failed to register provider '%s': invalid "
8204 cmn_err(CE_WARN, "failed to register provider '%s': need "
8209 provider = kmem_zalloc(sizeof (dtrace_provider_t), KM_SLEEP);
8210 provider->dtpv_name = kmem_alloc(strlen(name) + 1, KM_SLEEP);
8211 (void) strcpy(provider->dtpv_name, name);
8213 provider->dtpv_attr = *pap;
8214 provider->dtpv_priv.dtpp_flags = priv;
8216 provider->dtpv_priv.dtpp_uid = crgetuid(cr);
8217 provider->dtpv_priv.dtpp_zoneid = crgetzoneid(cr);
8219 provider->dtpv_pops = *pops;
8223 provider->dtpv_pops.dtps_provide =
8229 provider->dtpv_pops.dtps_provide_module =
8235 provider->dtpv_pops.dtps_suspend =
8237 provider->dtpv_pops.dtps_resume =
8241 provider->dtpv_arg = arg;
8242 *idp = (dtrace_provider_id_t)provider;
8250 * We make sure that the DTrace provider is at the head of
8251 * the provider chain.
8253 provider->dtpv_next = dtrace_provider;
8254 dtrace_provider = provider;
8262 * If there is at least one provider registered, we'll add this
8263 * provider after the first provider.
8266 provider->dtpv_next = dtrace_provider->dtpv_next;
8267 dtrace_provider->dtpv_next = provider;
8269 dtrace_provider = provider;
8273 dtrace_enabling_provide(provider);
8294 * Unregister the specified provider from the DTrace framework. This should
8308 * If DTrace itself is the provider, we're called with locks
8319 * There's another provider here; return failure.
8332 * provider has already been explicitly invalidated.
8346 * Attempt to destroy the probes associated with this provider.
8359 * If we are trying to unregister a defunct provider, and the
8360 * provider was made defunct within the interval dictated by
8362 * attempt to reap our enablings. To denote that the provider
8387 * All of the probes for this provider are disabled; we can safely
8413 * The provider's probes have been removed from the hash chains and
8441 "dtrace provider %p\n", (void *)id);
8460 * Invalidate the specified provider. All subsequent probe lookups for the
8461 * specified provider will fail, but its probes will not be removed.
8489 * provider.)
8495 * Remove all the unenabled probes for the given provider. This function is
8496 * not unlike dtrace_unregister(), except that it doesn't remove the provider
8507 * Make sure this isn't the dtrace provider itself.
8516 * Attempt to destroy the probes associated with this provider.
8567 dtrace_provider_t *provider = (dtrace_provider_t *)prov;
8570 if (provider == dtrace_provider) {
8587 probe->dtpr_provider = provider;
8632 if (provider != dtrace_provider)
8658 * Look up a probe based on provider and one or more of module name, function
8727 * specfied provider. If the specified description is NULL, the provider will
8730 * the specified description is non-NULL, the provider is given the
8733 * probes.) If the provider is NULL, the operations will be applied to all
8734 * providers; if the provider is non-NULL the operations will only be applied
8735 * to the specified provider. The dtrace_provider_lock must be held, and the
8736 * dtrace_lock must _not_ be held -- the provider's dtps_provide() operation
8883 dof_provider_t *provider;
8895 provider = (dof_provider_t *)(uintptr_t)(daddr + sec->dofs_offset);
8897 provider->dofpv_strtab * dof->dofh_secsize);
8899 provider->dofpv_probes * dof->dofh_secsize);
8901 provider->dofpv_prargs * dof->dofh_secsize);
8903 provider->dofpv_proffs * dof->dofh_secsize);
8914 provider->dofpv_prenoffs != DOF_SECT_NONE) {
8916 provider->dofpv_prenoffs * dof->dofh_secsize);
8923 * Create the provider.
8925 dtrace_dofprov2hprov(&dhpv, provider, strtab);
8997 dof_provider_t *provider;
9003 provider = (dof_provider_t *)(uintptr_t)(daddr + sec->dofs_offset);
9005 provider->dofpv_strtab * dof->dofh_secsize);
9010 * Create the provider.
9012 dtrace_dofprov2hprov(&dhpv, provider, strtab);
9060 cmn_err(CE_WARN, "failed to register meta-provider: "
9087 "user-land meta-provider exists", name);
9098 * off to the new meta provider now.
9136 "dtrace meta-provider %p\n", (void *)old);
11286 * If the provider shows more leg than the consumer is old
11306 * If the provider shows us kernel innards and the user
12225 * If a provider failed to enable a probe then get out and
12415 * We have ECBs on a defunct provider: we want to reap these
12416 * ECBs to allow the provider to unregister. The destruction
12423 * ECB for a defunct provider if, for the state that
12430 * provider became defunct.
12433 * switched twice since the provider became defunct.
12440 * with the defunct provider's probes.
12703 dtrace_dof_error(dof, "corrupt probe provider");
14828 * Look for a helper provider with the right generation. We
14847 * Move the last helper provider into this slot.
14856 * If we have a meta provider, remove this helper provider.
14978 * there aren't isn't a meta provider registered to deal with
14979 * these provider descriptions, we need to postpone creating
14999 * helper provider description, pass that off to the
15000 * meta provider.
15009 * Otherwise, just pass all the helper provider descriptions
15010 * off to the meta provider.
15112 dof_provider_t *provider;
15128 * The section needs to be large enough to contain the DOF provider
15135 dtrace_dof_error(dof, "provider section too small");
15139 provider = (dof_provider_t *)(uintptr_t)(daddr + sec->dofs_offset);
15140 str_sec = dtrace_dof_sect(dof, DOF_SECT_STRTAB, provider->dofpv_strtab);
15141 prb_sec = dtrace_dof_sect(dof, DOF_SECT_PROBES, provider->dofpv_probes);
15142 arg_sec = dtrace_dof_sect(dof, DOF_SECT_PRARGS, provider->dofpv_prargs);
15143 off_sec = dtrace_dof_sect(dof, DOF_SECT_PROFFS, provider->dofpv_proffs);
15152 provider->dofpv_prenoffs != DOF_SECT_NONE &&
15154 provider->dofpv_prenoffs)) == NULL)
15159 if (provider->dofpv_name >= str_sec->dofs_size ||
15160 strlen(strtab + provider->dofpv_name) >= DTRACE_PROVNAMELEN) {
15161 dtrace_dof_error(dof, "invalid provider name");
15715 * (It's normally up to the provider to make sure that
15998 * Before we register ourselves as a provider to our own framework,
16000 * not true if we were loaded as a dependency of a DTrace provider.
16002 * pseudo provider.
17056 * If there were ECBs on this state, the provider should