|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.os.dtrace.Option
public final class Option
A DTrace option and its value. Compile-time options must be set
before calling Consumer
compile(String program, ...)
or compile(File
program, ...)
in order to affect program compilation. Runtime
options may be set anytime before calling Consumer
go()
, and some of them may be changed while a consumer
is running.
See the Options and Tunables chapter of the Solaris Dynamic Tracing Guide.
Immutable. Supports persistence using XMLEncoder
.
Field Summary | |
---|---|
static java.lang.String |
aggrate
Rate of aggregation reading (time). |
static java.lang.String |
aggsize
Aggregation buffer size (size). |
static java.lang.String |
aggsortkey
Denotes that aggregation data should be sorted in tuple order, with ties broken by value order (no option value). |
static java.lang.String |
aggsortkeypos
When multiple aggregation tuple elements are present, the position of the tuple element that should act as the primary sort key (zero-based index). |
static java.lang.String |
aggsortpos
When multiple aggregations are being printed, the position of the aggregation that should act as the primary sort key (zero-based index). |
static java.lang.String |
aggsortrev
Denotes that aggregation data should be sorted in descending order (no option value). |
static java.lang.String |
amin
Set program attribute minimum (compile-time). |
static java.lang.String |
argref
Do not require all macro args to be used (compile-time; no option value). |
static java.lang.String |
bufpolicy
Buffering policy ( switch , fill , or ring ). |
static long |
BUFPOLICY_FILL
Value returned by Consumer.getOption(String option) for
the bufpolicy option when the fill
buffer policy is set. |
static long |
BUFPOLICY_RING
Value returned by Consumer.getOption(String option) for
the bufpolicy option when the ring
buffer policy is set. |
static long |
BUFPOLICY_SWITCH
Value returned by Consumer.getOption(String option) for
the bufpolicy option when the default switch buffer policy is set. |
static java.lang.String |
bufresize
Buffer resizing policy ( auto or manual ). |
static long |
BUFRESIZE_AUTO
Value returned by Consumer.getOption(String option) for
the bufresize option when the default auto buffer resize policy is set. |
static long |
BUFRESIZE_MANUAL
Value returned by Consumer.getOption(String option) for
the bufresize option when the manual buffer resize policy is set. |
static java.lang.String |
bufsize
Principal buffer size (size). |
static java.lang.String |
cleanrate
Cleaning rate (time). |
static java.lang.String |
cpp
Run cpp(1) preprocessor on D script files (compile-time; no option value). |
static java.lang.String |
cpppath
Used together with cpp option, specifies which cpp to run by its pathname (compile-time). |
static java.lang.String |
cpu
CPU on which to enable tracing (scalar). |
static java.lang.String |
defaultargs
Use zero (0) or empty string ("") as the value for unspecified macro args (compile-time; no option value). |
static java.lang.String |
define
Define symbol when invoking preprocssor (compile-time). |
static java.lang.String |
destructive
Permit destructive actions (no option value). |
static java.lang.String |
dynvarsize
Dynamic variable space size (size). |
static java.lang.String |
empty
Permit compilation of empty D source files (compile-time; no option value). |
static java.lang.String |
errtags
Adds error tags to default error messages (compile-time; no option value). |
static java.lang.String |
flowindent
Adds Flow information to generated ProbeData
indicating direction of control flow (entry or return) across
function boundaries and depth in call stack (no option value). |
static java.lang.String |
incdir
Add include directory to preprocessor search path (compile-time). |
static java.lang.String |
knodefs
Permit unresolved kernel symbols (compile-time; no option value). |
static java.lang.String |
libdir
Add library directory to library search path (compile-time). |
static java.lang.String |
nspec
Number of speculations (scalar). |
static java.lang.String |
quiet
Only output explicitly traced data (no option value). |
static java.lang.String |
specsize
Speculation buffer size (size). |
static java.lang.String |
stackframes
Number of stack frames (scalar). |
static java.lang.String |
statusrate
Rate of status checking (time). |
static java.lang.String |
stdc
Specify ISO C conformance settings for preprocessor (compile-time). |
static java.lang.String |
strsize
String size (size). |
static java.lang.String |
switchrate
Rate of buffer switching (time). |
static java.lang.String |
undef
Undefine symbol when invoking preprocessor (compile-time). |
static java.lang.String |
unodefs
Permit unresolved user symbols (compile-time; no option value). |
static long |
UNSET
Value returned by Consumer.getOption(String option) when
the given boolean option is unset. |
static java.lang.String |
ustackframes
Number of user stack frames (scalar). |
static java.lang.String |
VALUE_AUTO
bufresize default value: use auto buffer
resizing policy. |
static java.lang.String |
VALUE_FILL
bufpolicy value: use fill princical buffer
policy. |
static java.lang.String |
VALUE_MANUAL
bufresize value: use manual buffer resizing
policy. |
static java.lang.String |
VALUE_RING
bufpolicy value: use ring princical buffer
policy. |
static java.lang.String |
VALUE_SET
May be passed to Consumer.setOption(String option, String
value) to set a boolean option such as flowindent . |
static java.lang.String |
VALUE_SWITCH
bufpolicy default value: use switch princical
buffer policy. |
static java.lang.String |
VALUE_UNSET
May be passed to Consumer.setOption(String option, String
value) to unset a boolean option such as flowindent . |
static java.lang.String |
version
Request specific version of native DTrace library (compile-time). |
static java.lang.String |
zdefs
Permit probe definitions that match zero probes (compile-time; no option value). |
Constructor Summary | |
---|---|
Option(java.lang.String optionName)
Creates an option without an associated value. |
|
Option(java.lang.String optionName,
java.lang.String optionValue)
Creates an option with the given name and value. |
Method Summary | |
---|---|
static java.lang.String |
days(int n)
Gets a time option value indicating the given number of days. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this option for equality. |
static java.lang.String |
gb(int n)
Gets a size option value indicating the given number of gigabytes. |
java.lang.String |
getName()
Gets the option name. |
java.lang.String |
getValue()
Gets the option value. |
int |
hashCode()
Overridden to ensure that equal options have equal hashcodes. |
static java.lang.String |
hours(int n)
Gets a time option value indicating the given number of hours. |
static java.lang.String |
hz(int n)
Gets a time option value indicating the given rate per second. |
static java.lang.String |
kb(int n)
Gets a size option value indicating the given number of kilobytes. |
static java.lang.String |
mb(int n)
Gets a size option value indicating the given number of megabytes. |
static java.lang.String |
micros(int n)
Gets a time option value indicating the given number of microseconds. |
static java.lang.String |
millis(int n)
Gets a time option value indicating the given number of milliseconds. |
static java.lang.String |
minutes(int n)
Gets a time option value indicating the given number of minutes. |
static java.lang.String |
nanos(int n)
Gets a time option value indicating the given number of nanoseconds. |
static java.lang.String |
seconds(int n)
Gets a time option value indicating the given number of seconds. |
static java.lang.String |
tb(int n)
Gets a size option value indicating the given number of terabytes. |
java.lang.String |
toString()
Gets a string representation of this option useful for logging and not intended for display. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long UNSET
Consumer.getOption(String option)
when
the given boolean option is unset.
public static final long BUFPOLICY_RING
Consumer.getOption(String option)
for
the bufpolicy
option when the ring
buffer policy is set.
public static final long BUFPOLICY_FILL
Consumer.getOption(String option)
for
the bufpolicy
option when the fill
buffer policy is set.
public static final long BUFPOLICY_SWITCH
Consumer.getOption(String option)
for
the bufpolicy
option when the default switch
buffer policy is set.
public static final long BUFRESIZE_AUTO
Consumer.getOption(String option)
for
the bufresize
option when the default auto
buffer resize policy is set.
public static final long BUFRESIZE_MANUAL
Consumer.getOption(String option)
for
the bufresize
option when the manual
buffer resize policy is set.
public static final java.lang.String VALUE_SET
Consumer.setOption(String option, String
value)
to set a boolean option such as flowindent
.
However, a more convenient way to set boolean options is Consumer.setOption(String option)
.
public static final java.lang.String VALUE_UNSET
Consumer.setOption(String option, String
value)
to unset a boolean option such as flowindent
.
However, a more convenient way to unset boolean options is Consumer.unsetOption(String option)
.
public static final java.lang.String VALUE_RING
bufpolicy
value: use ring
princical buffer
policy.
public static final java.lang.String VALUE_FILL
bufpolicy
value: use fill
princical buffer
policy.
public static final java.lang.String VALUE_SWITCH
bufpolicy
default value: use switch
princical
buffer policy.
public static final java.lang.String VALUE_AUTO
bufresize
default value: use auto
buffer
resizing policy.
public static final java.lang.String VALUE_MANUAL
bufresize
value: use manual
buffer resizing
policy.
public static final java.lang.String amin
InterfaceAttributes.toString()
method.
Program.getInfo()
,
Constant Field Valuespublic static final java.lang.String argref
Consumer.compile(String program, String[] macroArgs)
,
Consumer.compile(File program, String[] macroArgs)
,
Constant Field Valuespublic static final java.lang.String cpp
public static final java.lang.String cpppath
cpp
option, specifies which cpp
to run by its pathname (compile-time).
public static final java.lang.String defaultargs
Consumer.compile(String program, String[] macroArgs)
,
Consumer.compile(File program, String[] macroArgs)
,
Constant Field Valuespublic static final java.lang.String define
public static final java.lang.String empty
public static final java.lang.String errtags
public static final java.lang.String incdir
public static final java.lang.String knodefs
public static final java.lang.String libdir
public static final java.lang.String stdc
public static final java.lang.String undef
public static final java.lang.String unodefs
public static final java.lang.String version
public static final java.lang.String zdefs
public static final java.lang.String aggrate
public static final java.lang.String aggsize
public static final java.lang.String aggsortkey
AggregationRecord
,
aggsortkeypos
,
aggsortpos
,
aggsortrev
,
Constant Field Valuespublic static final java.lang.String aggsortkeypos
aggsortkey
,
aggsortpos
,
aggsortrev
,
Constant Field Valuespublic static final java.lang.String aggsortpos
Here "position" refers to the position of the aggregation in the
printa()
argument list after the format string (if
any). For example, given the following statement:
printa("%d %@7d %@7d\n", @a, @b);
setting aggsortpos
to "0"
indicates that output
should be sorted using the values of @a
as the primary
sort key, while setting aggsortpos
to "1"
indicates that output should be sorted using the values of
@b
as the primary sort key.
aggsortkey
,
aggsortkeypos
,
aggsortrev
,
Constant Field Valuespublic static final java.lang.String aggsortrev
The aggsortrev
option is useful in combination with the
aggsortkey
, aggsortkeypos
, and aggsortpos
options, which define the ascending sort reversed by this option.
aggsortkey
,
aggsortkeypos
,
aggsortpos
,
Constant Field Valuespublic static final java.lang.String bufsize
public static final java.lang.String bufpolicy
switch
, fill
, or ring
). Runtime option.
See the Principal Buffer Policies section of the Buffers and Buffering chapter of the Solaris Dynamic Tracing Guide.
public static final java.lang.String bufresize
auto
or manual
). Runtime option.
See the Buffer Resizing Policy section of the Buffers and Buffering chapter of the Solaris Dynamic Tracing Guide.
public static final java.lang.String cleanrate
public static final java.lang.String cpu
public static final java.lang.String destructive
public static final java.lang.String dynvarsize
public static final java.lang.String flowindent
Flow
information to generated ProbeData
indicating direction of control flow (entry or return) across
function boundaries and depth in call stack (no option value).
Runtime option.
public static final java.lang.String nspec
public static final java.lang.String quiet
ProbeData
, but user apps may use
the quiet
flag as a rendering hint similar to the -q
dtrace(1M)
command option. Runtime option.
public static final java.lang.String specsize
public static final java.lang.String stackframes
public static final java.lang.String statusrate
public static final java.lang.String strsize
public static final java.lang.String switchrate
public static final java.lang.String ustackframes
Constructor Detail |
---|
public Option(java.lang.String optionName)
VALUE_SET
. To
specify that the named option be unset, use VALUE_UNSET
.
optionName
- DTrace option name
java.lang.NullPointerException
- if the given option name is null
Option(String optionName, String optionValue)
public Option(java.lang.String optionName, java.lang.String optionValue)
optionName
- DTrace option nameoptionValue
- DTrace option value
java.lang.NullPointerException
- if the given option name or value is
null
Method Detail |
---|
public static java.lang.String kb(int n)
n
- number of kilobytes
public static java.lang.String mb(int n)
n
- number of megabytes
public static java.lang.String gb(int n)
n
- number of gigabytes
public static java.lang.String tb(int n)
n
- number of terabytes
public static java.lang.String nanos(int n)
n
- number of nanoseconds
public static java.lang.String micros(int n)
n
- number of microseconds
public static java.lang.String millis(int n)
n
- number of milliseconds
public static java.lang.String seconds(int n)
n
- number of seconds
public static java.lang.String minutes(int n)
n
- number of minutes
public static java.lang.String hours(int n)
n
- number of hours
public static java.lang.String days(int n)
n
- number of days
public static java.lang.String hz(int n)
n
- number of cycles per second (hertz)
public java.lang.String getName()
public java.lang.String getValue()
null
if no value is associated
with the optionpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
true
if and only if the specified object is an
Option
with the same name and the same value as this
option. Option values are the same if they are both null
or if they are equal as defined by String.equals()
.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
class-name[property1 = value1, property2 = value2]
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |