v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-snapshot-generator-inl.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_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_
6#define V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
13
14namespace v8 {
15namespace internal {
16
18 return &snapshot()->entries()[from_index()];
19}
20
22
26
28 // Note: children_count_ and children_end_index_ are parts of a union.
29 int next_index = index + children_count_;
31 return next_index;
32}
33
37
39
40std::vector<HeapGraphEdge*>::iterator HeapEntry::children_begin() const {
41 return index_ == 0 ? snapshot_->children().begin()
42 : snapshot_->entries()[index_ - 1].children_end();
43}
44
45std::vector<HeapGraphEdge*>::iterator HeapEntry::children_end() const {
47 return snapshot_->children().begin() + children_end_index_;
48}
49
51 return static_cast<int>(children_end() - children_begin());
52}
53
55
56uint32_t HeapSnapshotJSONSerializer::StringHash(const void* string) {
57 const char* s = reinterpret_cast<const char*>(string);
58 int len = static_cast<int>(strlen(s));
61}
62
66
72
73} // namespace internal
74} // namespace v8
75
76#endif // V8_PROFILER_HEAP_SNAPSHOT_GENERATOR_INL_H_
V8_INLINE std::vector< HeapGraphEdge * >::iterator children_end() const
V8_INLINE void add_child(HeapGraphEdge *edge)
V8_INLINE int set_children_index(int index)
V8_INLINE std::vector< HeapGraphEdge * >::iterator children_begin() const
V8_INLINE HeapGraphEdge * child(int i)
V8_INLINE Isolate * isolate() const
V8_INLINE Isolate * isolate() const
V8_INLINE HeapSnapshot * snapshot() const
V8_INLINE HeapEntry * from() const
static V8_INLINE uint32_t StringHash(const void *string)
V8_INLINE int to_node_index(const HeapEntry *e)
std::deque< HeapEntry > & entries()
std::vector< HeapGraphEdge * > & children()
static uint32_t HashSequentialString(const char_t *chars, uint32_t length, uint64_t seed)
static const uint64_t kZeroHashSeed
Definition utils.h:267
template const char * string
#define DCHECK_GE(v1, v2)
Definition logging.h:488