Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
dart::ProfilerService Class Reference

#include <profiler_service.h>

Inheritance diagram for dart::ProfilerService:
dart::AllStatic

Static Public Member Functions

static void PrintJSON (JSONStream *stream, int64_t time_origin_micros, int64_t time_extent_micros, bool include_code_samples)
 
static void PrintAllocationJSON (JSONStream *stream, const Class &cls, int64_t time_origin_micros, int64_t time_extent_micros)
 
static void PrintAllocationJSON (JSONStream *stream, int64_t time_origin_micros, int64_t time_extent_micros)
 
static void ClearSamples ()
 

Detailed Description

Definition at line 451 of file profiler_service.h.

Member Function Documentation

◆ ClearSamples()

void dart::ProfilerService::ClearSamples ( )
static

Definition at line 2162 of file profiler_service.cc.

2162 {
2163 SampleBlockBuffer* sample_block_buffer = Profiler::sample_block_buffer();
2164 if (sample_block_buffer == nullptr) {
2165 return;
2166 }
2167
2168 Thread* thread = Thread::Current();
2169 Isolate* isolate = thread->isolate();
2170
2171 // Disable thread interrupts while processing the buffer.
2172 DisableThreadInterruptsScope dtis(thread);
2173
2174 ClearProfileVisitor clear_profile(isolate);
2175 sample_block_buffer->VisitSamples(&clear_profile);
2176}
static SampleBlockBuffer * sample_block_buffer()
Definition: profiler.h:67
static Thread * Current()
Definition: thread.h:362

◆ PrintAllocationJSON() [1/2]

void dart::ProfilerService::PrintAllocationJSON ( JSONStream stream,
const Class cls,
int64_t  time_origin_micros,
int64_t  time_extent_micros 
)
static

Definition at line 2149 of file profiler_service.cc.

2152 {
2153 Thread* thread = Thread::Current();
2154 Isolate* isolate = thread->isolate();
2155 ClassAllocationSampleFilter filter(isolate->main_port(), cls,
2156 Thread::kMutatorTask, time_origin_micros,
2157 time_extent_micros);
2158 PrintCommonImpl(PrintFormat::JSON, thread, stream, &filter,
2160}
@ kMutatorTask
Definition: thread.h:347
@ JSON
Definition: service.cc:4146

◆ PrintAllocationJSON() [2/2]

void dart::ProfilerService::PrintAllocationJSON ( JSONStream stream,
int64_t  time_origin_micros,
int64_t  time_extent_micros 
)
static

Definition at line 2114 of file profiler_service.cc.

2116 {
2117 Thread* thread = Thread::Current();
2118 Isolate* isolate = thread->isolate();
2119 AllocationSampleFilter filter(isolate->main_port(), Thread::kMutatorTask,
2120 time_origin_micros, time_extent_micros);
2121 PrintCommonImpl(PrintFormat::JSON, thread, stream, &filter,
2123}

◆ PrintJSON()

void dart::ProfilerService::PrintJSON ( JSONStream stream,
int64_t  time_origin_micros,
int64_t  time_extent_micros,
bool  include_code_samples 
)
static

Definition at line 2083 of file profiler_service.cc.

2086 {
2087 PrintCommon(PrintFormat::JSON, js, time_origin_micros, time_extent_micros,
2088 include_code_samples);
2089}

The documentation for this class was generated from the following files: