Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 911 of file profiler.h.

Member Function Documentation

◆ Cleanup()

void dart::SampleBlockProcessor::Cleanup ( )
static

Definition at line 1795 of file profiler.cc.

1795 {
1796 {
1797 MonitorLocker shutdown_ml(monitor_);
1798 if (shutdown_) {
1799 // Already shutdown.
1800 return;
1801 }
1802 shutdown_ = true;
1803 // Notify.
1804 shutdown_ml.Notify();
1805 ASSERT(initialized_);
1806 }
1807
1808 // Join the thread.
1809 ASSERT(processor_thread_id_ != OSThread::kInvalidThreadJoinId);
1810 OSThread::Join(processor_thread_id_);
1811 processor_thread_id_ = OSThread::kInvalidThreadJoinId;
1812 initialized_ = false;
1813 ASSERT(!thread_running_);
1814}
static void Join(ThreadJoinId id)
static const ThreadJoinId kInvalidThreadJoinId
Definition os_thread.h:245
#define ASSERT(E)

◆ Init()

void dart::SampleBlockProcessor::Init ( )
static

Definition at line 1774 of file profiler.cc.

1774 {
1775 ASSERT(!initialized_);
1776 if (monitor_ == nullptr) {
1777 monitor_ = new Monitor();
1778 }
1779 ASSERT(monitor_ != nullptr);
1780 initialized_ = true;
1781 shutdown_ = false;
1782}

◆ Startup()

void dart::SampleBlockProcessor::Startup ( )
static

Definition at line 1784 of file profiler.cc.

1784 {
1785 ASSERT(initialized_);
1786 ASSERT(processor_thread_id_ == OSThread::kInvalidThreadJoinId);
1787 MonitorLocker startup_ml(monitor_);
1788 OSThread::Start("Dart Profiler SampleBlockProcessor", ThreadMain, 0);
1789 while (!thread_running_) {
1790 startup_ml.Wait();
1791 }
1792 ASSERT(processor_thread_id_ != OSThread::kInvalidThreadJoinId);
1793}
static int Start(const char *name, ThreadStartFunction function, uword parameter)

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