On 2013/09/16 13:08:25, loislo wrote:
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
LGTM.
I actually meant that the indentation for the for loop should look like
for (var i = 0;
i < 10;
i++) {}
so that the items in the bracket line up with each other, not with the
bracket.
https://codereview.chromium.org/24174002/
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.