Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1245)

Issue 7736020: Convert sliced strings into sequential strings when promoting into old space. (Closed)

Created:
9 years, 3 months ago by Yang
Modified:
9 years, 3 months ago
CC:
v8-dev
Visibility:
Public.

Description

Convert sliced strings into sequential strings when promoting into old space. TEST=cctest test-strings/SliceConversion

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -17 lines) Patch
M src/heap.cc View 6 chunks +80 lines, -14 lines 0 comments Download
M test/cctest/test-strings.cc View 1 chunk +33 lines, -0 lines 0 comments Download
M test/mjsunit/string-slices.js View 4 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Yang
Please take a look.
9 years, 3 months ago (2011-08-29 14:30:13 UTC) #1
Erik Corry
This change worries me. This can cause a space explosion during GC for pathological cases. ...
9 years, 3 months ago (2011-08-29 20:17:24 UTC) #2
Vitaly Repeshko
This need more work. Even if we stop simplifying sliced strings when running out of ...
9 years, 3 months ago (2011-08-30 00:51:01 UTC) #3
Yang
On 2011/08/30 00:51:01, Vitaly Repeshko wrote: > This need more work. > > Even if ...
9 years, 3 months ago (2011-09-07 14:17:35 UTC) #4
Vitaly Repeshko
9 years, 3 months ago (2011-09-08 17:22:24 UTC) #5
On 2011/09/07 14:17:35, Yang wrote:
> On 2011/08/30 00:51:01, Vitaly Repeshko wrote:
> > This need more work.
> > 
> > Even if we stop simplifying sliced strings when running out of memory during
> GC,
> > it can hurt other object types that can't tolerate allocation failures.
> > 
> > Whatever scheme we come up with should be memory efficient. In other words,
> > simplifying slices should not increase total memory usage.
> > 
> > And as Erik points out this change can cause subtle bugs when a string shape
> is
> > changed after being inspected. Have you verified our runtime and generated
> code
> > to be immune to this?
> > 
> > 
> > Thanks,
> > Vitaly
> 
> After reviewing the implementation in Firefox and doing some more testing, I
> think leaving this as is would be the best option. Parent strings will be kept
> in the memory as long as slices that point to them stay alive, but the chance
of
> doing that to a very long string is low and would not cause any problem.

Keeping things as they are seems fine. Yet I'm not sure the chances of retaining
huge strings this way are too low. For example, a web app could receive periodic
huge responses and keep small substrings from them. Let's at least file a bug to
track this issue.

Powered by Google App Engine
This is Rietveld 408576698