#include <profiler.h>
Definition at line 634 of file profiler.h.
◆ State
Enumerator |
---|
kFree | |
kSampling | |
kCompleted | |
kStreaming | |
Definition at line 711 of file profiler.h.
◆ SampleBlock()
dart::SampleBlock::SampleBlock |
( |
| ) |
|
|
default |
◆ ~SampleBlock()
virtual dart::SampleBlock::~SampleBlock |
( |
| ) |
|
|
virtualdefault |
◆ capacity()
intptr_t dart::SampleBlock::capacity |
( |
| ) |
const |
|
inline |
◆ FreeCompleted()
void dart::SampleBlock::FreeCompleted |
( |
| ) |
|
|
inline |
Definition at line 697 of file profiler.h.
697 {
700 std::memory_order success_order = std::memory_order_acquire;
701 std::memory_order failure_order = std::memory_order_relaxed;
702 if (
state_.compare_exchange_strong(expected, desired, success_order,
703 failure_order)) {
705 }
706 }
std::atomic< State > state_
◆ HasStreamableSamples()
Definition at line 730 of file profiler.cc.
731 {
734 uword sample_tag = sample->user_tag();
735 for (intptr_t j = 0; j < tag_table.Length(); ++j) {
736 *tag ^= tag_table.At(j);
737 if (tag->tag() == sample_tag && tag->streamable()) {
738 return true;
739 }
740 }
741 }
742 return false;
743}
Sample * At(intptr_t idx) const
◆ MarkCompleted()
void dart::SampleBlock::MarkCompleted |
( |
| ) |
|
|
inline |
◆ owner()
Isolate * dart::SampleBlock::owner |
( |
| ) |
const |
|
inline |
◆ ReserveSample()
Sample * dart::SampleBlock::ReserveSample |
( |
| ) |
|
|
virtual |
Implements dart::SampleBuffer.
Definition at line 791 of file profiler.cc.
791 {
795 }
796 return nullptr;
797}
T fetch_add(T arg, std::memory_order order=std::memory_order_relaxed)
RelaxedAtomic< uint32_t > cursor_
◆ ReserveSampleAndLink()
Sample * dart::SampleBlock::ReserveSampleAndLink |
( |
Sample * |
previous | ) |
|
|
virtual |
Implements dart::SampleBuffer.
Definition at line 799 of file profiler.cc.
799 {
800 ASSERT(previous !=
nullptr);
802 Isolate* isolate =
owner_;
803 ASSERT(isolate !=
nullptr);
804 Sample*
next = previous->is_allocation_sample()
805 ?
buffer->ReserveAllocationSample(isolate)
806 :
buffer->ReserveCPUSample(isolate);
807 if (
next ==
nullptr) {
808 return nullptr;
809 }
810 next->Init(previous->port(), previous->timestamp(), previous->tid());
811 next->set_head_sample(
false);
812
813 previous->SetContinuation(
next);
815}
static float next(float f)
static SampleBlockBuffer * sample_block_buffer()
friend class SampleBlockBuffer
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ set_owner()
void dart::SampleBlock::set_owner |
( |
Isolate * |
isolate | ) |
|
|
inline |
◆ StreamingToCompleted()
void dart::SampleBlock::StreamingToCompleted |
( |
| ) |
|
|
inline |
◆ StreamingToFree()
void dart::SampleBlock::StreamingToFree |
( |
| ) |
|
|
inline |
◆ TryAcquireStreaming()
bool dart::SampleBlock::TryAcquireStreaming |
( |
Isolate * |
isolate | ) |
|
|
inline |
Definition at line 676 of file profiler.h.
676 {
678 if (
owner_ != isolate)
return false;
679
682 std::memory_order success_order = std::memory_order_acquire;
683 std::memory_order failure_order = std::memory_order_relaxed;
684 return state_.compare_exchange_strong(expected, desired, success_order,
685 failure_order);
686 }
◆ TryAllocateCompleted()
bool dart::SampleBlock::TryAllocateCompleted |
( |
| ) |
|
|
inline |
Definition at line 659 of file profiler.h.
659 {
662 std::memory_order success_order = std::memory_order_acquire;
663 std::memory_order failure_order = std::memory_order_relaxed;
664 if (
state_.compare_exchange_strong(expected, desired, success_order,
665 failure_order)) {
668 return true;
669 }
670 return false;
671 }
◆ TryAllocateFree()
bool dart::SampleBlock::TryAllocateFree |
( |
| ) |
|
|
inline |
Definition at line 651 of file profiler.h.
651 {
654 std::memory_order success_order = std::memory_order_acquire;
655 std::memory_order failure_order = std::memory_order_relaxed;
656 return state_.compare_exchange_strong(expected, desired, success_order,
657 failure_order);
658 }
◆ SampleBlockBuffer
◆ SampleBlockListProcessor
friend class SampleBlockListProcessor |
|
friend |
◆ cursor_
◆ kSamplesPerBlock
constexpr intptr_t dart::SampleBlock::kSamplesPerBlock = 100 |
|
staticconstexpr |
◆ owner_
Isolate* dart::SampleBlock::owner_ = nullptr |
|
protected |
◆ state_
std::atomic<State> dart::SampleBlock::state_ = kFree |
|
protected |
The documentation for this class was generated from the following files: