#include <profiler.h>
Definition at line 728 of file profiler.h.
◆ SampleBlockBuffer()
Definition at line 670 of file profiler.cc.
671 {
674 const bool executable = false;
675 const bool compressed = false;
676 memory_ =
678 if (memory_ == nullptr) {
680 }
681 sample_buffer_ =
reinterpret_cast<Sample*
>(memory_->
address());
682 blocks_ = new SampleBlock[blocks];
683 for (intptr_t
i = 0;
i < blocks; ++
i) {
684 blocks_[
i].
Init(&sample_buffer_[
i * samples_per_block], samples_per_block);
685 }
686 capacity_ = blocks;
687 cursor_ = 0;
688}
virtual void Init(Sample *samples, intptr_t capacity)
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
static intptr_t PageSize()
static VirtualMemory * Allocate(intptr_t size, bool is_executable, bool is_compressed, const char *name)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ ~SampleBlockBuffer()
dart::SampleBlockBuffer::~SampleBlockBuffer |
( |
| ) |
|
|
virtual |
Definition at line 690 of file profiler.cc.
690 {
691 delete[] blocks_;
692 blocks_ = nullptr;
693 delete memory_;
694 memory_ = nullptr;
695 capacity_ = 0;
696 cursor_ = 0;
697}
◆ BuildProcessedSampleBuffer()
Definition at line 761 of file profiler.cc.
764 {
765 ASSERT(isolate !=
nullptr);
766
768 Zone* zone = thread->zone();
769
771 buffer =
new (zone) ProcessedSampleBuffer();
772 }
773
775
776 for (intptr_t
i = 0;
i < capacity_; ++
i) {
777 SampleBlock* block = &blocks_[
i];
778 if (block->TryAcquireStreaming(isolate)) {
780 if (filter->take_samples()) {
781 block->StreamingToFree();
782 } else {
783 block->StreamingToCompleted();
784 }
785 }
786 }
787
789}
ProcessedSampleBuffer * BuildProcessedSampleBuffer(SampleFilter *filter, ProcessedSampleBuffer *buffer=nullptr)
static Thread * Current()
static void FlushSampleBlocks(Isolate *isolate)
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
◆ FreeCompletedBlocks()
void dart::SampleBlockBuffer::FreeCompletedBlocks |
( |
| ) |
|
Definition at line 724 of file profiler.cc.
724 {
725 for (intptr_t
i = 0;
i < capacity_;
i++) {
727 }
728}
◆ ReserveAllocationSample()
Sample * dart::SampleBlockBuffer::ReserveAllocationSample |
( |
Isolate * |
isolate | ) |
|
Definition at line 821 of file profiler.cc.
821 {
822 return ReserveSampleImpl(isolate, true);
823}
◆ ReserveCPUSample()
Sample * dart::SampleBlockBuffer::ReserveCPUSample |
( |
Isolate * |
isolate | ) |
|
Definition at line 817 of file profiler.cc.
817 {
818 return ReserveSampleImpl(isolate, false);
819}
◆ Size()
intptr_t dart::SampleBlockBuffer::Size |
( |
| ) |
const |
|
inline |
◆ VisitSamples()
void dart::SampleBlockBuffer::VisitSamples |
( |
SampleVisitor * |
visitor | ) |
|
|
inline |
Definition at line 742 of file profiler.h.
742 {
743 ASSERT(visitor !=
nullptr);
744 for (intptr_t
i = 0;
i < capacity_; ++
i) {
746 }
747 }
void VisitSamples(SampleVisitor *visitor)
◆ Isolate
◆ kDefaultBlockCount
constexpr intptr_t dart::SampleBlockBuffer::kDefaultBlockCount = 600 |
|
staticconstexpr |
The documentation for this class was generated from the following files: