A page created a number of ConsStrings that refer to one big string.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Nov 2011 12:15:35 +0000 (12:15 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 9 Nov 2011 12:15:35 +0000 (12:15 +0000)
commit49df2a6ddc1f045e05211375b3e323e9820ece1e
tree8dfce7678f7e10dc847bb3d598e8bdbae4bba1ab
parent034eb1738741dd6f5950458d9c0c9b51257184b3
A page created a number of ConsStrings that refer to one big string.
Each such string requires small amount of heap memory.
Heap snapshot generator copies all the strings into internal hash map for future use.
The each copy requires much more memory than original v8 string.

I made a workaround for this. The snapshot will copy only first 1024 symbols.
A simple drive-by fix was made for a performance problem in ToCString implementation.

BUG=v8:1816
TEST=none

Review URL: http://codereview.chromium.org/8509003
Patch from Ilya Tikhonovsky <loislo@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/objects.cc
src/profile-generator.cc
src/profile-generator.h