| 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 15 matching lines...) Expand all Loading... |
| 26 base::TimeDelta period) | 26 base::TimeDelta period) |
| 27 : Thread(Thread::Options("v8:ProfEvntProc", kProfilerStackSize)), | 27 : Thread(Thread::Options("v8:ProfEvntProc", kProfilerStackSize)), |
| 28 generator_(generator), | 28 generator_(generator), |
| 29 sampler_(sampler), | 29 sampler_(sampler), |
| 30 running_(1), | 30 running_(1), |
| 31 period_(period), | 31 period_(period), |
| 32 last_code_event_id_(0), | 32 last_code_event_id_(0), |
| 33 last_processed_code_event_id_(0) {} | 33 last_processed_code_event_id_(0) {} |
| 34 | 34 |
| 35 | 35 |
| 36 ProfilerEventsProcessor::~ProfilerEventsProcessor() {} |
| 37 |
| 38 |
| 36 void ProfilerEventsProcessor::Enqueue(const CodeEventsContainer& event) { | 39 void ProfilerEventsProcessor::Enqueue(const CodeEventsContainer& event) { |
| 37 event.generic.order = ++last_code_event_id_; | 40 event.generic.order = ++last_code_event_id_; |
| 38 events_buffer_.Enqueue(event); | 41 events_buffer_.Enqueue(event); |
| 39 } | 42 } |
| 40 | 43 |
| 41 | 44 |
| 42 void ProfilerEventsProcessor::AddDeoptStack(Isolate* isolate, Address from, | 45 void ProfilerEventsProcessor::AddDeoptStack(Isolate* isolate, Address from, |
| 43 int fp_to_sp_delta) { | 46 int fp_to_sp_delta) { |
| 44 TickSampleEventRecord record(last_code_event_id_); | 47 TickSampleEventRecord record(last_code_event_id_); |
| 45 RegisterState regs; | 48 RegisterState regs; |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 Builtins::Name id = static_cast<Builtins::Name>(i); | 542 Builtins::Name id = static_cast<Builtins::Name>(i); |
| 540 rec->start = builtins->builtin(id)->address(); | 543 rec->start = builtins->builtin(id)->address(); |
| 541 rec->builtin_id = id; | 544 rec->builtin_id = id; |
| 542 processor_->Enqueue(evt_rec); | 545 processor_->Enqueue(evt_rec); |
| 543 } | 546 } |
| 544 } | 547 } |
| 545 | 548 |
| 546 | 549 |
| 547 } // namespace internal | 550 } // namespace internal |
| 548 } // namespace v8 | 551 } // namespace v8 |
| OLD | NEW |