| 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 22 matching lines...) Expand all Loading... |
| 33 #include "src/json-parser.h" | 33 #include "src/json-parser.h" |
| 34 #include "src/messages.h" | 34 #include "src/messages.h" |
| 35 #include "src/natives.h" | 35 #include "src/natives.h" |
| 36 #include "src/parser.h" | 36 #include "src/parser.h" |
| 37 #include "src/profile-generator-inl.h" | 37 #include "src/profile-generator-inl.h" |
| 38 #include "src/property.h" | 38 #include "src/property.h" |
| 39 #include "src/property-details.h" | 39 #include "src/property-details.h" |
| 40 #include "src/prototype.h" | 40 #include "src/prototype.h" |
| 41 #include "src/runtime.h" | 41 #include "src/runtime.h" |
| 42 #include "src/runtime-profiler.h" | 42 #include "src/runtime-profiler.h" |
| 43 #include "src/sampler.h" |
| 43 #include "src/scanner-character-streams.h" | 44 #include "src/scanner-character-streams.h" |
| 44 #include "src/simulator.h" | 45 #include "src/simulator.h" |
| 45 #include "src/snapshot.h" | 46 #include "src/snapshot.h" |
| 46 #include "src/unicode-inl.h" | 47 #include "src/unicode-inl.h" |
| 47 #include "src/v8threads.h" | 48 #include "src/v8threads.h" |
| 48 #include "src/version.h" | 49 #include "src/version.h" |
| 49 #include "src/vm-state-inl.h" | 50 #include "src/vm-state-inl.h" |
| 50 | 51 |
| 51 | 52 |
| 52 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr)) | 53 #define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr)) |
| (...skipping 6631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6684 i::Heap* heap = isolate->heap(); | 6685 i::Heap* heap = isolate->heap(); |
| 6685 heap_statistics->total_heap_size_ = heap->CommittedMemory(); | 6686 heap_statistics->total_heap_size_ = heap->CommittedMemory(); |
| 6686 heap_statistics->total_heap_size_executable_ = | 6687 heap_statistics->total_heap_size_executable_ = |
| 6687 heap->CommittedMemoryExecutable(); | 6688 heap->CommittedMemoryExecutable(); |
| 6688 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); | 6689 heap_statistics->total_physical_size_ = heap->CommittedPhysicalMemory(); |
| 6689 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); | 6690 heap_statistics->used_heap_size_ = heap->SizeOfObjects(); |
| 6690 heap_statistics->heap_size_limit_ = heap->MaxReserved(); | 6691 heap_statistics->heap_size_limit_ = heap->MaxReserved(); |
| 6691 } | 6692 } |
| 6692 | 6693 |
| 6693 | 6694 |
| 6695 int Isolate::GetStackSample(const RegisterState& state, void** frames, |
| 6696 int frames_limit) { |
| 6697 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6698 return i::TickSample::GetStackSample(isolate, state, frames, frames_limit); |
| 6699 } |
| 6700 |
| 6701 |
| 6694 void Isolate::SetEventLogger(LogEventCallback that) { | 6702 void Isolate::SetEventLogger(LogEventCallback that) { |
| 6695 // Do not overwrite the event logger if we want to log explicitly. | 6703 // Do not overwrite the event logger if we want to log explicitly. |
| 6696 if (i::FLAG_log_timer_events) return; | 6704 if (i::FLAG_log_timer_events) return; |
| 6697 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6705 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6698 isolate->set_event_logger(that); | 6706 isolate->set_event_logger(that); |
| 6699 } | 6707 } |
| 6700 | 6708 |
| 6701 | 6709 |
| 6702 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { | 6710 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { |
| 6703 if (callback == NULL) return; | 6711 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()); | 7666 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7659 Address callback_address = | 7667 Address callback_address = |
| 7660 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7668 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7661 VMState<EXTERNAL> state(isolate); | 7669 VMState<EXTERNAL> state(isolate); |
| 7662 ExternalCallbackScope call_scope(isolate, callback_address); | 7670 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7663 callback(info); | 7671 callback(info); |
| 7664 } | 7672 } |
| 7665 | 7673 |
| 7666 | 7674 |
| 7667 } } // namespace v8::internal | 7675 } } // namespace v8::internal |
| OLD | NEW |