• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/xnu-2782.1.97/bsd/dev/dtrace/

Lines Matching +defs:this +defs:pp

4  * The contents of this file are subject to the terms of the
6 * You may not use this file except in compliance with the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
15 * If applicable, add the following below this CDDL HEADER, with the
123 /* Import this function to retrieve the physical memory. */
134 * In general, the only variables that one should be tuning this way are those
185 * well-known, zero-filled memory. While this variable is not documented,
283 * Lock asserts are changed like this:
372 * outside of the implementation. There is no real structure to this cpp
798 * Some functions in this block are not actually called from probe context;
840 * To save this code both the infamy of being fingered
844 * likelihood of this condition -- but suffice it to
978 * DTrace subroutines (DIF_SUBR_*) should use this helper to implement
1015 * this exists so that we don't need to issue unnecessary dtrace_strlen()
1242 * Zero the specified region using a simple byte-by-byte loop. Note that this
1353 * is null (anonymous tracing), we fast-path bypass this routine.
1382 * is null (anonymous tracing), we fast-path bypass this routine.
1544 * any work for this CPU -- it means that there has not been
1545 * a dtrace_dynvar() allocation on this CPU (or from this CPU)
1589 * into this dirty list; we can make it clean.
1609 * Depending on the value of the op parameter, this function looks-up,
1611 * allocation is requested, this function will return a pointer to a
1639 * over each referenced byte. It's painful to do this, but it's much
1691 * comes out to be one of our two sentinel hash values. If this
1754 * the line, one of the members of this hash
1756 * detect this by simply letting this loop run
1761 * long), so we catch this as early as
1763 * this case, we simply set dvar to NULL and
1838 * Finally, unlock this hash bucket.
1854 * was deleted while we were traversing it. In this case,
1895 * strange DIF specified the tuple. Ideally, this should be an
1900 * solving this would presumably not amount to solving the Halting
1922 * this CPU. Unless we have tried all CPUs,
1998 * It's impossible for this to fail: the only way
1999 * the free list can be updated is through this
2001 * Thus, it would only be possible for this to fail if
2002 * this code were racing with dtrace_dynvar_clean().
2022 * following the tuple array. As we do this, we relocate dttk_value
2055 * this hash chain, or another CPU is deleting an element from this
2157 int64_t this = 1, last, next;
2161 this *= factor;
2167 if (value < this)
2170 last = this;
2172 for (this *= factor; order <= high; ++order) {
2173 int nbuckets = this > nsteps ? nsteps : this;
2178 * overflow, but we nonetheless protect against this
2182 next = this * factor;
2183 if (next < this) {
2184 value = this - 1;
2188 * If our value lies within this order of magnitude,
2193 if (value < this) {
2194 return (base + (value - last) / (this / nbuckets));
2198 last = this;
2199 this = next;
2247 * we do this as 128-bit arithmetic.
2331 * buckets. If this guess ends up being routinely
2332 * off-the-mark, we may need to dynamically readjust this
2443 * the value at this key.
2531 * Given consumer state, this routine finds a speculation in the INACTIVE
2533 * in the INACTIVE state, 0 is returned. In this case, no error counter is
2564 * busy speculation buffer, we'll attribute this failure as "busy"
2576 * is not in a valid state to perform a commit(), this routine will silently do
2616 * without having done a prior speculate() on this CPU
2653 * We have set the state to indicate that we are committing this
2664 * We have the space; copy the buffer across. (Note that this is a
2665 * highly subobtimal bcopy(); in the unlikely event that this becomes
2696 * If we're lucky enough to be the only active CPU on this speculation
2715 * is not in a valid state to perform a discard(), this routine will silently
2951 * dtrace_dif_variable() uses this routine as a helper for various
2964 * The easy case: this probe is allowed to read all of memory, so
2965 * we can just return this as a vanilla pointer.
2972 * kernel memory into scratch memory and return it that way: this
3000 * If we're accessing one of the uncached arguments, we'll turn this
3038 * (None of this would be necessary if the compiler
3159 * If this is an unanchored probe, we are
3172 * We have failed to do this the quick way;
3709 * the string length or we have found the character. If this
3744 * the string length or we have found the string. (Yes, this
3809 * the string. Given this notion, Perl's
3816 * this case, even if the position is
3915 * strtok pointer from the mstate. Note that this
3925 * a chance to do so, since this address may reside
3926 * in the string table of this clause-- future calls
3928 * would fail this access check.
3968 * We return NULL in this case, and we set the saved
4276 * because lastdir is -1, we know that this
4279 * "/basename".) In this case, the last
4347 * just store the "/" and this character and
4369 * "/." and this character and continue
4383 * We'll store the "/.." and this character
5044 * then this is to be treated as a
5108 * For now, this has no meaning.
5133 * then this is to be treated as a
5286 * If this is a string type and the size is 0,
5290 * had this been set, we would expect to have
5603 * APPLE NOTE: this was for an old Mac OS X debug feature
5721 * exception to this rule, however.
5825 * abort processing -- this needn't be a fatal error -- but we
5827 * allow this condition to be warned about. (If this is from
5870 * this predicate would evaluate to be false.
5893 * to this point, is attributed to the current thread.
5984 * If dtrace itself is the provider of this probe,
6019 * If the dte_cond bits indicate that this
6021 * of this probe, call the provider's dtps_usermode()
6023 * while in a user context. Skip this ECB if that's
6036 * situations. Currently, the only times we'll this
6053 * XXX this is hackish, but so is setting a variable
6098 * on this state will be performed.
6243 * routine to perform this processing.
6368 * draining. If this fails (either because
6417 * If this is a string, we're going to only
6489 * this condition happened.
6536 /* FIXME: On Darwin the time spent leaving DTrace from this point to the rti is attributed
6558 * Solaris has some strong guarantees that this won't happen.
6586 * The functions in this section (and indeed, the functions in remaining
6587 * sections) are not _called_ from probe context. (Any exceptions to this are
6759 * Find the bucket that we're removing this probe from.
6771 * The removed probe was the only probe on this
6817 * this function returns a zero-length string.
7299 * described in <sys/dtrace.h>. The parts of the API not in this section are
7417 * If there is at least one provider registered, we'll add this
7486 * probes, we refuse to let providers slither away, unless this
7501 * Attempt to destroy the probes associated with this provider.
7505 * We have at least one ECB; we can't remove this provider.
7516 * All of the probes for this provider are disabled; we can safely
7637 * Make sure this isn't the dtrace provider itself.
7646 * Attempt to destroy the probes associated with this provider.
7683 * The functions in this section perform the DTrace probe management,
7897 * that this also prevents the mod_busy bits from changing.
8120 * any retained enablings. Note that this call will acquire both
8270 dtrace_meta_t **pp, *old = (dtrace_meta_t *)id;
8276 pp = &dtrace_meta_pid;
8288 *pp = NULL;
8650 * For user-defined variables, we need to check that this
8939 * We need to check this DIF object for references to the variable
8956 * malicious DIF -- but it works for all compiler-generated DIF. Because this
9085 * We have the size. If this is larger than the chunk size
9449 * cacheable predicates on this machine. We cannot allow any
9453 * have this cmn_err() "Holy shit -- we executed this code!")
9590 * If this state is active, we must dtrace_sync()
9636 * We're the first ECB on this probe.
9924 * We need to allocate an id for this aggregation.
10002 * If this is an aggregating action, there must be neither
10178 * If this is a data-storing action or a speculate,
10399 * model to be enforced, and this is what DTRACE_COND_OWNER
10465 * This probe was created in a generation for which this
10526 * buffers on a given CPU. The atomicity of this operation is assured by
10571 * but this isn't necessarily true: the buffer for the CPU
10573 * manually. In this case, we take the (harmless) action
10617 * If there is already a buffer allocated for this CPU, it
10618 * is only possible that this is a DR event. In this case,
10786 * to an error or false predicate evaluation. In this
10789 * for this allocation, it will be adjusted in the
10873 * this case, the buffer is indistinguishable
10951 * between the buffer offset and the wrapped offset. In this case,
10960 * didn't subsequently consume the buffer space. In this case,
10968 * was not subsequently consumed. In this case, we need to zero the
11043 /* APPLE NOTE: this protects against gcc 4.0 botch on x86 */
11142 * If this was a retained enabling, decrement the dts_nretained count
11336 * the face of such errors. If this is an anonymous
11370 * against them. We only perform this operation on enablings for which
11397 * transition out of DTRACE_ACTIVITY_INACTIVE. To do this without actually
11399 * NULL probe -- which is exactly what this function does.
11500 * DOF containing the run-time options -- but this could be expanded to create
11703 * this type and NULL is returned if the types do not match.
11935 * known to us, assume this is a broken program and fail.
11956 * this should _not_ happen if the "strsize" option has been set --
11957 * in this case, the compiler should have set the size to reflect the
12635 * Darwin's DEVFS layer acquired the minor number for this "device" when it called
12682 * We allocate NCPU buffers. On the one hand, this can be quite
12728 * Set up the credentials for this instantiation. We take a
12730 * us; this in turn prevents the zone_t referenced by this
12770 * If we have all privs in whatever zone this is,
12791 * this doesn't mean that all actions become available
12801 * for *this* zone are allowed.
12809 * for this user/group ID in all zones is allowed.
12816 * If we have all privs in whatever zone this is,
12895 * of ENOMEM in this case to allow for user-level
12985 * retained enablings that correspond to this state.
12999 * this fails, we will fail the operation.
13069 * aggregations -- set this option to 0.
13173 * probe (the data from this CPU will be processed first at user
13174 * level) and to manually activate the buffer for this CPU.
13197 * INACTIVE state. Doing this assures that no CPU will suddenly begin
13251 * on why this is done.
13257 * By this point, it is impossible for any CPU to be still processing
13272 * allows user-land to be sure that this CPU's principal buffer is
13327 * If this is an otherwise negative value, set it to
13331 * this has no effect -- if we set the buffer size to
13364 * First, retract any retained enablings for this state.
13375 * exiting without having called dtrace_stop().) In this case,
13514 * this fails (e.g. because the debugger has modified text in
13539 * processing anonymous state in this case.
13686 * from machine state; this is okay, too.
13824 * Move the last helper provider into this slot.
13833 * If we have a meta provider, remove this helper provider.
13890 * If we already have dtrace_helper_actions_max helper actions for this
14021 * Check to make sure this isn't a duplicate.
14359 * Adding this helper action failed -- we are now going
14404 * To reduce this cost, we use "lazy dof". The normal proceedure for
14417 * There are a few catches that make this slightly more difficult.
14420 * this is the generation that dof was loaded in. If we hand back
14422 * dof once it has become non-lazy. To meet this requirement, the
14449 * If the dofs data is claimed by this method, dofs_claimed will be set.
14682 * In theory we should hold the child sprlock, but this is safe...
14720 * It is possible this process may exit during our attempt to
14721 * fault in the dof. We could fix this by holding locks longer,
14727 * In this case only, it is okay to have lazy dof when dof mode is DTRACE_DOF_MODE_LAZY_OFF
14774 * when we released the dtrace lock. We have to dump this generation,
14833 * We're now going to lose the help from this process.
15080 /* There should NEVER be user symbols allocated at this point */
15100 /* There should NEVER be user symbols allocated at this point */
15135 * Have we seen this kext before?
15141 /* bail... we already have this kext in the modctl list */
15170 * Find the UUID for this module, if it has one
15208 * OSBundleForceDTraceInit (see kmod.h). If this per kext state is set,
15209 * we fall through and instrument this module now.
15212 * from kernel space (see dtrace_impl.h). If this system state is set
15219 /* We will instrument the module lazily -- this is the default */
15233 * specifying only this module.
15239 * APPLE NOTE: The contract with the kext loader is that once this function
15241 * We must set this while still holding the mod_lock.
15252 * module. (In particular, this happens when loading scheduling
15346 /* keep track of next syncctl in case this one is removed */
15361 * this can't happen.) However, because dtps_enable()
15675 * that there should be no other retained enablings at this time:
15676 * the only retained enablings at this time should be the anonymous
15817 * NOTE! It may appear there is a race by setting this value so late
15821 * calling dtrace_open() (this call!) will get a list of kexts needing
15824 * We want to set this value only after it certain it will succeed, as
15825 * this significantly reduces the complexity of error exits.
15881 * If we are currently lazy-off, and this is the last close, transition to
15916 * Safe to check this outside the dof mode lock
15959 /* NOTE! We can no longer exit this method via return */
16217 * If this action has a record size of zero, it
16219 * Because the presence of this record doesn't (or
16293 * If a NULL argument has been passed, we take this as our
16390 * Before we attempt to match this probe, we want to give
16485 * There isn't any typed information for this probe.
16583 * If this buffer has already been consumed, we're
16603 * If this is a ring buffer that has wrapped, we want
16648 * not in the ready set. If this is the case, we'll return
16819 * Security restrictions make this operation illegal, if this is enabled DTrace
16828 * Fail if the kernel symbol mode makes this operation illegal.
16861 * If the user specified count is zero, then this serves as a
16892 * If we reach this point, then we have a request for full list data.
16899 /* NOTE! We can no longer exit this method via return */
16974 * Security restrictions make this operation illegal, if this is enabled DTrace
16983 * Fail if the kernel symbol mode makes this operation illegal.
17021 /* NOTE! We can no longer exit this method via return */
17064 * specifying only this module.
17072 ctl->mod_user_symbols = NULL; /* MUST reset this to clear HAS_USERSPACE_SYMBOLS */
17107 /* The process was suspended, revert this since the client will not do it. */
17171 * If there were ECBs on this state, the provider should
17467 * this value, we'll consider that we have 1Gb of memory per CPU, that's
17536 * On some architectures, this may mean that the page(s) containing the
17538 * is up to the platform to assure that this is performed properly. Note that