Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index 2cb855aa91d1bdc242c43bcee6ceed02fafc9207..68a565c73a2ffa4469948a1aa36b52e565f6947a 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -201,10 +201,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
rec->start = code->address(); |
- rec->entry = profiles_->NewCodeEntry( |
- tag, profiles_->GetFunctionName(name), CodeEntry::kEmptyNamePrefix, |
- CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo, |
- CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); |
+ rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); |
rec->size = code->ExecutableSize(); |
rec->shared = NULL; |
processor_->Enqueue(evt_rec); |
@@ -218,10 +215,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
rec->start = code->address(); |
- rec->entry = profiles_->NewCodeEntry( |
- tag, profiles_->GetFunctionName(name), CodeEntry::kEmptyNamePrefix, |
- CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo, |
- CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); |
+ rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); |
rec->size = code->ExecutableSize(); |
rec->shared = NULL; |
processor_->Enqueue(evt_rec); |
@@ -237,9 +231,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code, |
rec->start = code->address(); |
rec->entry = profiles_->NewCodeEntry( |
tag, profiles_->GetFunctionName(shared->DebugName()), |
- CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), |
- CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, |
- NULL, code->instruction_start()); |
+ CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name)); |
if (info) { |
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
} |
@@ -264,29 +256,15 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code, |
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
rec->start = code->address(); |
- Script* script = Script::cast(shared->script()); |
- JITLineInfoTable* line_table = NULL; |
- if (script) { |
- line_table = new JITLineInfoTable(); |
- for (RelocIterator it(code); !it.done(); it.next()) { |
- RelocInfo::Mode mode = it.rinfo()->rmode(); |
- if (RelocInfo::IsPosition(mode)) { |
- int position = static_cast<int>(it.rinfo()->data()); |
- if (position >= 0) { |
- int pc_offset = static_cast<int>(it.rinfo()->pc() - code->address()); |
- int line_number = script->GetLineNumber(position) + 1; |
- line_table->SetPosition(pc_offset, line_number); |
- } |
- } |
- } |
- } |
rec->entry = profiles_->NewCodeEntry( |
tag, profiles_->GetFunctionName(shared->DebugName()), |
CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), line, |
- column, line_table, code->instruction_start()); |
+ column); |
if (info) { |
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
} |
+ DCHECK(Script::cast(shared->script())); |
+ Script* script = Script::cast(shared->script()); |
rec->entry->set_script_id(script->id()->value()); |
rec->size = code->ExecutableSize(); |
rec->shared = shared->address(); |
@@ -304,9 +282,9 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
rec->start = code->address(); |
rec->entry = profiles_->NewCodeEntry( |
- tag, profiles_->GetName(args_count), "args_count: ", |
- CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo, |
- CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); |
+ tag, |
+ profiles_->GetName(args_count), |
+ "args_count: "); |
rec->size = code->ExecutableSize(); |
rec->shared = NULL; |
processor_->Enqueue(evt_rec); |
@@ -366,9 +344,9 @@ void CpuProfiler::RegExpCodeCreateEvent(Code* code, String* source) { |
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
rec->start = code->address(); |
rec->entry = profiles_->NewCodeEntry( |
- Logger::REG_EXP_TAG, profiles_->GetName(source), "RegExp: ", |
- CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo, |
- CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); |
+ Logger::REG_EXP_TAG, |
+ profiles_->GetName(source), |
+ "RegExp: "); |
rec->size = code->ExecutableSize(); |
processor_->Enqueue(evt_rec); |
} |