Chromium Code Reviews| 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 #if defined(USE_SIMULATOR) | |
| 7526 RegisterState regs; | |
| 7527 regs.pc = state.pc; | |
| 7528 regs.sp = state.sp; | |
| 7529 regs.fp = state.fp; | |
| 7530 i::SimulatorHelper::FillRegisters(isolate, ®s); | |
| 7531 i::TickSample::GetStackSample(isolate, regs, i::TickSample::kSkipCEntryFrame, | |
| 7532 frames, frames_limit, sample_info); | |
| 7533 #else | |
| 7525 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, | 7534 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, |
|
alph
2016/04/29 20:59:57
You don't have to copy this line twice. Just make:
lpy
2016/04/29 21:43:10
Done.
| |
| 7526 frames, frames_limit, sample_info); | 7535 frames, frames_limit, sample_info); |
| 7536 #endif | |
| 7527 } | 7537 } |
| 7528 | 7538 |
| 7529 | 7539 |
| 7530 void Isolate::SetEventLogger(LogEventCallback that) { | 7540 void Isolate::SetEventLogger(LogEventCallback that) { |
| 7531 // Do not overwrite the event logger if we want to log explicitly. | 7541 // Do not overwrite the event logger if we want to log explicitly. |
| 7532 if (i::FLAG_log_internal_timer_events) return; | 7542 if (i::FLAG_log_internal_timer_events) return; |
| 7533 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7543 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7534 isolate->set_event_logger(that); | 7544 isolate->set_event_logger(that); |
| 7535 } | 7545 } |
| 7536 | 7546 |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8838 Address callback_address = | 8848 Address callback_address = |
| 8839 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8849 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8840 VMState<EXTERNAL> state(isolate); | 8850 VMState<EXTERNAL> state(isolate); |
| 8841 ExternalCallbackScope call_scope(isolate, callback_address); | 8851 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8842 callback(info); | 8852 callback(info); |
| 8843 } | 8853 } |
| 8844 | 8854 |
| 8845 | 8855 |
| 8846 } // namespace internal | 8856 } // namespace internal |
| 8847 } // namespace v8 | 8857 } // namespace v8 |
| OLD | NEW |