diff options
author | ssid <ssid@chromium.org> | 2015-05-12 13:46:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 20:47:02 +0000 |
commit | b765e2ad9225ecca8c89d535870365d33e9a728f (patch) | |
tree | e45e6997b388349073ed811c6e3e84afa4acb28e /gin | |
parent | 0dc50879a2b7b41320959cf064d3bddf13e109da (diff) | |
download | chromium_src-b765e2ad9225ecca8c89d535870365d33e9a728f.zip chromium_src-b765e2ad9225ecca8c89d535870365d33e9a728f.tar.gz chromium_src-b765e2ad9225ecca8c89d535870365d33e9a728f.tar.bz2 |
Revert of Adding total available size of heap in v8 isolate memory dump provider. (patchset #1 id:1 of https://codereview.chromium.org/1129403003/)
Reason for revert:
The HeapStatistics::total_available_size returned by v8 API doesn't return the correct value right now. It only returns the sum of available size of 4 spaces only. So, this should land after the API gets fixed.
Original issue's description:
> Adding total available size of heap in v8 isolate memory dump provider.
>
> The total available size is now returned by GetHeapStatistics api.
> This CL uses the value in the dump provider to show the value in
> other_spaces segment of the memory dump.
>
> BUG=481504
>
> Committed: https://crrev.com/9ad94e6e06201059c08d67b9d9ab4a30a766b541
> Cr-Commit-Position: refs/heads/master@{#329303}
TBR=jochen@chromium.org,picksi@chromium.org,primiano@chromium.org
BUG=481504
Review URL: https://codereview.chromium.org/1134233002
Cr-Commit-Position: refs/heads/master@{#329479}
Diffstat (limited to 'gin')
-rw-r--r-- | gin/v8_isolate_memory_dump_provider.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gin/v8_isolate_memory_dump_provider.cc b/gin/v8_isolate_memory_dump_provider.cc index fd58efd..4530879 100644 --- a/gin/v8_isolate_memory_dump_provider.cc +++ b/gin/v8_isolate_memory_dump_provider.cc @@ -53,7 +53,6 @@ void V8IsolateMemoryDumpProvider::DumpMemoryStatistics( size_t known_spaces_used_size = 0; size_t known_spaces_size = 0; - size_t known_spaces_available_size = 0; size_t number_of_spaces = isolate_holder_->isolate()->NumberOfHeapSpaces(); for (size_t space = 0; space < number_of_spaces; space++) { v8::HeapSpaceStatistics space_statistics; @@ -61,11 +60,9 @@ void V8IsolateMemoryDumpProvider::DumpMemoryStatistics( space); const size_t space_size = space_statistics.space_size(); const size_t space_used_size = space_statistics.space_used_size(); - size_t space_available_size = space_statistics.space_available_size(); known_spaces_size += space_size; known_spaces_used_size += space_used_size; - known_spaces_available_size += space_available_size; std::string allocator_name = base::StringPrintf("%s/%s_%p/%s/%s", kRootDumpName, kIsolateDumpName, @@ -77,12 +74,14 @@ void V8IsolateMemoryDumpProvider::DumpMemoryStatistics( base::trace_event::MemoryAllocatorDump::kNameOuterSize, base::trace_event::MemoryAllocatorDump::kUnitsBytes, space_size); + // TODO(ssid): Fix crbug.com/481504 to get the objects count of live objects + // after the last GC. space_dump->AddScalar( base::trace_event::MemoryAllocatorDump::kNameInnerSize, base::trace_event::MemoryAllocatorDump::kUnitsBytes, space_used_size); space_dump->AddScalar(kAvailableSizeAttribute, base::trace_event::MemoryAllocatorDump::kUnitsBytes, - space_available_size); + space_statistics.space_available_size()); } // Compute the rest of the memory, not accounted by the spaces above. std::string allocator_name = base::StringPrintf( @@ -103,8 +102,7 @@ void V8IsolateMemoryDumpProvider::DumpMemoryStatistics( // heap. other_spaces_dump->AddScalar( kAvailableSizeAttribute, - base::trace_event::MemoryAllocatorDump::kUnitsBytes, - heap_statistics.total_available_size() - known_spaces_available_size); + base::trace_event::MemoryAllocatorDump::kUnitsBytes, 0); } } // namespace gin |