Enumerations
enum class SamplingState : uint8_t
| Name | Value | Comments |
|---|---|---|
| Unallocated | 0 |
The idle state for the sampler. We're not actively sampling nor is there a user handle |
| Configured | 1 |
We have buffers allocated and the user has a handle to us and can start a session. Reading is |
| Running | 2 |
The session is in progress. We are taking samples and writing data. Both reading and writing |
| Stopping | 3 |
The session is stopping, no more write references to the buffers are allowed to be created and |
| Destroying | 4 |
We have stopped giving out read references and are waiting for all existing read references to |
The current state of the sampler.
Valid state transitions are:
```
/- [ Destroying ]
<
- --
\
| |
v |
[ Unallocated ] -> [ Configured ] -> [ Running ]
^ |
| v
\
-[ Stopping ]
```
Defined at line 47 of file ../../zircon/kernel/lib/thread_sampler/include/lib/thread_sampler/thread_sampler.h
Records
Functions
-
void sampler_percpu_init ()Joins the sampling session on the current cpu if one exists.
Defined at line 27 of file ../../zircon/kernel/lib/thread_sampler/thread_sampler.cc
-
void sampler_percpu_shutdown ()Exit the sampling session on the current cpu if one exists.
Defined at line 28 of file ../../zircon/kernel/lib/thread_sampler/thread_sampler.cc
Variables
ThreadSampler gThreadSampler
Defined at line 25 of file ../../zircon/kernel/lib/thread_sampler/thread_sampler.cc