Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
dart::ProfileFunctionTable Class Reference
Inheritance diagram for dart::ProfileFunctionTable:
dart::ZoneAllocated

Public Member Functions

 ProfileFunctionTable ()
 
ProfileFunctionLookupOrAdd (const Function &function)
 
ProfileFunctionLookup (const Function &function)
 
ProfileFunctionGetUnknown ()
 
ProfileFunctionAddTag (uword tag_id, const char *name)
 
ProfileFunctionAddNative (uword start_address, const char *name)
 
ProfileFunctionAddStub (uword start_address, const char *name)
 
intptr_t length () const
 
ProfileFunctionAt (intptr_t i) const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Detailed Description

Definition at line 487 of file profiler_service.cc.

Constructor & Destructor Documentation

◆ ProfileFunctionTable()

dart::ProfileFunctionTable::ProfileFunctionTable ( )
inline

Definition at line 489 of file profiler_service.cc.

490 : null_function_(Function::ZoneHandle()),
491 unknown_function_(nullptr),
492 table_(8) {
493 unknown_function_ =
494 Add(ProfileFunction::kUnknownFunction, "<unknown Dart function>");
495 }
static Object & ZoneHandle()
Definition: object.h:419

Member Function Documentation

◆ AddNative()

ProfileFunction * dart::ProfileFunctionTable::AddNative ( uword  start_address,
const char *  name 
)
inline

Definition at line 524 of file profiler_service.cc.

524 {
525 // TODO(johnmccutchan): Canonicalize ProfileFunctions for natives.
527 }
const char *const name

◆ AddStub()

ProfileFunction * dart::ProfileFunctionTable::AddStub ( uword  start_address,
const char *  name 
)
inline

Definition at line 530 of file profiler_service.cc.

◆ AddTag()

ProfileFunction * dart::ProfileFunctionTable::AddTag ( uword  tag_id,
const char *  name 
)
inline

Definition at line 517 of file profiler_service.cc.

517 {
518 // TODO(johnmccutchan): Canonicalize ProfileFunctions for tags.
520 }

◆ At()

ProfileFunction * dart::ProfileFunctionTable::At ( intptr_t  i) const
inline

Definition at line 536 of file profiler_service.cc.

536 {
537 ASSERT(i >= 0);
538 ASSERT(i < length());
539 return table_[i];
540 }
#define ASSERT(E)

◆ GetUnknown()

ProfileFunction * dart::ProfileFunctionTable::GetUnknown ( )
inline

Definition at line 511 of file profiler_service.cc.

511 {
512 ASSERT(unknown_function_ != nullptr);
513 return unknown_function_;
514 }

◆ length()

intptr_t dart::ProfileFunctionTable::length ( ) const
inline

Definition at line 534 of file profiler_service.cc.

534{ return table_.length(); }

◆ Lookup()

ProfileFunction * dart::ProfileFunctionTable::Lookup ( const Function function)
inline

Definition at line 506 of file profiler_service.cc.

506 {
507 ASSERT(!function.IsNull());
508 return function_hash_.LookupValue(&function);
509 }
KeyValueTrait::Value LookupValue(typename KeyValueTrait::Key key) const
Definition: hash_map.h:159
Dart_NativeFunction function
Definition: fuchsia.cc:51

◆ LookupOrAdd()

ProfileFunction * dart::ProfileFunctionTable::LookupOrAdd ( const Function function)
inline

Definition at line 497 of file profiler_service.cc.

497 {
498 ASSERT(!function.IsNull());
499 ProfileFunction* profile_function = Lookup(function);
500 if (profile_function != nullptr) {
501 return profile_function;
502 }
503 return Add(function);
504 }
ProfileFunction * Lookup(const Function &function)

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