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

Issue 1058253003: Adding V8 api to get memory statistics of spaces in V8::Heap. (Closed)

Created:
5 years, 8 months ago by ssid
Modified:
5 years, 8 months ago
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Adding V8 api to get memory statistics of spaces in V8::Heap. This is first step towards adding V8 heap statistics to the memory tracing infrastructure. For being able to get useful memory number into the memory dump, v8 needs to provide an external api needs to obtain more information about the heap. So, this Cl extends the api to give information about the memory allocated and used in the spaces. BUG=466141, 476013 LOG=Y Committed: https://crrev.com/281d30d758dc9060045ada1b3d326bfe3ef668dd Cr-Commit-Position: refs/heads/master@{#27919}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Made changes. #

Total comments: 10

Patch Set 3 : Made changes. #

Patch Set 4 : Added physical_size. #

Patch Set 5 : Added pimpl class for using vector. #

Total comments: 1

Patch Set 6 : Adding new APIs for space statistics. #

Total comments: 16

Patch Set 7 : Fixing comments. #

Patch Set 8 : Added base class functions. #

Patch Set 9 : Fixing build. #

Total comments: 13

Patch Set 10 : Fixed comments. #

Total comments: 5

Patch Set 11 : Made changes. #

Total comments: 2

Patch Set 12 : Made changes. #

Total comments: 2

Patch Set 13 : Made changes. #

Patch Set 14 : Fixing jochen's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -21 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +37 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +33 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 11 1 chunk +13 lines, -0 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 8 9 11 13 chunks +44 lines, -21 lines 0 comments Download

Messages

Total messages: 45 (14 generated)
ssid
5 years, 8 months ago (2015-04-10 18:01:51 UTC) #2
ssid
+rmcilroy@
5 years, 8 months ago (2015-04-13 10:29:06 UTC) #4
rmcilroy
https://codereview.chromium.org/1058253003/diff/1/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/1/include/v8.h#newcode4896 include/v8.h:4896: SpaceStatistics lo_space_stats_; Maybe we want to make this a ...
5 years, 8 months ago (2015-04-13 12:48:23 UTC) #5
ssid
Made changes, PTAL
5 years, 8 months ago (2015-04-13 15:56:10 UTC) #6
rmcilroy
https://codereview.chromium.org/1058253003/diff/20001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/20001/include/v8.h#newcode21 include/v8.h:21: #include <vector> We probably don't want to pull in ...
5 years, 8 months ago (2015-04-13 17:40:08 UTC) #8
ssid
Thanks, It works passing pointer of vector. PTAL. https://codereview.chromium.org/1058253003/diff/20001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/20001/include/v8.h#newcode4860 include/v8.h:4860: SpaceStatistics(size_t ...
5 years, 8 months ago (2015-04-14 16:59:16 UTC) #10
rmcilroy
https://codereview.chromium.org/1058253003/diff/100001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1058253003/diff/100001/src/api.cc#newcode5478 src/api.cc:5478: HeapStatistics::~HeapStatistics() { free(spaces_statistics_); } You are using 'new' and ...
5 years, 8 months ago (2015-04-14 17:25:53 UTC) #11
Primiano Tucci (use gerrit)
Hmm I am not a V8 owner but this still feels a bit hairy, how ...
5 years, 8 months ago (2015-04-14 17:35:32 UTC) #12
rmcilroy
On 2015/04/14 17:35:32, Primiano Tucci wrote: > Hmm I am not a V8 owner but ...
5 years, 8 months ago (2015-04-14 18:14:26 UTC) #13
ssid
Added new APIs, I think this looks better.
5 years, 8 months ago (2015-04-14 19:29:50 UTC) #15
rmcilroy
Looks much cleaner this way, thanks. https://codereview.chromium.org/1058253003/diff/140001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/140001/include/v8.h#newcode5292 include/v8.h:5292: void GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, ...
5 years, 8 months ago (2015-04-15 10:21:42 UTC) #16
ssid
Replies inline. https://codereview.chromium.org/1058253003/diff/140001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1058253003/diff/140001/src/api.cc#newcode7019 src/api.cc:7019: space_statistics->space_used_size_ = heap->new_space()->Size(); On 2015/04/15 10:21:42, rmcilroy ...
5 years, 8 months ago (2015-04-15 10:29:20 UTC) #17
ssid
Thanks. Made changes. PTAL https://codereview.chromium.org/1058253003/diff/140001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/140001/include/v8.h#newcode5292 include/v8.h:5292: void GetHeapSpaceStatistics(HeapSpaceStatistics* space_statistics, int index); ...
5 years, 8 months ago (2015-04-15 10:43:58 UTC) #18
rmcilroy
https://codereview.chromium.org/1058253003/diff/140001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1058253003/diff/140001/src/api.cc#newcode7019 src/api.cc:7019: space_statistics->space_used_size_ = heap->new_space()->Size(); On 2015/04/15 10:29:20, ssid wrote: > ...
5 years, 8 months ago (2015-04-15 12:17:40 UTC) #20
Hannes Payer (out of office)
https://codereview.chromium.org/1058253003/diff/140001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1058253003/diff/140001/src/api.cc#newcode7036 src/api.cc:7036: space_statistics->space_avalable_size_ = heap->lo_space()->Available(); On 2015/04/15 12:17:40, rmcilroy wrote: > ...
5 years, 8 months ago (2015-04-15 21:09:23 UTC) #21
ssid
Thanks. Made changes. PTAL.
5 years, 8 months ago (2015-04-16 12:11:59 UTC) #23
rmcilroy
Looks pretty good. Once the nits below are addressed and the compile errors are fixed ...
5 years, 8 months ago (2015-04-16 13:49:05 UTC) #24
rmcilroy
Looks pretty good. Once the nits below are addressed and the compile errors are fixed ...
5 years, 8 months ago (2015-04-16 13:49:07 UTC) #25
ssid
Made changes. PTAL. https://codereview.chromium.org/1058253003/diff/220001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/220001/include/v8.h#newcode4910 include/v8.h:4910: size_t space_avalable_size() { return space_avalable_size_; } ...
5 years, 8 months ago (2015-04-16 16:40:30 UTC) #26
rmcilroy
Looks good with a couple more things. Let me know when you've moved this over ...
5 years, 8 months ago (2015-04-16 16:53:36 UTC) #27
ssid
Done. https://codereview.chromium.org/1058253003/diff/240001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/240001/include/v8.h#newcode5293 include/v8.h:5293: * \param space_statistics the HeapSpaceStatistics object to fill ...
5 years, 8 months ago (2015-04-16 17:27:07 UTC) #28
Hannes Payer (out of office)
https://codereview.chromium.org/1058253003/diff/260001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1058253003/diff/260001/src/heap/heap.cc#newcode58 src/heap/heap.cc:58: const char* kNewSpaceName = "new_space"; The constants are only ...
5 years, 8 months ago (2015-04-17 09:07:25 UTC) #29
rmcilroy
Danno: Could you give this an API OWNER's review? Thanks. https://codereview.chromium.org/1058253003/diff/260001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1058253003/diff/260001/src/heap/heap.cc#newcode58 ...
5 years, 8 months ago (2015-04-17 09:25:53 UTC) #30
rmcilroy
Actually add danno@ this time... Danno: Could you give this an API OWNER's review? Thanks.
5 years, 8 months ago (2015-04-17 10:09:10 UTC) #32
rmcilroy
-danno, +jochen (on danno's request) Jochen, could you give this an API OWNER review please.
5 years, 8 months ago (2015-04-17 12:23:38 UTC) #34
jochen (gone - plz use gerrit)
lgtm with nits https://codereview.chromium.org/1058253003/diff/280001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/1058253003/diff/280001/include/v8.h#newcode5288 include/v8.h:5288: int NumberOfHeapSpaces(); size_t https://codereview.chromium.org/1058253003/diff/280001/include/v8.h#newcode5299 include/v8.h:5299: bool ...
5 years, 8 months ago (2015-04-17 12:30:10 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1058253003/300001
5 years, 8 months ago (2015-04-17 12:36:26 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: v8_win64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel/builds/3941)
5 years, 8 months ago (2015-04-17 12:51:21 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1058253003/320001
5 years, 8 months ago (2015-04-17 14:02:38 UTC) #43
commit-bot: I haz the power
Committed patchset #14 (id:320001)
5 years, 8 months ago (2015-04-17 14:04:38 UTC) #44
commit-bot: I haz the power
5 years, 8 months ago (2015-04-17 14:04:51 UTC) #45
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/281d30d758dc9060045ada1b3d326bfe3ef668dd
Cr-Commit-Position: refs/heads/master@{#27919}

Powered by Google App Engine
This is Rietveld 408576698