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

Issue 6665038: Dramatically speed up detailed heap snapshot generation. (Closed)

Created:
9 years, 9 months ago by mnaganov (inactive)
Modified:
9 years, 7 months ago
Reviewers:
Vitaly Repeshko
CC:
v8-dev
Visibility:
Public.

Description

Dramatically speed up detailed heap snapshot generation. I've replaced calls to HashMap::Clear with instance re-creation. This has sped up taking a heap snapshot of GMail from 33s -> 3s! R=vitalyr@chromium.org BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=7259

Patch Set 1 #

Patch Set 2 : Don't use a hash map, instead mark references #

Total comments: 16

Patch Set 3 : Comments addressed #

Patch Set 4 : Fix visited marks usage" #

Total comments: 4

Patch Set 5 : Comments addressed #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -39 lines) Patch
M src/objects.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M src/profile-generator.h View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M src/profile-generator.cc View 1 2 3 4 14 chunks +68 lines, -33 lines 2 comments Download

Messages

Total messages: 11 (0 generated)
mnaganov (inactive)
9 years, 9 months ago (2011-03-16 18:36:06 UTC) #1
mnaganov (inactive)
On 2011/03/16 18:36:06, Mikhail Naganov (Chromium) wrote: As we have discussed offline with Vitaly, stressing ...
9 years, 9 months ago (2011-03-16 19:37:01 UTC) #2
Vitaly Repeshko
Nice! I do like the speedup, but I'm worried that this stresses the malloc implementation. ...
9 years, 9 months ago (2011-03-16 19:37:28 UTC) #3
mnaganov (inactive)
On 2011/03/16 19:37:28, Vitaly Repeshko wrote: > Nice! I do like the speedup, but I'm ...
9 years, 9 months ago (2011-03-17 16:33:39 UTC) #4
Vitaly Repeshko
http://codereview.chromium.org/6665038/diff/4001/src/objects.h File src/objects.h (right): http://codereview.chromium.org/6665038/diff/4001/src/objects.h#newcode1125 src/objects.h:1125: inline Address GetFieldAddress(int offset); This is "obj->address() + offset". ...
9 years, 9 months ago (2011-03-17 16:52:00 UTC) #5
Vitaly Repeshko
http://codereview.chromium.org/6665038/diff/4001/src/profile-generator.cc File src/profile-generator.cc (right): http://codereview.chromium.org/6665038/diff/4001/src/profile-generator.cc#newcode1902 src/profile-generator.cc:1902: SetInternalReference(obj, entry, 1, cs->first()); On 2011/03/17 16:52:00, Vitaly Repeshko ...
9 years, 9 months ago (2011-03-17 16:53:13 UTC) #6
mnaganov (inactive)
http://codereview.chromium.org/6665038/diff/4001/src/objects.h File src/objects.h (right): http://codereview.chromium.org/6665038/diff/4001/src/objects.h#newcode1125 src/objects.h:1125: inline Address GetFieldAddress(int offset); On 2011/03/17 16:52:00, Vitaly Repeshko ...
9 years, 9 months ago (2011-03-17 17:37:18 UTC) #7
Vitaly Repeshko
http://codereview.chromium.org/6665038/diff/8002/src/objects-inl.h File src/objects-inl.h (right): http://codereview.chromium.org/6665038/diff/8002/src/objects-inl.h#newcode1345 src/objects-inl.h:1345: int JSObject::GetFastPropertyOffset(int index) { This should be called "GetInObjectPropertyOffset". ...
9 years, 9 months ago (2011-03-18 12:16:36 UTC) #8
mnaganov (inactive)
http://codereview.chromium.org/6665038/diff/8002/src/objects-inl.h File src/objects-inl.h (right): http://codereview.chromium.org/6665038/diff/8002/src/objects-inl.h#newcode1345 src/objects-inl.h:1345: int JSObject::GetFastPropertyOffset(int index) { On 2011/03/18 12:16:36, Vitaly Repeshko ...
9 years, 9 months ago (2011-03-18 12:31:01 UTC) #9
Vitaly Repeshko
LGTM http://codereview.chromium.org/6665038/diff/11001/src/profile-generator.cc File src/profile-generator.cc (right): http://codereview.chromium.org/6665038/diff/11001/src/profile-generator.cc#newcode1952 src/profile-generator.cc:1952: if (index - js_obj->map()->inobject_properties() < 0) { nit: ...
9 years, 9 months ago (2011-03-18 12:36:02 UTC) #10
mnaganov (inactive)
9 years, 9 months ago (2011-03-18 12:46:34 UTC) #11
http://codereview.chromium.org/6665038/diff/11001/src/profile-generator.cc
File src/profile-generator.cc (right):

http://codereview.chromium.org/6665038/diff/11001/src/profile-generator.cc#ne...
src/profile-generator.cc:1952: if (index - js_obj->map()->inobject_properties()
< 0) {
On 2011/03/18 12:36:03, Vitaly Repeshko wrote:
> nit: It's probably more natural to write "index <
> js_obj->map()->inobject_properties()" instead.

Sure. I also have noted this afterwards.

Powered by Google App Engine
This is Rietveld 408576698