#include <sampling.h>
Public Methods | |
| Sampling (JVMPI_Interface *jvmpi) | |
| Constructor. More... | |
| ~Sampling () | |
| Destructor. | |
| int | startThread (int turnedOn) |
| Starts sampling thread. More... | |
| void | terminateThread () |
| Terminates sampling thread. More... | |
| int | isTerminated () |
| Returns true/false in dependance on sampling thread has been terminated or not yet. More... | |
Private Types | |
| enum | CMD |
| thread commands. | |
Private Methods | |
| void | main () |
| Main thread function. | |
| void | doOneSample () |
| Performs one sample. | |
Static Private Methods | |
| void | samplingMain (void *) |
| Start routine for sampling thread. More... | |
Private Attributes | |
| CMD | _cmd |
| current command. | |
| Lock | _lock |
| critical section. | |
| int | _terminated |
| thread termination flag. | |
This class implements sampling method for CPU profiling. The sampling is done by a separate thread that is created during profiler start-up.
Definition at line 48 of file sampling.h.
|
|
Constructor. It initializes locks needed while sampling.
Definition at line 43 of file sampling.cpp. |
|
|
Returns true/false in dependance on sampling thread has been terminated or not yet.
Definition at line 379 of file sampling.cpp. Referenced by Prof::event_jvmShutDown().
|
|
|
Start routine for sampling thread.
Definition at line 374 of file sampling.cpp. |
|
|
Starts sampling thread. This method is expected to be called only once during profiler start-up.
Definition at line 163 of file sampling.cpp. |
|
|
Terminates sampling thread. The operation is asynchronous to prevent deadlocks. Definition at line 194 of file sampling.cpp. Referenced by Prof::event_jvmShutDown().
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001