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 6874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6885 return false; | 6885 return false; |
6886 if (index > i::LAST_SPACE || index < i::FIRST_SPACE) | 6886 if (index > i::LAST_SPACE || index < i::FIRST_SPACE) |
6887 return false; | 6887 return false; |
6888 | 6888 |
6889 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6889 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6890 i::Heap* heap = isolate->heap(); | 6890 i::Heap* heap = isolate->heap(); |
6891 i::Space* space = heap->space(static_cast<int>(index)); | 6891 i::Space* space = heap->space(static_cast<int>(index)); |
6892 | 6892 |
6893 space_statistics->space_name_ = heap->GetSpaceName(static_cast<int>(index)); | 6893 space_statistics->space_name_ = heap->GetSpaceName(static_cast<int>(index)); |
6894 space_statistics->space_size_ = space->CommittedMemory(); | 6894 space_statistics->space_size_ = space->CommittedMemory(); |
6895 space_statistics->space_used_size_ = space->Size(); | 6895 space_statistics->space_used_size_ = space->SizeOfObjects(); |
6896 space_statistics->space_available_size_ = space->Available(); | 6896 space_statistics->space_available_size_ = space->Available(); |
6897 space_statistics->physical_space_size_ = space->CommittedPhysicalMemory(); | 6897 space_statistics->physical_space_size_ = space->CommittedPhysicalMemory(); |
6898 return true; | 6898 return true; |
6899 } | 6899 } |
6900 | 6900 |
6901 | 6901 |
6902 void Isolate::GetStackSample(const RegisterState& state, void** frames, | 6902 void Isolate::GetStackSample(const RegisterState& state, void** frames, |
6903 size_t frames_limit, SampleInfo* sample_info) { | 6903 size_t frames_limit, SampleInfo* sample_info) { |
6904 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6904 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6905 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, | 6905 i::TickSample::GetStackSample(isolate, state, i::TickSample::kSkipCEntryFrame, |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8009 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8009 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8010 Address callback_address = | 8010 Address callback_address = |
8011 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8011 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8012 VMState<EXTERNAL> state(isolate); | 8012 VMState<EXTERNAL> state(isolate); |
8013 ExternalCallbackScope call_scope(isolate, callback_address); | 8013 ExternalCallbackScope call_scope(isolate, callback_address); |
8014 callback(info); | 8014 callback(info); |
8015 } | 8015 } |
8016 | 8016 |
8017 | 8017 |
8018 } } // namespace v8::internal | 8018 } } // namespace v8::internal |
OLD | NEW |