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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 7504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7515 object_statistics->object_sub_type_ = object_sub_type; | 7515 object_statistics->object_sub_type_ = object_sub_type; |
7516 object_statistics->object_count_ = object_count; | 7516 object_statistics->object_count_ = object_count; |
7517 object_statistics->object_size_ = object_size; | 7517 object_statistics->object_size_ = object_size; |
7518 return true; | 7518 return true; |
7519 } | 7519 } |
7520 | 7520 |
7521 | 7521 |
7522 void Isolate::GetStackSample(const RegisterState& state, void** frames, | 7522 void Isolate::GetStackSample(const RegisterState& state, void** frames, |
7523 size_t frames_limit, SampleInfo* sample_info) { | 7523 size_t frames_limit, SampleInfo* sample_info) { |
7524 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7524 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7525 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, | 7525 RegisterState regs; |
7526 regs.pc = state.pc; | |
alph
2016/04/29 18:55:06
nit: you don't need to do the copy for non-simulat
lpy
2016/04/29 19:51:58
Done.
| |
7527 regs.sp = state.sp; | |
7528 regs.fp = state.fp; | |
7529 #if defined(USE_SIMULATOR) | |
7530 i::SimulatorHelper::FillRegisters(isolate, ®s); | |
7531 #endif | |
7532 i::TickSample::GetStackSample(isolate, regs, i::TickSample::kSkipCEntryFrame, | |
7526 frames, frames_limit, sample_info); | 7533 frames, frames_limit, sample_info); |
7527 } | 7534 } |
7528 | 7535 |
7529 | 7536 |
7530 void Isolate::SetEventLogger(LogEventCallback that) { | 7537 void Isolate::SetEventLogger(LogEventCallback that) { |
7531 // Do not overwrite the event logger if we want to log explicitly. | 7538 // Do not overwrite the event logger if we want to log explicitly. |
7532 if (i::FLAG_log_internal_timer_events) return; | 7539 if (i::FLAG_log_internal_timer_events) return; |
7533 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7540 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7534 isolate->set_event_logger(that); | 7541 isolate->set_event_logger(that); |
7535 } | 7542 } |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8838 Address callback_address = | 8845 Address callback_address = |
8839 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8846 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8840 VMState<EXTERNAL> state(isolate); | 8847 VMState<EXTERNAL> state(isolate); |
8841 ExternalCallbackScope call_scope(isolate, callback_address); | 8848 ExternalCallbackScope call_scope(isolate, callback_address); |
8842 callback(info); | 8849 callback(info); |
8843 } | 8850 } |
8844 | 8851 |
8845 | 8852 |
8846 } // namespace internal | 8853 } // namespace internal |
8847 } // namespace v8 | 8854 } // namespace v8 |
OLD | NEW |