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

#include <profiler.h>

Inheritance diagram for dart::CodeDescriptor:
dart::ZoneAllocated

Public Member Functions

 CodeDescriptor (const AbstractCode code)
 
uword Start () const
 
uword Size () const
 
int64_t CompileTimestamp () const
 
const AbstractCode code () const
 
const char * Name () const
 
bool Contains (uword pc) 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)
 

Static Public Member Functions

static int Compare (CodeDescriptor *const *a, CodeDescriptor *const *b)
 

Detailed Description

Definition at line 498 of file profiler.h.

Constructor & Destructor Documentation

◆ CodeDescriptor()

dart::CodeDescriptor::CodeDescriptor ( const AbstractCode  code)
explicit

Definition at line 1464 of file profiler.cc.

1464: code_(code) {}
const AbstractCode code() const
Definition: profiler.h:508

Member Function Documentation

◆ code()

const AbstractCode dart::CodeDescriptor::code ( ) const
inline

Definition at line 508 of file profiler.h.

508{ return code_; }

◆ Compare()

static int dart::CodeDescriptor::Compare ( CodeDescriptor *const *  a,
CodeDescriptor *const *  b 
)
inlinestatic

Definition at line 517 of file profiler.h.

517 {
518 ASSERT(a != nullptr);
519 ASSERT(b != nullptr);
520
521 uword a_start = (*a)->Start();
522 uword b_start = (*b)->Start();
523
524 if (a_start < b_start) {
525 return -1;
526 } else if (a_start > b_start) {
527 return 1;
528 } else {
529 return 0;
530 }
531 }
#define ASSERT(E)
static bool b
struct MyStruct a[10]
uintptr_t uword
Definition: globals.h:501

◆ CompileTimestamp()

int64_t dart::CodeDescriptor::CompileTimestamp ( ) const

Definition at line 1474 of file profiler.cc.

1474 {
1475 return code_.compile_timestamp();
1476}
int64_t compile_timestamp() const
Definition: profiler.h:425

◆ Contains()

bool dart::CodeDescriptor::Contains ( uword  pc) const
inline

Definition at line 512 of file profiler.h.

512 {
513 uword end = Start() + Size();
514 return (pc >= Start()) && (pc < end);
515 }
uword Start() const
Definition: profiler.cc:1466
uword Size() const
Definition: profiler.cc:1470
glong glong end

◆ Name()

const char * dart::CodeDescriptor::Name ( ) const
inline

Definition at line 510 of file profiler.h.

510{ return code_.Name(); }
const char * Name() const
Definition: profiler.h:433

◆ Size()

uword dart::CodeDescriptor::Size ( ) const

Definition at line 1470 of file profiler.cc.

1470 {
1471 return code_.Size();
1472}
uword Size() const
Definition: profiler.h:420

◆ Start()

uword dart::CodeDescriptor::Start ( ) const

Definition at line 1466 of file profiler.cc.

1466 {
1467 return code_.PayloadStart();
1468}
uword PayloadStart() const
Definition: profiler.h:415

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