On 2013/09/16 12:45:10, Yang wrote:
I suppose that the value is set by GetStringId, which assigns it by a growing index, making it unrelated to the string content. In that case, the sort order is arbitrary, even if reproducible. Why do we need it to be sorted to begin
with?

heap snapshot has number of strings inside as node names and edge names.
We are keeping these strings in strings part of the snapshot and use their
indexes in the nodes and edges.
We could put the names into strings part in the same order as they appears in
the nodes and in the edges parts.
But in that case many strings will have duplicates.
So we maps the strings into indexes. But we don't serialize indexes itself for
reducing the transfer size.





https://codereview.chromium.org/24174002/diff/7001/src/heap-snapshot-generator.cc
File src/heap-snapshot-generator.cc (right):


https://codereview.chromium.org/24174002/diff/7001/src/heap-snapshot-generator.cc#newcode2697
src/heap-snapshot-generator.cc:2697: Vector<const unsigned
char*>::New(strings_.occupancy() + 1);
We don't seem to call Dispose on the Vector anywhere. Leak?

done



https://codereview.chromium.org/24174002/diff/7001/src/heap-snapshot-generator.cc#newcode2700
src/heap-snapshot-generator.cc:2700: entry = strings_.Next(entry)) {
indentation is a bit off.

done


https://codereview.chromium.org/24174002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to