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. |
| Running | 2 |
The session is in progress. We are taking samples and writing data. |
| Stopping | 3 |
The session is stopping, no more references to the buffers are allowed to be created and we're |
| Reading | 4 |
We have a read in flight. If we get a destruction request, we need to delay destruction of |
| Destroying | 5 |
We requested a session teardown while were we reading. Once the read finishes, we'll clear the |
The current state of the sampler.
Valid state transitions are:
```
/- [ Destroying ]
<
- [ Reading ]
| ^ |
v | 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