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/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 void ProfilerEventsProcessor::AddCurrentStack(Isolate* isolate) { | 41 void ProfilerEventsProcessor::AddCurrentStack(Isolate* isolate) { |
42 TickSampleEventRecord record(last_code_event_id_); | 42 TickSampleEventRecord record(last_code_event_id_); |
43 RegisterState regs; | 43 RegisterState regs; |
44 StackFrameIterator it(isolate); | 44 StackFrameIterator it(isolate); |
45 if (!it.done()) { | 45 if (!it.done()) { |
46 StackFrame* frame = it.frame(); | 46 StackFrame* frame = it.frame(); |
47 regs.sp = frame->sp(); | 47 regs.sp = frame->sp(); |
48 regs.fp = frame->fp(); | 48 regs.fp = frame->fp(); |
49 regs.pc = frame->pc(); | 49 regs.pc = frame->pc(); |
50 } | 50 } |
51 record.sample.Init(isolate, regs); | 51 record.sample.Init(isolate, regs, TickSample::kSkipCEntryFrame); |
52 ticks_from_vm_buffer_.Enqueue(record); | 52 ticks_from_vm_buffer_.Enqueue(record); |
53 } | 53 } |
54 | 54 |
55 | 55 |
56 void ProfilerEventsProcessor::StopSynchronously() { | 56 void ProfilerEventsProcessor::StopSynchronously() { |
57 if (!base::NoBarrier_AtomicExchange(&running_, 0)) return; | 57 if (!base::NoBarrier_AtomicExchange(&running_, 0)) return; |
58 Join(); | 58 Join(); |
59 } | 59 } |
60 | 60 |
61 | 61 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 497 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
498 Builtins::Name id = static_cast<Builtins::Name>(i); | 498 Builtins::Name id = static_cast<Builtins::Name>(i); |
499 rec->start = builtins->builtin(id)->address(); | 499 rec->start = builtins->builtin(id)->address(); |
500 rec->builtin_id = id; | 500 rec->builtin_id = id; |
501 processor_->Enqueue(evt_rec); | 501 processor_->Enqueue(evt_rec); |
502 } | 502 } |
503 } | 503 } |
504 | 504 |
505 | 505 |
506 } } // namespace v8::internal | 506 } } // namespace v8::internal |
OLD | NEW |