OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/profiler/cpu-profiler.h" | 5 #include "src/profiler/cpu-profiler.h" |
6 | 6 |
7 #include "src/debug/debug.h" | 7 #include "src/debug/debug.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/locked-queue-inl.h" | 10 #include "src/locked-queue-inl.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, | 253 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, |
254 NULL, code->instruction_start()); | 254 NULL, code->instruction_start()); |
255 RecordInliningInfo(rec->entry, code); | 255 RecordInliningInfo(rec->entry, code); |
256 rec->entry->FillFunctionInfo(shared); | 256 rec->entry->FillFunctionInfo(shared); |
257 rec->size = code->ExecutableSize(); | 257 rec->size = code->ExecutableSize(); |
258 processor_->Enqueue(evt_rec); | 258 processor_->Enqueue(evt_rec); |
259 } | 259 } |
260 | 260 |
261 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, | 261 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, |
262 AbstractCode* abstract_code, | 262 AbstractCode* abstract_code, |
263 SharedFunctionInfo* shared, | 263 SharedFunctionInfo* shared, Name* script_name, |
264 CompilationInfo* info, Name* script_name, | |
265 int line, int column) { | 264 int line, int column) { |
266 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); | 265 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); |
267 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; | 266 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; |
268 rec->start = abstract_code->address(); | 267 rec->start = abstract_code->address(); |
269 Script* script = Script::cast(shared->script()); | 268 Script* script = Script::cast(shared->script()); |
270 JITLineInfoTable* line_table = NULL; | 269 JITLineInfoTable* line_table = NULL; |
271 if (script) { | 270 if (script) { |
272 if (abstract_code->IsCode()) { | 271 if (abstract_code->IsCode()) { |
273 Code* code = abstract_code->GetCode(); | 272 Code* code = abstract_code->GetCode(); |
274 int start_position = shared->start_position(); | 273 int start_position = shared->start_position(); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 Builtins::Name id = static_cast<Builtins::Name>(i); | 634 Builtins::Name id = static_cast<Builtins::Name>(i); |
636 rec->start = builtins->builtin(id)->address(); | 635 rec->start = builtins->builtin(id)->address(); |
637 rec->builtin_id = id; | 636 rec->builtin_id = id; |
638 processor_->Enqueue(evt_rec); | 637 processor_->Enqueue(evt_rec); |
639 } | 638 } |
640 } | 639 } |
641 | 640 |
642 | 641 |
643 } // namespace internal | 642 } // namespace internal |
644 } // namespace v8 | 643 } // namespace v8 |
OLD | NEW |