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 6673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6684 i::Heap* heap = isolate->heap(); | 6684 i::Heap* heap = isolate->heap(); |
6685 heap_statistics->total_heap_size_ = heap->CommittedMemory(); | 6685 heap_statistics->total_heap_size_ = heap->CommittedMemory(); |
6686 heap_statistics->total_heap_size_executable_ = | 6686 heap_statistics->total_heap_size_executable_ = |
6687 heap->CommittedMemoryExecutable(); | 6687 heap->CommittedMemoryExecutable(); |
6688 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); | 6688 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); |
6689 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); | 6689 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); |
6690 heap_statistics->heap_size_limit_ = heap->MaxReserved(); | 6690 heap_statistics->heap_size_limit_ = heap->MaxReserved(); |
6691 } | 6691 } |
6692 | 6692 |
6693 | 6693 |
| 6694 int Isolate::GetSample(const RegisterState& state, |
| 6695 void** buffer, unsigned int depth) { |
| 6696 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6697 return i::Sampler::GetSample(isolate, state, buffer, depth); |
| 6698 } |
| 6699 |
| 6700 |
6694 void Isolate::SetEventLogger(LogEventCallback that) { | 6701 void Isolate::SetEventLogger(LogEventCallback that) { |
6695 // Do not overwrite the event logger if we want to log explicitly. | 6702 // Do not overwrite the event logger if we want to log explicitly. |
6696 if (i::FLAG_log_timer_events) return; | 6703 if (i::FLAG_log_timer_events) return; |
6697 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6704 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6698 isolate->set_event_logger(that); | 6705 isolate->set_event_logger(that); |
6699 } | 6706 } |
6700 | 6707 |
6701 | 6708 |
6702 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { | 6709 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { |
6703 if (callback == NULL) return; | 6710 if (callback == NULL) return; |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7658 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7665 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7659 Address callback_address = | 7666 Address callback_address = |
7660 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7667 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7661 VMState<EXTERNAL> state(isolate); | 7668 VMState<EXTERNAL> state(isolate); |
7662 ExternalCallbackScope call_scope(isolate, callback_address); | 7669 ExternalCallbackScope call_scope(isolate, callback_address); |
7663 callback(info); | 7670 callback(info); |
7664 } | 7671 } |
7665 | 7672 |
7666 | 7673 |
7667 } } // namespace v8::internal | 7674 } } // namespace v8::internal |
OLD | NEW |