V8 Project
heap-snapshot-generator.h
Go to the documentation of this file.
1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_
6 #define V8_HEAP_SNAPSHOT_GENERATOR_H_
7 
9 
10 namespace v8 {
11 namespace internal {
12 
13 class AllocationTracker;
14 class AllocationTraceNode;
15 class HeapEntry;
16 class HeapSnapshot;
17 class SnapshotFiller;
18 
19 class HeapGraphEdge BASE_EMBEDDED {
20  public:
21  enum Type {
29  };
30 
32  HeapGraphEdge(Type type, const char* name, int from, int to);
33  HeapGraphEdge(Type type, int index, int from, int to);
35 
36  Type type() const { return static_cast<Type>(type_); }
37  int index() const {
38  DCHECK(type_ == kElement || type_ == kHidden);
39  return index_;
40  }
41  const char* name() const {
42  DCHECK(type_ == kContextVariable
43  || type_ == kProperty
44  || type_ == kInternal
45  || type_ == kShortcut
46  || type_ == kWeak);
47  return name_;
48  }
49  INLINE(HeapEntry* from() const);
50  HeapEntry* to() const { return to_entry_; }
51 
52  private:
54 
55  unsigned type_ : 3;
56  int from_index_ : 29;
57  union {
58  // During entries population |to_index_| is used for storing the index,
59  // afterwards it is replaced with a pointer to the entry.
60  int to_index_;
61  HeapEntry* to_entry_;
62  };
63  union {
64  int index_;
65  const char* name_;
66  };
67 };
68 
69 
70 // HeapEntry instances represent an entity from the heap (or a special
71 // virtual node, e.g. root).
72 class HeapEntry BASE_EMBEDDED {
73  public:
74  enum Type {
88  };
89  static const int kNoEntry;
90 
91  HeapEntry() { }
93  Type type,
94  const char* name,
96  size_t self_size,
97  unsigned trace_node_id);
98 
99  HeapSnapshot* snapshot() { return snapshot_; }
100  Type type() { return static_cast<Type>(type_); }
101  const char* name() { return name_; }
102  void set_name(const char* name) { name_ = name; }
103  SnapshotObjectId id() { return id_; }
104  size_t self_size() { return self_size_; }
105  unsigned trace_node_id() const { return trace_node_id_; }
106  INLINE(int index() const);
107  int children_count() const { return children_count_; }
108  INLINE(int set_children_index(int index));
109  void add_child(HeapGraphEdge* edge) {
110  children_arr()[children_count_++] = edge;
111  }
113  return Vector<HeapGraphEdge*>(children_arr(), children_count_); }
114 
116  HeapGraphEdge::Type type, int index, HeapEntry* entry);
118  HeapGraphEdge::Type type, const char* name, HeapEntry* entry);
119 
120  void Print(
121  const char* prefix, const char* edge_name, int max_depth, int indent);
122 
123  private:
124  INLINE(HeapGraphEdge** children_arr());
125  const char* TypeAsString();
126 
127  unsigned type_: 4;
130  size_t self_size_;
132  const char* name_;
134  // id of allocation stack trace top node
135  unsigned trace_node_id_;
136 };
137 
138 
139 // HeapSnapshot represents a single heap snapshot. It is stored in
140 // HeapProfiler, which is also a factory for
141 // HeapSnapshots. All HeapSnapshots share strings copied from JS heap
142 // to be able to return them even if they were collected.
143 // HeapSnapshotGenerator fills in a HeapSnapshot.
145  public:
147  const char* title,
148  unsigned uid);
149  void Delete();
150 
152  const char* title() { return title_; }
153  unsigned uid() { return uid_; }
154  size_t RawSnapshotSize() const;
155  HeapEntry* root() { return &entries_[root_index_]; }
156  HeapEntry* gc_roots() { return &entries_[gc_roots_index_]; }
157  HeapEntry* gc_subroot(int index) {
158  return &entries_[gc_subroot_indexes_[index]];
159  }
163  void RememberLastJSObjectId();
166  }
167 
168  HeapEntry* AddEntry(HeapEntry::Type type,
169  const char* name,
170  SnapshotObjectId id,
171  size_t size,
172  unsigned trace_node_id);
174  HeapEntry* GetEntryById(SnapshotObjectId id);
176  void FillChildren();
177 
178  void Print(int max_depth);
180 
181  private:
182  HeapEntry* AddRootEntry();
183  HeapEntry* AddGcRootsEntry();
184  HeapEntry* AddGcSubrootEntry(int tag, SnapshotObjectId id);
185 
187  const char* title_;
188  unsigned uid_;
197 
198  friend class HeapSnapshotTester;
199 
201 };
202 
203 
205  public:
206  explicit HeapObjectsMap(Heap* heap);
207 
208  Heap* heap() const { return heap_; }
209 
212  unsigned int size,
213  bool accessed = true);
214  bool MoveObject(Address from, Address to, int size);
215  void UpdateObjectSize(Address addr, int size);
217  return next_id_ - kObjectIdStep;
218  }
219 
222  size_t GetUsedMemorySize() const;
223 
225 
226  static const int kObjectIdStep = 2;
231 
232  int FindUntrackedObjects();
233 
234  void UpdateHeapObjectsMap();
235  void RemoveDeadEntries();
236 
237  private:
238  struct EntryInfo {
240  : id(id), addr(addr), size(size), accessed(true) { }
242  : id(id), addr(addr), size(size), accessed(accessed) { }
245  unsigned int size;
246  bool accessed;
247  };
248  struct TimeInterval {
249  explicit TimeInterval(SnapshotObjectId id) : id(id), size(0), count(0) { }
253  };
254 
260 
262 };
263 
264 
265 // A typedef for referencing anything that can be snapshotted living
266 // in any kind of heap memory.
267 typedef void* HeapThing;
268 
269 
270 // An interface that creates HeapEntries by HeapThings.
272  public:
273  virtual ~HeapEntriesAllocator() { }
274  virtual HeapEntry* AllocateEntry(HeapThing ptr) = 0;
275 };
276 
277 
278 // The HeapEntriesMap instance is used to track a mapping between
279 // real heap objects and their representations in heap snapshots.
281  public:
282  HeapEntriesMap();
283 
284  int Map(HeapThing thing);
285  void Pair(HeapThing thing, int entry);
286 
287  private:
288  static uint32_t Hash(HeapThing thing) {
289  return ComputeIntegerHash(
290  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)),
292  }
293 
295 
296  friend class HeapObjectsSet;
297 
299 };
300 
301 
303  public:
304  HeapObjectsSet();
305  void Clear();
306  bool Contains(Object* object);
307  void Insert(Object* obj);
308  const char* GetTag(Object* obj);
309  void SetTag(Object* obj, const char* tag);
310  bool is_empty() const { return entries_.occupancy() == 0; }
311 
312  private:
314 
316 };
317 
318 
320  public:
322  virtual void ProgressStep() = 0;
323  virtual bool ProgressReport(bool force) = 0;
324 };
325 
326 
327 // An implementation of V8 heap graph extractor.
329  public:
333  virtual ~V8HeapExplorer();
334  virtual HeapEntry* AllocateEntry(HeapThing ptr);
336  int EstimateObjectsCount(HeapIterator* iterator);
338  void TagGlobalObjects();
339  void TagCodeObject(Code* code);
340  void TagBuiltinCodeObject(Code* code, const char* name);
341  HeapEntry* AddEntry(Address address,
342  HeapEntry::Type type,
343  const char* name,
344  size_t size);
345 
346  static String* GetConstructorName(JSObject* object);
347 
348  private:
350  HeapObject* object);
351 
352  HeapEntry* AddEntry(HeapObject* object);
353  HeapEntry* AddEntry(HeapObject* object,
354  HeapEntry::Type type,
355  const char* name);
356 
357  const char* GetSystemEntryName(HeapObject* object);
358 
359  template<V8HeapExplorer::ExtractReferencesMethod extractor>
361 
362  bool ExtractReferencesPass1(int entry, HeapObject* obj);
363  bool ExtractReferencesPass2(int entry, HeapObject* obj);
364  void ExtractJSGlobalProxyReferences(int entry, JSGlobalProxy* proxy);
365  void ExtractJSObjectReferences(int entry, JSObject* js_obj);
366  void ExtractStringReferences(int entry, String* obj);
367  void ExtractSymbolReferences(int entry, Symbol* symbol);
368  void ExtractJSCollectionReferences(int entry, JSCollection* collection);
369  void ExtractJSWeakCollectionReferences(int entry,
370  JSWeakCollection* collection);
371  void ExtractContextReferences(int entry, Context* context);
372  void ExtractMapReferences(int entry, Map* map);
374  SharedFunctionInfo* shared);
375  void ExtractScriptReferences(int entry, Script* script);
376  void ExtractAccessorInfoReferences(int entry, AccessorInfo* accessor_info);
377  void ExtractAccessorPairReferences(int entry, AccessorPair* accessors);
378  void ExtractCodeCacheReferences(int entry, CodeCache* code_cache);
379  void ExtractCodeReferences(int entry, Code* code);
380  void ExtractBoxReferences(int entry, Box* box);
381  void ExtractCellReferences(int entry, Cell* cell);
382  void ExtractPropertyCellReferences(int entry, PropertyCell* cell);
383  void ExtractAllocationSiteReferences(int entry, AllocationSite* site);
384  void ExtractJSArrayBufferReferences(int entry, JSArrayBuffer* buffer);
385  void ExtractFixedArrayReferences(int entry, FixedArray* array);
386  void ExtractClosureReferences(JSObject* js_obj, int entry);
387  void ExtractPropertyReferences(JSObject* js_obj, int entry);
388  bool ExtractAccessorPairProperty(JSObject* js_obj, int entry,
389  Object* key, Object* callback_obj);
390  void ExtractElementReferences(JSObject* js_obj, int entry);
391  void ExtractInternalReferences(JSObject* js_obj, int entry);
392 
393  bool IsEssentialObject(Object* object);
394  void SetContextReference(HeapObject* parent_obj,
395  int parent,
396  String* reference_name,
397  Object* child,
398  int field_offset);
399  void SetNativeBindReference(HeapObject* parent_obj,
400  int parent,
401  const char* reference_name,
402  Object* child);
403  void SetElementReference(HeapObject* parent_obj,
404  int parent,
405  int index,
406  Object* child);
407  void SetInternalReference(HeapObject* parent_obj,
408  int parent,
409  const char* reference_name,
410  Object* child,
411  int field_offset = -1);
412  void SetInternalReference(HeapObject* parent_obj,
413  int parent,
414  int index,
415  Object* child,
416  int field_offset = -1);
417  void SetHiddenReference(HeapObject* parent_obj,
418  int parent,
419  int index,
420  Object* child);
421  void SetWeakReference(HeapObject* parent_obj,
422  int parent,
423  const char* reference_name,
424  Object* child_obj,
425  int field_offset);
426  void SetWeakReference(HeapObject* parent_obj,
427  int parent,
428  int index,
429  Object* child_obj,
430  int field_offset);
431  void SetPropertyReference(HeapObject* parent_obj,
432  int parent,
433  Name* reference_name,
434  Object* child,
435  const char* name_format_string = NULL,
436  int field_offset = -1);
437  void SetUserGlobalReference(Object* user_global);
441  VisitorSynchronization::SyncTag tag, bool is_weak, Object* child);
442  const char* GetStrongGcSubrootName(Object* object);
443  void TagObject(Object* obj, const char* tag);
444  void MarkAsWeakContainer(Object* object);
445 
446  HeapEntry* GetEntry(Object* obj);
447 
459 
462 
464 };
465 
466 
468 
469 
470 // An implementation of retained native objects extractor.
472  public:
475  virtual ~NativeObjectsExplorer();
477  int EstimateObjectsCount();
479 
480  private:
481  void FillRetainedObjects();
482  void FillImplicitReferences();
487  v8::RetainedObjectInfo* info);
488  void VisitSubtreeWrapper(Object** p, uint16_t class_id);
489 
491  return ComputeIntegerHash(static_cast<uint32_t>(info->GetHash()),
493  }
494  static bool RetainedInfosMatch(void* key1, void* key2) {
495  return key1 == key2 ||
496  (reinterpret_cast<v8::RetainedObjectInfo*>(key1))->IsEquivalent(
497  reinterpret_cast<v8::RetainedObjectInfo*>(key2));
498  }
499  INLINE(static bool StringsMatch(void* key1, void* key2)) {
500  return strcmp(reinterpret_cast<char*>(key1),
501  reinterpret_cast<char*>(key2)) == 0;
502  }
503 
505 
512  // RetainedObjectInfo* -> List<HeapObject*>*
517  // Used during references extraction.
519 
521 
523 
525 };
526 
527 
529  public:
531  v8::ActivityControl* control,
533  Heap* heap);
534  bool GenerateSnapshot();
535 
536  private:
537  bool FillReferences();
538  void ProgressStep();
539  bool ProgressReport(bool force = false);
540  void SetProgressTotal(int iterations_count);
541 
546  // Mapping from HeapThing pointers to HeapEntry* pointers.
548  // Used during snapshot generation.
552 
554 };
555 
556 class OutputStreamWriter;
557 
559  public:
561  : snapshot_(snapshot),
562  strings_(StringsMatch),
563  next_node_id_(1),
564  next_string_id_(1),
565  writer_(NULL) {
566  }
567  void Serialize(v8::OutputStream* stream);
568 
569  private:
570  INLINE(static bool StringsMatch(void* key1, void* key2)) {
571  return strcmp(reinterpret_cast<char*>(key1),
572  reinterpret_cast<char*>(key2)) == 0;
573  }
574 
575  INLINE(static uint32_t StringHash(const void* string)) {
576  const char* s = reinterpret_cast<const char*>(string);
577  int len = static_cast<int>(strlen(s));
580  }
581 
582  int GetStringId(const char* s);
583  int entry_index(HeapEntry* e) { return e->index() * kNodeFieldsCount; }
584  void SerializeEdge(HeapGraphEdge* edge, bool first_edge);
585  void SerializeEdges();
586  void SerializeImpl();
587  void SerializeNode(HeapEntry* entry);
588  void SerializeNodes();
589  void SerializeSnapshot();
590  void SerializeTraceTree();
593  void SerializeString(const unsigned char* s);
594  void SerializeStrings();
595 
596  static const int kEdgeFieldsCount;
597  static const int kNodeFieldsCount;
598 
604 
607 
609 };
610 
611 
612 } } // namespace v8::internal
613 
614 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_
#define BASE_EMBEDDED
Definition: allocation.h:45
An interface for reporting progress and controlling long-running activities.
Definition: v8-profiler.h:371
HeapSnapshotEdge represents a directed connection between heap graph nodes: from retainers to retaine...
Definition: v8-profiler.h:183
Callback interface for retrieving user friendly names of global objects.
Definition: v8-profiler.h:436
An interface for exporting data from V8, using "push" model.
Definition: v8-profiler.h:272
Interface for providing information about embedder's objects held by global handles.
Definition: v8-profiler.h:545
virtual intptr_t GetHash()=0
Returns hash value for the instance.
INLINE(HeapSnapshot *snapshot() const)
INLINE(int index() const)
INLINE(HeapGraphEdge **children_arr())
INLINE(int set_children_index(int index))
void ReplaceToIndexWithEntry(HeapSnapshot *snapshot)
HeapGraphEdge(Type type, int index, int from, int to)
void Print(const char *prefix, const char *edge_name, int max_depth, int indent)
void SetIndexedReference(HeapGraphEdge::Type type, int index, HeapEntry *entry)
void add_child(HeapGraphEdge *edge)
INLINE(HeapEntry *from() const)
void SetNamedReference(HeapGraphEdge::Type type, const char *name, HeapEntry *entry)
HeapGraphEdge(Type type, const char *name, int from, int to)
Vector< HeapGraphEdge * > children()
HeapEntry(HeapSnapshot *snapshot, Type type, const char *name, SnapshotObjectId id, size_t self_size, unsigned trace_node_id)
virtual HeapEntry * AllocateEntry(HeapThing ptr)=0
void Pair(HeapThing thing, int entry)
static uint32_t Hash(HeapThing thing)
DISALLOW_COPY_AND_ASSIGN(HeapEntriesMap)
static const SnapshotObjectId kFirstAvailableObjectId
static const SnapshotObjectId kInternalRootObjectId
SnapshotObjectId FindOrAddEntry(Address addr, unsigned int size, bool accessed=true)
static const SnapshotObjectId kGcRootsFirstSubrootId
void UpdateObjectSize(Address addr, int size)
SnapshotObjectId GenerateId(v8::RetainedObjectInfo *info)
bool MoveObject(Address from, Address to, int size)
SnapshotObjectId last_assigned_id() const
SnapshotObjectId FindEntry(Address addr)
DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap)
static const SnapshotObjectId kGcRootsObjectId
SnapshotObjectId PushHeapObjectsStats(OutputStream *stream)
void SetTag(Object *obj, const char *tag)
DISALLOW_COPY_AND_ASSIGN(HeapObjectsSet)
const char * GetTag(Object *obj)
HeapSnapshotGenerator(HeapSnapshot *snapshot, v8::ActivityControl *control, v8::HeapProfiler::ObjectNameResolver *resolver, Heap *heap)
DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator)
void SerializeTraceNode(AllocationTraceNode *node)
INLINE(static bool StringsMatch(void *key1, void *key2))
void SerializeEdge(HeapGraphEdge *edge, bool first_edge)
INLINE(static uint32_t StringHash(const void *string))
DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer)
List< HeapGraphEdge * > children_
int gc_subroot_indexes_[VisitorSynchronization::kNumberOfSyncTags]
SnapshotObjectId max_snapshot_js_object_id() const
List< HeapGraphEdge * > & children()
DISALLOW_COPY_AND_ASSIGN(HeapSnapshot)
List< HeapEntry * > * GetSortedEntriesList()
HeapEntry * AddEntry(HeapEntry::Type type, const char *name, SnapshotObjectId id, size_t size, unsigned trace_node_id)
List< HeapGraphEdge > & edges()
HeapEntry * GetEntryById(SnapshotObjectId id)
HeapSnapshot(HeapProfiler *profiler, const char *title, unsigned uid)
HeapEntry * gc_subroot(int index)
HeapEntry * AddGcSubrootEntry(int tag, SnapshotObjectId id)
bool IterateAndExtractReferences(SnapshotFiller *filler)
static uint32_t InfoHash(v8::RetainedObjectInfo *info)
void SetNativeRootReference(v8::RetainedObjectInfo *info)
HeapEntriesAllocator * synthetic_entries_allocator_
static bool RetainedInfosMatch(void *key1, void *key2)
SnapshottingProgressReportingInterface * progress_
INLINE(static bool StringsMatch(void *key1, void *key2))
NativeObjectsExplorer(HeapSnapshot *snapshot, SnapshottingProgressReportingInterface *progress)
NativeGroupRetainedObjectInfo * FindOrAddGroupInfo(const char *label)
void SetWrapperNativeReferences(HeapObject *wrapper, v8::RetainedObjectInfo *info)
void AddRootEntries(SnapshotFiller *filler)
void VisitSubtreeWrapper(Object **p, uint16_t class_id)
DISALLOW_COPY_AND_ASSIGN(NativeObjectsExplorer)
List< HeapObject * > * GetListMaybeDisposeInfo(v8::RetainedObjectInfo *info)
static uint32_t HashSequentialString(const schar *chars, int length, uint32_t seed)
Definition: objects-inl.h:6563
uint32_t occupancy() const
Definition: hashmap.h:61
virtual HeapEntry * AllocateEntry(HeapThing ptr)
void SetContextReference(HeapObject *parent_obj, int parent, String *reference_name, Object *child, int field_offset)
void ExtractFixedArrayReferences(int entry, FixedArray *array)
void ExtractBoxReferences(int entry, Box *box)
void ExtractMapReferences(int entry, Map *map)
void AddRootEntries(SnapshotFiller *filler)
bool IterateAndExtractReferences(SnapshotFiller *filler)
void SetNativeBindReference(HeapObject *parent_obj, int parent, const char *reference_name, Object *child)
void SetGcSubrootReference(VisitorSynchronization::SyncTag tag, bool is_weak, Object *child)
const char * GetStrongGcSubrootName(Object *object)
V8HeapExplorer(HeapSnapshot *snapshot, SnapshottingProgressReportingInterface *progress, v8::HeapProfiler::ObjectNameResolver *resolver)
void SetInternalReference(HeapObject *parent_obj, int parent, const char *reference_name, Object *child, int field_offset=-1)
void SetWeakReference(HeapObject *parent_obj, int parent, const char *reference_name, Object *child_obj, int field_offset)
SnapshottingProgressReportingInterface * progress_
void ExtractJSObjectReferences(int entry, JSObject *js_obj)
void SetGcRootsReference(VisitorSynchronization::SyncTag tag)
void SetElementReference(HeapObject *parent_obj, int parent, int index, Object *child)
void SetPropertyReference(HeapObject *parent_obj, int parent, Name *reference_name, Object *child, const char *name_format_string=NULL, int field_offset=-1)
void ExtractJSWeakCollectionReferences(int entry, JSWeakCollection *collection)
void ExtractSharedFunctionInfoReferences(int entry, SharedFunctionInfo *shared)
void ExtractJSCollectionReferences(int entry, JSCollection *collection)
void ExtractJSGlobalProxyReferences(int entry, JSGlobalProxy *proxy)
void ExtractJSArrayBufferReferences(int entry, JSArrayBuffer *buffer)
bool ExtractReferencesPass2(int entry, HeapObject *obj)
void ExtractCodeCacheReferences(int entry, CodeCache *code_cache)
bool ExtractReferencesPass1(int entry, HeapObject *obj)
static String * GetConstructorName(JSObject *object)
void ExtractStringReferences(int entry, String *obj)
void ExtractCellReferences(int entry, Cell *cell)
void ExtractClosureReferences(JSObject *js_obj, int entry)
v8::HeapProfiler::ObjectNameResolver * global_object_name_resolver_
void ExtractScriptReferences(int entry, Script *script)
bool ExtractAccessorPairProperty(JSObject *js_obj, int entry, Object *key, Object *callback_obj)
const char * GetSystemEntryName(HeapObject *object)
bool(V8HeapExplorer::* ExtractReferencesMethod)(int entry, HeapObject *object)
void ExtractSymbolReferences(int entry, Symbol *symbol)
void SetHiddenReference(HeapObject *parent_obj, int parent, int index, Object *child)
void SetUserGlobalReference(Object *user_global)
void ExtractElementReferences(JSObject *js_obj, int entry)
void ExtractContextReferences(int entry, Context *context)
void ExtractInternalReferences(JSObject *js_obj, int entry)
void ExtractCodeReferences(int entry, Code *code)
void ExtractAccessorInfoReferences(int entry, AccessorInfo *accessor_info)
void ExtractAllocationSiteReferences(int entry, AllocationSite *site)
void ExtractAccessorPairReferences(int entry, AccessorPair *accessors)
HeapEntry * AddEntry(Address address, HeapEntry::Type type, const char *name, size_t size)
DISALLOW_COPY_AND_ASSIGN(V8HeapExplorer)
void TagBuiltinCodeObject(Code *code, const char *name)
void ExtractPropertyCellReferences(int entry, PropertyCell *cell)
void ExtractPropertyReferences(JSObject *js_obj, int entry)
void TagObject(Object *obj, const char *tag)
int EstimateObjectsCount(HeapIterator *iterator)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the snapshot(mksnapshot only)") DEFINE_STRING(raw_file
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
Definition: logging.h:205
unsigned short uint16_t
Definition: unicode.cc:23
TypeImpl< ZoneTypeConfig > Type
static const uint32_t kZeroHashSeed
Definition: utils.h:245
byte * Address
Definition: globals.h:101
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
Definition: utils.h:249
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20
@ kWeak
Definition: v8-util.h:25
EntryInfo(SnapshotObjectId id, Address addr, unsigned int size, bool accessed)
EntryInfo(SnapshotObjectId id, Address addr, unsigned int size)