The description isn't very clear: "This will give us the ability to keep
entries_ list in sorted by id state."
- what is "id state"? Did you mean simply "id"?
- not sure, how does adding the 'addr' field help to keep the list sorted
by
id. This is just happens because ids increase, and we add new entries to the
tail of the list.
Did you mean, that adding the 'addr' field will allow to do fast reverse
lookups
from id to address, having that 'entries_' list is naturally sorted by id?
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#newcode1345
src/profile-generator.cc:1345: int
HeapObjectsMap::UpdateEntryInfoAddress(Address addr,
I don't see a clear reason for having EntryInfo lookup and address
update in a single function. I think, restricting the scope to only
making a lookup will make it more clean. Also this should simplify logic
in MoveObject (see below).
https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.cc#newcode1372
src/profile-generator.cc:1372: UpdateEntryInfoAddress(to, to_hash,
NULL);
Why are you making 2 map lookups here?
https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.h
File src/profile-generator.h (right):
https://chromiumcodereview.appspot.com/10031032/diff/1/src/profile-generator.h#newcode736
src/profile-generator.h:736: int UpdateEntryInfoAddress(Address addr,
uint32_t hash, Address new_addr);
hash -> addr_hash. Otherwise, it's not clear where it belongs to.
https://chromiumcodereview.appspot.com/10031032/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev