Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/api.cc

Issue 1095393005: Changing Size to SizeOfObjects in GetHeapSpaceStatistics api. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698