See: Description
| Enum | Description |
|---|---|
| DependencyClass |
Enumeration for the DTrace dependency classes.
|
| StabilityLevel |
Enumeration for the DTrace stability levels.
|
| Annotation Type | Description |
|---|---|
| ArgsAttributes |
This annotation describes the interface attributes of the probe arguments in
a single provider.
|
| Attributes |
This annotation describes the interface's field attributes
for the probes in a provider.
|
| FunctionAttributes |
This annotation describes the interface attributes of the
function field for a single provider. |
| FunctionName |
An annotation used to specify the
function field for a DTrace probe. |
| ModuleAttributes |
This annotation is used to describe the interface attributes of the
module field for a single provider. |
| ModuleName |
An annotation used to specify the
module field for a DTrace probe. |
| NameAttributes |
This annotation describes the interface attributes of the
name field for a single provider. |
| ProviderAttributes |
This annotation is used to describe the interface attributes of the
provider field for a single provider. |
The DTrace-specific annotations modify the attributes of a DTrace provider
implementation when it is used by the tracing subsystem. The annotations are
added to a com.sun.tracing provider specification to control
specific attributes of the provider as it relates to DTrace.
Any other tracing subsystems supported by the system will ignore these annotations.
DTrace probes have additional fields and stability attributes that are not accounted for in the generic tracing package. If unspecified, the default values are used for the stability and dependency attributes of probes, as well as for the module and field names of the generated probes. The values can be specified by adding the appropriate annotations to the provider specification.
The FunctionName annotation is used to annotate the tracepoint
methods defined in the provider specification. The value of this annotation
is used as the function field in the generated DTrace probes. It
is typically set to the name of the enclosing function where the
tracepoint is triggered.
The ModuleName annotation is used to annotate the provider
specification itself and applies to all the probes in the provider. It
sets the value of the module field in the generated DTrace probes.
The remaining annotations, are also applied to the provider itself, and are used to set the stability and dependency attributes of all probes in that provider. Each probe field and the probe arguments can be independently assigned interface attributes to control the stability ratings of the probes.
Here is an example of how to declare a provider, specifying additional DTrace data:
@ProviderName("my_app_provider")
@ModuleName("app.jar")
@ProviderAttributes(@Attributes={
name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
dependency=DependencyClass.COMMON})
@ProbeAttributes(@Attributes={
name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
dependency=DependencyClass.COMMON})
@ModuleAttributes(@Attributes={name=StabilityLevel.UNSTABLE})
public class MyProvider {
@FunctionName("main") void startProbe();
}
Copyright © 2012. All Rights Reserved.