Introduce object visitor to estimate the size of a native context.
authoryangguo <yangguo@chromium.org>
Wed, 5 Aug 2015 14:06:43 +0000 (07:06 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 5 Aug 2015 14:07:33 +0000 (14:07 +0000)
commit0a1a714f7e700b3d882e3485008fa5a24cf80584
treecab1958dd9b68af9f4f7d0f2f3fbd46dc307fe39
parent1cb27bce6778ac9a168bf9ca371daa00e040620e
Introduce object visitor to estimate the size of a native context.

This is only an estimate since it counts objects that could be shared,
for example strings, cow arrays, heap numbers, etc.

It however ignores objects that could be shared, but may only be used
by the context to be measured, for example shared function infos,
script objects, scope infos, etc.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1268333004

Cr-Commit-Position: refs/heads/master@{#30029}
BUILD.gn
include/v8.h
src/api.cc
src/context-measure.cc [new file with mode: 0644]
src/context-measure.h [new file with mode: 0644]
src/snapshot/serialize.h
test/cctest/test-api.cc
test/cctest/test-heap.cc
tools/gyp/v8.gyp