v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
heap.cc File Reference
#include "v8.h"
#include "accessors.h"
#include "api.h"
#include "bootstrapper.h"
#include "codegen.h"
#include "compilation-cache.h"
#include "debug.h"
#include "deoptimizer.h"
#include "global-handles.h"
#include "heap-profiler.h"
#include "incremental-marking.h"
#include "liveobjectlist-inl.h"
#include "mark-compact.h"
#include "natives.h"
#include "objects-visiting.h"
#include "objects-visiting-inl.h"
#include "once.h"
#include "runtime-profiler.h"
#include "scopeinfo.h"
#include "snapshot.h"
#include "store-buffer.h"
#include "v8threads.h"
#include "v8utils.h"
#include "vm-state-inl.h"
Include dependency graph for heap.cc:

Go to the source code of this file.

Data Structures

class  ScavengeVisitor
 
class  ScavengeWeakObjectRetainer
 
class  NewSpaceScavenger
 
class  ScavengingVisitor< marks_handling, logging_and_profiling_mode >
 
class  HeapObjectsFilter
 
class  UnreachableObjectsFilter
 

Namespaces

 v8
 
 v8::internal
 

Macros

#define LUMP_OF_MEMORY   MB
 
#define UPDATE_COUNTERS_FOR_SPACE(space)
 
#define UPDATE_FRAGMENTATION_FOR_SPACE(space)
 
#define UPDATE_COUNTERS_AND_FRAGMENTATION_FOR_SPACE(space)
 
#define STRING_TYPE_ELEMENT(type, size, name, camel_name)   {type, size, k##camel_name##MapRootIndex},
 
#define CONSTANT_SYMBOL_ELEMENT(name, contents)   {contents, k##name##RootIndex},
 
#define STRUCT_TABLE_ELEMENT(NAME, Name, name)   { NAME##_TYPE, Name::kSize, k##Name##MapRootIndex },
 
#define MAKE_CASE(NAME, Name, name)   case NAME##_TYPE: map = name##_map(); break;
 
#define ADJUST_LAST_TIME_OBJECT_COUNT(name)
 
#define ADJUST_LAST_TIME_OBJECT_COUNT(name)
 
#define ADJUST_LAST_TIME_OBJECT_COUNT(name)
 

Enumerations

enum  LoggingAndProfiling { LOGGING_AND_PROFILING_ENABLED, LOGGING_AND_PROFILING_DISABLED }
 
enum  MarksHandling { TRANSFER_MARKS, IGNORE_MARKS }
 

Functions

 STATIC_ASSERT ((FixedDoubleArray::kHeaderSize &kDoubleAlignmentMask)==0)
 
 INLINE (static HeapObject *EnsureDoubleAligned(Heap *heap, HeapObject *object, int size))
 
 V8_DECLARE_ONCE (initialize_gc_once)
 

Macro Definition Documentation

#define ADJUST_LAST_TIME_OBJECT_COUNT (   name)
Value:
counters->count_of_##name()->Increment( \
static_cast<int>(object_counts_[name])); \
counters->count_of_##name()->Decrement( \
static_cast<int>(object_counts_last_time_[name])); \
counters->size_of_##name()->Increment( \
static_cast<int>(object_sizes_[name])); \
counters->size_of_##name()->Decrement( \
static_cast<int>(object_sizes_last_time_[name]));

Referenced by Heap::CheckpointObjectStats().

#define ADJUST_LAST_TIME_OBJECT_COUNT (   name)
Value:
index = FIRST_CODE_KIND_SUB_TYPE + Code::name; \
counters->count_of_CODE_TYPE_##name()->Increment( \
static_cast<int>(object_counts_[index])); \
counters->count_of_CODE_TYPE_##name()->Decrement( \
static_cast<int>(object_counts_last_time_[index])); \
counters->size_of_CODE_TYPE_##name()->Increment( \
static_cast<int>(object_sizes_[index])); \
counters->size_of_CODE_TYPE_##name()->Decrement( \
static_cast<int>(object_sizes_last_time_[index]));
#define ADJUST_LAST_TIME_OBJECT_COUNT (   name)
Value:
index = FIRST_FIXED_ARRAY_SUB_TYPE + name; \
counters->count_of_FIXED_ARRAY_##name()->Increment( \
static_cast<int>(object_counts_[index])); \
counters->count_of_FIXED_ARRAY_##name()->Decrement( \
static_cast<int>(object_counts_last_time_[index])); \
counters->size_of_FIXED_ARRAY_##name()->Increment( \
static_cast<int>(object_sizes_[index])); \
counters->size_of_FIXED_ARRAY_##name()->Decrement( \
static_cast<int>(object_sizes_last_time_[index]));
#define CONSTANT_SYMBOL_ELEMENT (   name,
  contents 
)    {contents, k##name##RootIndex},
#define LUMP_OF_MEMORY   MB
#define MAKE_CASE (   NAME,
  Name,
  name 
)    case NAME##_TYPE: map = name##_map(); break;

Referenced by Heap::AllocateStruct().

#define STRING_TYPE_ELEMENT (   type,
  size,
  name,
  camel_name 
)    {type, size, k##camel_name##MapRootIndex},
#define STRUCT_TABLE_ELEMENT (   NAME,
  Name,
  name 
)    { NAME##_TYPE, Name::kSize, k##Name##MapRootIndex },
#define UPDATE_COUNTERS_AND_FRAGMENTATION_FOR_SPACE (   space)
Value:
#define UPDATE_FRAGMENTATION_FOR_SPACE(space)
#define UPDATE_COUNTERS_FOR_SPACE(space)

Referenced by Heap::GarbageCollectionEpilogue().

#define UPDATE_COUNTERS_FOR_SPACE (   space)
Value:
isolate_->counters()->space##_bytes_available()->Set( \
static_cast<int>(space()->Available())); \
isolate_->counters()->space##_bytes_committed()->Set( \
static_cast<int>(space()->CommittedMemory())); \
isolate_->counters()->space##_bytes_used()->Set( \
static_cast<int>(space()->SizeOfObjects()));

Referenced by Heap::GarbageCollectionEpilogue().

#define UPDATE_FRAGMENTATION_FOR_SPACE (   space)
Value:
if (space()->CommittedMemory() > 0) { \
isolate_->counters()->external_fragmentation_##space()->AddSample( \
static_cast<int>(100 - \
(space()->SizeOfObjects() * 100.0) / space()->CommittedMemory())); \
}