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

Issue 10031032: I'd like to add addr field into EntryInfo struct. (Closed)

Created:
8 years, 8 months ago by loislo
Modified:
8 years, 8 months ago
Reviewers:
mnaganov (inactive), alexeif, yurys, mnaganov
CC:
v8-dev
Visibility:
Public.

Description

I'd like to add addr field into EntryInfo struct. This will give us the ability to keep entries_ list sorted by id. And based on that fact we will be able to use it for: 1) GetNodeById method and drop sorted version of entries list in HeapSnapshot; 2) building heap stats; 3) doing the fill stage instead of second iteration over heap. BUG=none TEST=none R=yurys Committed: https://code.google.com/p/v8/source/detail?r=11259

Patch Set 1 #

Total comments: 9

Patch Set 2 : HashMap::Remove is returning value. A dummy element is added to the entries_. MoveObject and Removeā€¦ #

Patch Set 3 : style errors were fixed #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -37 lines) Patch
M src/hashmap.h View 1 3 chunks +5 lines, -3 lines 1 comment Download
M src/profile-generator.h View 1 1 chunk +5 lines, -4 lines 0 comments Download
M src/profile-generator.cc View 1 2 4 chunks +47 lines, -30 lines 5 comments Download

Messages

Total messages: 8 (0 generated)
loislo
8 years, 8 months ago (2012-04-10 13:08:03 UTC) #1
mnaganov (inactive)
The description isn't very clear: "This will give us the ability to keep entries_ list ...
8 years, 8 months ago (2012-04-10 13:50:13 UTC) #2
yurys
https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.cc#newcode1340 src/profile-generator.cc:1340: ASSERT((uint32_t)entries_->length() >= entries_map_.occupancy()); Please use static_cast<uint32_t> https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.cc#newcode1362 src/profile-generator.cc:1362: // ...
8 years, 8 months ago (2012-04-10 14:03:35 UTC) #3
loislo
On 2012/04/10 13:50:13, Mikhail Naganov (Chromium) wrote: > The description isn't very clear: "This will ...
8 years, 8 months ago (2012-04-10 14:22:10 UTC) #4
loislo
comments addressed. HashMap::Return is returning the value of removed element A dummy element is inserted ...
8 years, 8 months ago (2012-04-10 16:00:26 UTC) #5
yurys
lgtm https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generator.cc#newcode1319 src/profile-generator.cc:1319: entries_->Add(EntryInfo(0, NULL)); Could you add a comment that ...
8 years, 8 months ago (2012-04-10 16:46:35 UTC) #6
alexeif
https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generator.cc File src/profile-generator.cc (right): https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generator.cc#newcode1388 src/profile-generator.cc:1388: ASSERT((uint32_t)entries_->length() > entries_map_.occupancy()); still ditto ;-)
8 years, 8 months ago (2012-04-10 16:55:24 UTC) #7
mnaganov (inactive)
8 years, 8 months ago (2012-04-10 21:12:04 UTC) #8
Overall looks good.

Please change in the description "to keep entries_ list in sorted by id state"
-> "to keep 'entries_' list sorted by id"

https://chromiumcodereview.appspot.com/10031032/diff/6001/src/hashmap.h
File src/hashmap.h (right):

https://chromiumcodereview.appspot.com/10031032/diff/6001/src/hashmap.h#newco...
src/hashmap.h:65: // Removes the entry with matching key.
Please update the comment.

https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generat...
File src/profile-generator.cc (right):

https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generat...
src/profile-generator.cc:1350: ASSERT(from != to);
I'm sure you will be hitting this assert. I think you should remove it.

https://chromiumcodereview.appspot.com/10031032/diff/6001/src/profile-generat...
src/profile-generator.cc:1373: ASSERT(entries_->length() == 1 ||
The first part seems to be superfluous, as if entries_ contains only the dummy
element, its id -- 0 will not exceed any other id.

Powered by Google App Engine
This is Rietveld 408576698