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

Issue 159504: Introduce first approximation of constructor heap profile for JS objects. (Closed)

Created:
11 years, 4 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Introduce first approximation of constructor heap profile for JS objects. It is activated with '--log-gc' flag. JS object size is calculated as its size + size of 'properties' and 'elements' arrays, if they are non-empty. This doesn't take maps, strings, heap numbers, and other shared objects into account. As Soeren suggested, I've moved ZoneSplayTree from jsregexp to zone, and removed now empty jsregexp-inl header file. Committed: http://code.google.com/p/v8/source/detail?r=2570

Patch Set 1 #

Total comments: 6

Patch Set 2 : Soeren's comments applied #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -389 lines) Patch
M src/heap.cc View 1 3 chunks +102 lines, -1 line 0 comments Download
M src/jsregexp.h View 1 chunk +0 lines, -102 lines 0 comments Download
M src/jsregexp.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/jsregexp-inl.h View 1 chunk +0 lines, -260 lines 0 comments Download
M src/log.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/log.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M src/spaces.h View 1 chunk +20 lines, -13 lines 0 comments Download
M src/zone.h View 1 chunk +102 lines, -0 lines 0 comments Download
M src/zone-inl.h View 1 chunk +217 lines, -0 lines 0 comments Download
M test/cctest/test-regexp.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/process-heap-prof.py View 2 chunks +10 lines, -3 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 chunk +0 lines, -4 lines 0 comments Download
M tools/visual_studio/v8_base_arm.vcproj View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 4 months ago (2009-07-28 13:51:45 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/159504/diff/1/2 File src/heap.cc (right): http://codereview.chromium.org/159504/diff/1/2#newcode37 Line 37: #include "jsregexp-inl.h" // for ZoneSplayTree I think ...
11 years, 4 months ago (2009-07-29 07:17:46 UTC) #2
Mikhail Naganov
11 years, 4 months ago (2009-07-29 08:05:22 UTC) #3
http://codereview.chromium.org/159504/diff/1/2
File src/heap.cc (right):

http://codereview.chromium.org/159504/diff/1/2#newcode37
Line 37: #include "jsregexp-inl.h"  // for ZoneSplayTree
On 2009/07/29 07:17:46, Søren Gjesse wrote:
> I think we should move ZoneSplayTree to zone.h/zone-inl.h.

Done. As 'jsregexp-inl.h' only contained ZoneSplayTree implementation, I've
removed it.

http://codereview.chromium.org/159504/diff/1/2#newcode3396
Line 3396: namespace {
On 2009/07/29 07:17:46, Søren Gjesse wrote:
> Why do you need this?

Unnamed namespaces are allowed and even encouraged in .cc files, to avoid
runtime naming conflicts.
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Namesp...

http://codereview.chromium.org/159504/diff/1/2#newcode3406
Line 3406: struct TreeConfig {
On 2009/07/29 07:17:46, Søren Gjesse wrote:
> Maybe you should add a comment on why it is OK to use raw object pointers here
> and why you are just comparing pointer values.

Done.

Powered by Google App Engine
This is Rietveld 408576698