5 #ifndef V8_PROFILER_PROFILE_GENERATOR_INL_H_ 6 #define V8_PROFILER_PROFILE_GENERATOR_INL_H_ 8 #include "src/profiler/profile-generator.h" 13 CodeEntry::CodeEntry(CodeEventListener::LogEventsAndTags tag,
const char* name,
14 const char* resource_name,
int line_number,
16 std::unique_ptr<SourcePositionTable> line_info,
17 Address instruction_start)
18 : bit_field_(TagField::encode(tag) |
19 BuiltinIdField::encode(Builtins::builtin_count)),
21 resource_name_(resource_name),
22 line_number_(line_number),
23 column_number_(column_number),
24 script_id_(
v8::UnboundScript::kNoScriptId),
26 line_info_(
std::move(line_info)),
27 instruction_start_(instruction_start) {}
29 inline CodeEntry* ProfileGenerator::FindEntry(Address address) {
30 CodeEntry* entry = code_map_.FindEntry(address);
31 if (entry) entry->mark_used();
35 ProfileNode::ProfileNode(ProfileTree* tree, CodeEntry* entry,
36 ProfileNode* parent,
int line_number)
40 line_number_(line_number),
42 id_(tree->next_node_id()) {
43 tree_->EnqueueNode(
this);
46 inline unsigned ProfileNode::function_id()
const {
47 return tree_->GetFunctionId(
this);
50 inline Isolate* ProfileNode::isolate()
const {
return tree_->isolate(); }
55 #endif // V8_PROFILER_PROFILE_GENERATOR_INL_H_