V8 Project
v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo Struct Reference
+ Collaboration diagram for v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo:

Public Member Functions

 HeapObjectInfo (HeapObject *obj, int expected_size)
 
bool IsValid () const
 
void Print () const
 

Public Attributes

HeapObjectobj
 
int expected_size
 

Detailed Description

Definition at line 512 of file heap-snapshot-generator.cc.

Constructor & Destructor Documentation

◆ HeapObjectInfo()

v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::HeapObjectInfo ( HeapObject obj,
int  expected_size 
)
inline

Member Function Documentation

◆ IsValid()

bool v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::IsValid ( ) const
inline

Definition at line 521 of file heap-snapshot-generator.cc.

521 { return expected_size == obj->Size(); }

References v8::internal::HeapObject::Size().

+ Here is the call graph for this function:

◆ Print()

void v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::Print ( ) const
inline

Definition at line 523 of file heap-snapshot-generator.cc.

523  {
524  if (expected_size == 0) {
525  PrintF("Untracked object : %p %6d. Next address is %p\n",
526  obj->address(),
527  obj->Size(),
528  obj->address() + obj->Size());
529  } else if (obj->Size() != expected_size) {
530  PrintF("Wrong size %6d: %p %6d. Next address is %p\n",
532  obj->address(),
533  obj->Size(),
534  obj->address() + obj->Size());
535  } else {
536  PrintF("Good object : %p %6d. Next address is %p\n",
537  obj->address(),
539  obj->address() + obj->Size());
540  }
541  }
void PrintF(const char *format,...)
Definition: utils.cc:80

References v8::internal::HeapObject::address(), v8::internal::PrintF(), and v8::internal::HeapObject::Size().

+ Here is the call graph for this function:

Member Data Documentation

◆ expected_size

int v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::expected_size

Definition at line 519 of file heap-snapshot-generator.cc.

◆ obj

HeapObject* v8::internal::anonymous_namespace{heap-snapshot-generator.cc}::HeapObjectInfo::obj

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