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

Issue 10049002: Introduce a way to grab heap stats. (Closed)

Created:
8 years, 8 months ago by loislo
Modified:
8 years, 8 months ago
CC:
v8-dev
Visibility:
Public.

Description

This patch is introducing a way to grab heap stats. The idea is to monitor the heap regulary and track each object in the heap. With this data we will be able do draw heap usage diagram. Where X is time and Y is the number of objects. BUG=none TEST=HeapSnapshotObjectsStats Committed: https://code.google.com/p/v8/source/detail?r=11302

Patch Set 1 #

Patch Set 2 : cosmetic changes #

Total comments: 3

Patch Set 3 : unused code were removed #

Total comments: 12

Patch Set 4 : empty StartHeapObjectsTracking was removed #

Total comments: 1

Patch Set 5 : comments addressed #

Patch Set 6 : cosmetic changes #

Total comments: 9

Patch Set 7 : comments addressed #

Total comments: 3

Patch Set 8 : comments addressed #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -4 lines) Patch
M include/v8.h View 1 2 3 4 5 6 2 chunks +8 lines, -1 line 0 comments Download
M include/v8-profiler.h View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
M src/api.cc View 1 chunk +21 lines, -0 lines 0 comments Download
M src/heap-profiler.h View 3 chunks +8 lines, -2 lines 0 comments Download
M src/heap-profiler.cc View 3 chunks +32 lines, -1 line 0 comments Download
M src/profile-generator.h View 1 2 3 4 5 4 chunks +16 lines, -0 lines 0 comments Download
M src/profile-generator.cc View 1 2 3 4 5 6 7 1 chunk +76 lines, -0 lines 0 comments Download
M test/cctest/test-heap-profiler.cc View 1 2 3 4 5 6 2 chunks +150 lines, -0 lines 1 comment Download

Messages

Total messages: 10 (0 generated)
loislo
8 years, 8 months ago (2012-04-11 13:18:09 UTC) #1
alexeif
https://chromiumcodereview.appspot.com/10049002/diff/2001/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10049002/diff/2001/src/profile-generator.cc#newcode1428 src/profile-generator.cc:1428: void HeapObjectsMap::StartHeapObjectsTracking() { Do you plan to put something ...
8 years, 8 months ago (2012-04-11 13:53:36 UTC) #2
mnaganov (inactive)
https://chromiumcodereview.appspot.com/10049002/diff/4001/include/v8-profiler.h File include/v8-profiler.h (right): https://chromiumcodereview.appspot.com/10049002/diff/4001/include/v8-profiler.h#newcode420 include/v8-profiler.h:420: static void StartHeapObjectsTracking(); Comments are required. https://chromiumcodereview.appspot.com/10049002/diff/4001/include/v8-profiler.h#newcode422 include/v8-profiler.h:422: static ...
8 years, 8 months ago (2012-04-11 14:35:40 UTC) #3
alexeif
https://chromiumcodereview.appspot.com/10049002/diff/7001/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10049002/diff/7001/src/profile-generator.cc#newcode1463 src/profile-generator.cc:1463: while (entry_info < end_entry_info && entry_info->id < fragment_id) { ...
8 years, 8 months ago (2012-04-11 14:38:51 UTC) #4
loislo
On 2012/04/11 14:35:40, Mikhail Naganov (Chromium) wrote: > https://chromiumcodereview.appspot.com/10049002/diff/4001/include/v8-profiler.h > File include/v8-profiler.h (right): > > ...
8 years, 8 months ago (2012-04-12 12:25:29 UTC) #5
mnaganov (inactive)
https://chromiumcodereview.appspot.com/10049002/diff/14001/include/v8-profiler.h File include/v8-profiler.h (right): https://chromiumcodereview.appspot.com/10049002/diff/14001/include/v8-profiler.h#newcode421 include/v8-profiler.h:421: * This method gives us an update of the ...
8 years, 8 months ago (2012-04-12 13:32:26 UTC) #6
loislo
comments addressed
8 years, 8 months ago (2012-04-12 13:57:28 UTC) #7
alexeif
https://chromiumcodereview.appspot.com/10049002/diff/14003/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10049002/diff/14003/src/profile-generator.cc#newcode1435 src/profile-generator.cc:1435: int entries = 0; never used? https://chromiumcodereview.appspot.com/10049002/diff/14003/src/profile-generator.cc#newcode1456 src/profile-generator.cc:1456: uint32_t ...
8 years, 8 months ago (2012-04-12 14:55:23 UTC) #8
loislo
On 2012/04/12 14:55:23, alexeif wrote: > https://chromiumcodereview.appspot.com/10049002/diff/14003/src/profile-generator.cc > File src/profile-generator.cc (right): > > https://chromiumcodereview.appspot.com/10049002/diff/14003/src/profile-generator.cc#newcode1435 > ...
8 years, 8 months ago (2012-04-13 05:44:10 UTC) #9
mnaganov (inactive)
8 years, 8 months ago (2012-04-13 08:44:51 UTC) #10
LGTM

https://chromiumcodereview.appspot.com/10049002/diff/16002/test/cctest/test-h...
File test/cctest/test-heap-profiler.cc (right):

https://chromiumcodereview.appspot.com/10049002/diff/16002/test/cctest/test-h...
test/cctest/test-heap-profiler.cc:812: TestStatsStream stats_update =
GetHeapStatsUpdate();
nit: Might be worth adding a comment that prior to getting an update GC is
called, so previously added strings must be collected. Otherwise one needs to
get to the implementation in order to understand this.

Powered by Google App Engine
This is Rietveld 408576698