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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/cpu-profiler-inl.h" | 7 #include "src/cpu-profiler-inl.h" |
8 | 8 |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 void CpuProfiler::CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { | 323 void CpuProfiler::CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { |
324 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DISABLE_OPT); | 324 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DISABLE_OPT); |
325 CodeDisableOptEventRecord* rec = &evt_rec.CodeDisableOptEventRecord_; | 325 CodeDisableOptEventRecord* rec = &evt_rec.CodeDisableOptEventRecord_; |
326 rec->start = code->address(); | 326 rec->start = code->address(); |
327 rec->bailout_reason = GetBailoutReason(shared->disable_optimization_reason()); | 327 rec->bailout_reason = GetBailoutReason(shared->disable_optimization_reason()); |
328 processor_->Enqueue(evt_rec); | 328 processor_->Enqueue(evt_rec); |
329 } | 329 } |
330 | 330 |
331 | 331 |
332 void CpuProfiler::CodeDeoptEvent(Code* code, int bailout_id, Address pc, | 332 void CpuProfiler::CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta) { |
333 int fp_to_sp_delta) { | |
334 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DEOPT); | 333 CodeEventsContainer evt_rec(CodeEventRecord::CODE_DEOPT); |
335 CodeDeoptEventRecord* rec = &evt_rec.CodeDeoptEventRecord_; | 334 CodeDeoptEventRecord* rec = &evt_rec.CodeDeoptEventRecord_; |
336 Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(code, bailout_id); | 335 Deoptimizer::DeoptInfo info = Deoptimizer::GetDeoptInfo(code, pc); |
337 rec->start = code->address(); | 336 rec->start = code->address(); |
338 rec->deopt_reason = Deoptimizer::GetDeoptReason(info.deopt_reason); | 337 rec->deopt_reason = Deoptimizer::GetDeoptReason(info.deopt_reason); |
339 rec->position = info.position; | 338 rec->position = info.position; |
340 processor_->Enqueue(evt_rec); | 339 processor_->Enqueue(evt_rec); |
341 processor_->AddDeoptStack(isolate_, pc, fp_to_sp_delta); | 340 processor_->AddDeoptStack(isolate_, pc, fp_to_sp_delta); |
342 } | 341 } |
343 | 342 |
344 | 343 |
345 void CpuProfiler::CodeDeleteEvent(Address from) { | 344 void CpuProfiler::CodeDeleteEvent(Address from) { |
346 } | 345 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 519 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
521 Builtins::Name id = static_cast<Builtins::Name>(i); | 520 Builtins::Name id = static_cast<Builtins::Name>(i); |
522 rec->start = builtins->builtin(id)->address(); | 521 rec->start = builtins->builtin(id)->address(); |
523 rec->builtin_id = id; | 522 rec->builtin_id = id; |
524 processor_->Enqueue(evt_rec); | 523 processor_->Enqueue(evt_rec); |
525 } | 524 } |
526 } | 525 } |
527 | 526 |
528 | 527 |
529 } } // namespace v8::internal | 528 } } // namespace v8::internal |
OLD | NEW |