11.2 profile Provider

11.2.1 profile-n Probes
11.2.2 tick-n Probes
11.2.3 Probe Creation
11.2.4 Stability

The profile provider provides probes associated with a time-based interrupt firing every fixed, specified time interval. Such unanchored probes are not associated with any particular point of execution, but rather with the asynchronous interrupt event. You can use these probes to sample some aspect of system state and then use the samples to infer system behavior. If the sampling rate is high, or the sampling time is long, an accurate inference is possible. Using DTrace actions, you can use the profile provider to sample practically anything in the system. For example, you could sample the state of the current thread, the state of the CPU, or the current machine instruction.

11.2.1 profile-n Probes

profile-n probes fire at a fixed interval at high-interrupt level on all active CPUs. The units of n default to a frequency expressed as a rate of firing per second, but the value can also have an optional suffix as shown in Table 11.1, “Valid Time Suffixes”, which specifies either a time interval or a frequency.

Table 11.1 Valid Time Suffixes

Suffix

Time Units

nsec or ns

nanoseconds

usec or us

microseconds

msec or ms

milliseconds

sec or s

seconds

min or m

minutes

hour or h

hours

day or d

days

hz

hertz (frequency expressed as rate per second)


11.2.2 tick-n Probes

tick-n probes fire at fixed intervals at a high interrupt level on only one CPU per interval. Unlike profile-n probes, which fire on every CPU, tick-n probes fire on only one CPU per interval and the CPU on which they fire can change over time. The units of n default to a frequency expressed as a rate of firing per second, but the value can also have an optional time suffix as shown in Table 11.1, “Valid Time Suffixes”, which specifies either a time interval or a frequency.

tick-n probes have several uses, such as providing some periodic output or taking a periodic action.

Note

By default, the highest supported tick frequency is 5000 Hz (tick-5000).

11.2.3 Probe Creation

Unlike other providers, the profile provider creates probes dynamically on an as-needed basis. Thus, the desired probe might not appear in a listing of all probes (for example, by using dtrace -l -P profile) but the probe is created when it is explicitly enabled.

A time interval that is too short causes the machine to continuously field time-based interrupts and denies service on the machine. The profile provider silently refuses to create a probe that would result in an interval of less than two hundred microseconds.

11.2.4 Stability

The profile provider uses DTrace's stability mechanism to describe its stabilities as shown in the following table.

Element

Name Stability

Data Stability

Dependency Class

Provider

Evolving

Evolving

Common

Module

Unstable

Unstable

Unknown

Function

Private

Private

Unknown

Name

Evolving

Evolving

Common

Arguments

Evolving

Evolving

Common

For more information about the stability mechanism, see Chapter 15, Stability.