2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A * If a probe was discovered from the kernel, ask dtrace(7D) for a description 2N/A * of each of its arguments, including native and translated types. 2N/A break;
/* all argument descs have been retrieved */ 2N/A * Now that we have discovered the number of native and translated 2N/A * arguments from the argument descriptions, allocate a new probe ident 2N/A * and corresponding dt_probe_t and hash it into the provider. 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A * Once our new dt_probe_t is fully constructed, iterate over the 2N/A * cached argument descriptions and assign types to prp->pr_nargv[] 2N/A * and prp->pr_xargv[] and assign mappings to prp->pr_mapping[]. 2N/A * Lookup a probe declaration based on a known provider and full or partially 2N/A * specified module, function, and name. If the probe is not known to us yet, 2N/A * ask dtrace(7D) to match the description and then cache any useful results. 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A * If the probe is already declared, then return the dt_probe_t from 2N/A * the existing identifier. This could come from a static declaration 2N/A * or it could have been cached from an earlier call to this function. 2N/A * If the probe isn't known, use the probe description computed above 2N/A * to ask dtrace(7D) to find the first matching probe. 2N/A * If only a single prototype is given, set xargc/s to nargc/s to 2N/A * simplify subsequent use. Note that we can have one or both of nargs 2N/A * and xargs be specified but set to NULL, indicating a void prototype. 2N/A * Lookup the dynamic translator type tag for the specified probe argument and 2N/A * assign the type to the specified node. If the type is not yet defined, add 2N/A * it to the "D" module's type container as a typedef for an unknown type. 2N/A * Attempt to lookup the probe in our existing cache for this provider. 2N/A * If none is found and an explicit probe ID was specified, discover 2N/A * that specific probe and cache its description and arguments. 2N/A * If no probe was found in our cache, convert the caller's partial 2N/A * probe description into a fully-formed matching probe description by 2N/A * iterating over up to at most two probes that match 'pdp'. We then 2N/A * call dt_probe_discover() on the resulting probe identifier. 2N/A * Call dtrace_probe_iter() to find matching probes. Our 2N/A * dt_probe_desc() callback will produce the following results: 2N/A * m < 0 dtrace_probe_iter() found zero matches (or failed). 2N/A * m > 0 dtrace_probe_iter() found more than one match. 2N/A * m = 0 dtrace_probe_iter() found exactly one match. 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A * If more than one probe was matched, then do not report probe 2N/A * information if either of the following conditions is true: 2N/A * (a) The Arguments Data stability of the matched provider is 2N/A * less than Evolving. 2N/A * (b) Any description component that is at least Evolving is 2N/A * empty or is specified using a globbing expression. 2N/A * These conditions imply that providers that provide Evolving 2N/A * or better Arguments Data stability must guarantee that all 2N/A * probes with identical field names in a field of Evolving or 2N/A * better Name stability have identical argument signatures. 2N/A * If we matched a probe exported by dtrace(7D), then discover 2N/A * the real attributes. Otherwise grab the static declaration. 2N/A return (
NULL);
/* dt_errno is set for us */ 2N/A * Compute the probe description attributes by taking the minimum of 2N/A * the attributes of the specified fields. If no provider is specified 2N/A * or a glob pattern is used for the provider, use Unstable attributes. 2N/A return (0);
/* continue on and examine next probe in hash */ 2N/A continue;
/* we'll get these later using dt_ioctl() */