| 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 6686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6697 heap->CommittedMemoryExecutable(); | 6697 heap->CommittedMemoryExecutable(); |
| 6698 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); | 6698 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); |
| 6699 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); | 6699 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); |
| 6700 heap_statistics->heap_size_limit_ = heap->MaxReserved(); | 6700 heap_statistics->heap_size_limit_ = heap->MaxReserved(); |
| 6701 } | 6701 } |
| 6702 | 6702 |
| 6703 | 6703 |
| 6704 void Isolate::GetStackSample(const RegisterState& state, void** frames, | 6704 void Isolate::GetStackSample(const RegisterState& state, void** frames, |
| 6705 size_t frames_limit, SampleInfo* sample_info) { | 6705 size_t frames_limit, SampleInfo* sample_info) { |
| 6706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6706 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6707 i::TickSample::GetStackSample(isolate, state, frames, frames_limit, | 6707 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, |
| 6708 sample_info); | 6708 frames, frames_limit, sample_info); |
| 6709 } | 6709 } |
| 6710 | 6710 |
| 6711 | 6711 |
| 6712 void Isolate::SetEventLogger(LogEventCallback that) { | 6712 void Isolate::SetEventLogger(LogEventCallback that) { |
| 6713 // Do not overwrite the event logger if we want to log explicitly. | 6713 // Do not overwrite the event logger if we want to log explicitly. |
| 6714 if (i::FLAG_log_internal_timer_events) return; | 6714 if (i::FLAG_log_internal_timer_events) return; |
| 6715 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6715 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6716 isolate->set_event_logger(that); | 6716 isolate->set_event_logger(that); |
| 6717 } | 6717 } |
| 6718 | 6718 |
| (...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7693 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7693 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7694 Address callback_address = | 7694 Address callback_address = |
| 7695 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7695 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7696 VMState<EXTERNAL> state(isolate); | 7696 VMState<EXTERNAL> state(isolate); |
| 7697 ExternalCallbackScope call_scope(isolate, callback_address); | 7697 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7698 callback(info); | 7698 callback(info); |
| 7699 } | 7699 } |
| 7700 | 7700 |
| 7701 | 7701 |
| 7702 } } // namespace v8::internal | 7702 } } // namespace v8::internal |
| OLD | NEW |