JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Dynamic Tracing Guide     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information


1.  About DTrace

2.  D Programming Language

3.  Aggregations

4.  Actions and Subroutines

5.  Buffers and Buffering

6.  Output Formatting

7.  Speculative Tracing

Speculation Interfaces

Creating a Speculation

Using a Speculation

Committing a Speculation

Discarding a Speculation

Speculation Example

Speculation Options and Tuning

8.  dtrace(1M) Utility

9.  Scripting

10.  Options and Tunables

11.  Providers

12.  User Process Tracing

13.  Statically Defined Tracing for User Applications

14.  Security

15.  Anonymous Tracing

16.  Postmortem Tracing

17.  Performance Considerations

18.  Stability

19.  Translators

20.  Versioning

Creating a Speculation

The speculation function allocates a speculative buffer, and returns a speculation identifier. The speculation identifier should be used in subsequent calls to the speculate function. Speculative buffers are a finite resource: if no speculative buffer is available when speculation is called, an ID of zero is returned and a corresponding DTrace error counter is incremented. An ID of zero is always invalid, but may be passed to speculate, commit or discard. If a call to speculation fails, a dtrace message similar to the following example is generated:

dtrace: 2 failed speculations (no speculative buffer space available)

The number of speculative buffers defaults to one, but may be optionally tuned higher. See Speculation Options and Tuning for more information.