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

#include <code_observers.h>

Inheritance diagram for dart::CodeObservers:
dart::AllStatic

Static Public Member Functions

static void Init ()
 
static void RegisterExternal (Dart_CodeObserver observer)
 
static void Register (CodeObserver *observer)
 
static void NotifyAll (const char *name, uword base, uword prologue_offset, uword size, bool optimized, const CodeComments *comments)
 
static bool AreActive ()
 
static void Cleanup ()
 
static Mutexmutex ()
 

Detailed Description

Definition at line 45 of file code_observers.h.

Member Function Documentation

◆ AreActive()

bool dart::CodeObservers::AreActive ( )
static

Definition at line 64 of file code_observers.cc.

64 {
65 for (intptr_t i = 0; i < observers_length_; i++) {
66 if (observers_[i]->IsActive()) return true;
67 }
68 return false;
69}

◆ Cleanup()

void dart::CodeObservers::Cleanup ( )
static

Definition at line 71 of file code_observers.cc.

71 {
72 for (intptr_t i = 0; i < observers_length_; i++) {
73 delete observers_[i];
74 }
75 free(observers_);
76 observers_length_ = 0;
77 observers_ = nullptr;
78}

◆ Init()

void dart::CodeObservers::Init ( )
static

Definition at line 80 of file code_observers.cc.

80 {
81 if (mutex_ == nullptr) {
82 mutex_ = new Mutex();
83 }
84 ASSERT(mutex_ != nullptr);
86}
static void RegisterCodeObservers()
#define ASSERT(E)

◆ mutex()

static Mutex * dart::CodeObservers::mutex ( )
inlinestatic

Definition at line 66 of file code_observers.h.

66{ return mutex_; }

◆ NotifyAll()

void dart::CodeObservers::NotifyAll ( const char *  name,
uword  base,
uword  prologue_offset,
uword  size,
bool  optimized,
const CodeComments *  comments 
)
static

Definition at line 49 of file code_observers.cc.

54 {
55 ASSERT(!AreActive() || (strlen(name) != 0));
56 for (intptr_t i = 0; i < observers_length_; i++) {
57 if (observers_[i]->IsActive()) {
58 observers_[i]->Notify(name, base, prologue_offset, size, optimized,
59 comments);
60 }
61 }
62}
virtual void Notify(const char *name, uword base, uword prologue_offset, uword size, bool optimized, const CodeComments *comments)=0
static bool AreActive()
const char *const 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
Definition: switches.h:259

◆ Register()

void dart::CodeObservers::Register ( CodeObserver observer)
static

Definition at line 42 of file code_observers.cc.

42 {
43 observers_length_++;
44 observers_ = reinterpret_cast<CodeObserver**>(
45 realloc(observers_, sizeof(observer) * observers_length_));
46 observers_[observers_length_ - 1] = observer;
47}
void * realloc(void *ptr, size_t size)
Definition: allocation.cc:27

◆ RegisterExternal()

void dart::CodeObservers::RegisterExternal ( Dart_CodeObserver  observer)
static

Definition at line 38 of file code_observers.cc.

38 {
39 Register(new ExternalCodeObserverAdapter(observer));
40}
static void Register(CodeObserver *observer)

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