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

#include <profiler.h>

Inheritance diagram for dart::SampleBlockProcessor:
dart::AllStatic

Static Public Member Functions

static void Init ()
 
static void Startup ()
 
static void Cleanup ()
 

Detailed Description

Definition at line 904 of file profiler.h.

Member Function Documentation

◆ Cleanup()

void dart::SampleBlockProcessor::Cleanup ( )
static

Definition at line 1801 of file profiler.cc.

1801 {
1802 {
1803 MonitorLocker shutdown_ml(monitor_);
1804 if (shutdown_) {
1805 // Already shutdown.
1806 return;
1807 }
1808 shutdown_ = true;
1809 // Notify.
1810 shutdown_ml.Notify();
1811 ASSERT(initialized_);
1812 }
1813
1814 // Join the thread.
1815 ASSERT(processor_thread_id_ != OSThread::kInvalidThreadJoinId);
1816 OSThread::Join(processor_thread_id_);
1817 processor_thread_id_ = OSThread::kInvalidThreadJoinId;
1818 initialized_ = false;
1819 ASSERT(!thread_running_);
1820}
static void Join(ThreadJoinId id)
static const ThreadJoinId kInvalidThreadJoinId
Definition: os_thread.h:249
#define ASSERT(E)

◆ Init()

void dart::SampleBlockProcessor::Init ( )
static

Definition at line 1780 of file profiler.cc.

1780 {
1781 ASSERT(!initialized_);
1782 if (monitor_ == nullptr) {
1783 monitor_ = new Monitor();
1784 }
1785 ASSERT(monitor_ != nullptr);
1786 initialized_ = true;
1787 shutdown_ = false;
1788}

◆ Startup()

void dart::SampleBlockProcessor::Startup ( )
static

Definition at line 1790 of file profiler.cc.

1790 {
1791 ASSERT(initialized_);
1792 ASSERT(processor_thread_id_ == OSThread::kInvalidThreadJoinId);
1793 MonitorLocker startup_ml(monitor_);
1794 OSThread::Start("Dart Profiler SampleBlockProcessor", ThreadMain, 0);
1795 while (!thread_running_) {
1796 startup_ml.Wait();
1797 }
1798 ASSERT(processor_thread_id_ != OSThread::kInvalidThreadJoinId);
1799}
static int Start(const char *name, ThreadStartFunction function, uword parameter)

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