v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
profile-generator-inl.h
Go to the documentation of this file.
1// Copyright 2010 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_PROFILE_GENERATOR_INL_H_
6#define V8_PROFILER_PROFILE_GENERATOR_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
11#include <memory>
12
13namespace v8 {
14namespace internal {
15
17 const char* resource_name, int line_number,
18 int column_number,
19 std::unique_ptr<SourcePositionTable> line_info,
20 bool is_shared_cross_origin, CodeType code_type)
21 : bit_field_(CodeTagField::encode(tag) |
22 BuiltinField::encode(Builtin::kIllegal) |
23 CodeTypeField::encode(code_type) |
24 SharedCrossOriginField::encode(is_shared_cross_origin)),
25 name_(name),
26 resource_name_(resource_name),
27 line_number_(line_number),
28 column_number_(column_number),
29 script_id_(v8::UnboundScript::kNoScriptId),
30 position_(0),
31 line_info_(std::move(line_info)) {}
32
34 ProfileNode* parent, int line_number)
35 : tree_(tree),
36 entry_(entry),
37 self_ticks_(0),
38 line_number_(line_number),
39 parent_(parent),
40 id_(tree->next_node_id()) {
41 tree_->EnqueueNode(this);
43}
44
45inline Isolate* ProfileNode::isolate() const { return tree_->isolate(); }
46
47} // namespace internal
48} // namespace v8
49
50#endif // V8_PROFILER_PROFILE_GENERATOR_INL_H_
uint32_t bit_field_
CodeEntry(LogEventListener::CodeTag tag, const char *name, const char *resource_name=CodeEntry::kEmptyResourceName, int line_number=v8::CpuProfileNode::kNoLineNumberInfo, int column_number=v8::CpuProfileNode::kNoColumnNumberInfo, std::unique_ptr< SourcePositionTable > line_info=nullptr, bool is_shared_cross_origin=false, CodeType code_type=CodeType::JS)
ProfileNode(ProfileTree *tree, CodeEntry *entry, ProfileNode *parent, int line_number=0)
CodeEntryStorage * code_entries()
void EnqueueNode(const ProfileNode *node)
const int position_
HeapEntry * entry_
const char * name_
STL namespace.
BytecodeSequenceNode * parent_
int script_id_