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

Issue 1347603002: Make all ExternalStrings bail out JIT code when accessing the sting contents

Created:
5 years, 3 months ago by haraken
Modified:
5 years, 3 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Make all ExternalStrings bail out JIT code when accessing the sting contents BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M src/factory.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M src/objects.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
haraken
I'm experimenting with compressing JavaScript source code. The compression will make sense if V8 is ...
5 years, 3 months ago (2015-09-15 05:27:14 UTC) #2
Yang
On 2015/09/15 05:27:14, haraken wrote: > I'm experimenting with compressing JavaScript source code. The compression ...
5 years, 3 months ago (2015-09-15 05:33:32 UTC) #3
haraken
On 2015/09/15 05:33:32, Yang OOO until mid October wrote: > On 2015/09/15 05:27:14, haraken wrote: ...
5 years, 3 months ago (2015-09-15 05:35:41 UTC) #4
Yang
5 years, 3 months ago (2015-09-15 05:43:58 UTC) #5
On 2015/09/15 05:35:41, haraken wrote:
> On 2015/09/15 05:33:32, Yang OOO until mid October wrote:
> > On 2015/09/15 05:27:14, haraken wrote:
> > > I'm experimenting with compressing JavaScript source code. The compression
> > will
> > > make sense if V8 is not frequently accessing the source code, but it won't
> > make
> > > sense otherwise. So I want to understand how frequently V8 accesses the
> source
> > > code.
> > > 
> > > I created this CL to make all ExternalStrings bail out the JIT code so
that
> I
> > > can hook all accesses to the ExternalStrings at
> > WebCoreStringResource8::data():
> > > 
> > >
> >
>
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit...
> > > 
> > > However, it seems that this CL is not working as expected.
> > > 
> > > For example, if we run:
> > > 
> > > <body>
> > > <div id="xxx"></div>
> > > <script>
> > > var div = document.querySelector("div");
> > > var id = div.id;
> > > var str;
> > > for (var i = 0; i < 100; i++)
> > >   str += id;
> > > </script>
> > > 
> > > then I expect that WebCoreStringResource8::data() is called 100 times.
> > However,
> > > it's called only a couple of times.
> > > 
> > > Am I missing somethings?
> > > 
> > > More context:
> > >
> >
>
https://docs.google.com/document/d/1H3u4yCRGeF4QkEQ0LOITZLrU99UUnBSSj3nIEDNkQ...
> > 
> > 
> > if you concatenate a string, we create a ConsString if the concat result
> length
> > is larger than 12 characters. To create a ConsString we do not need to
access
> > the string content.
> 
> ah, OK.
> 
> Do you think that PS1 is doing a right thing? (i.e., always bail out when
> ExternalStrings are accessed)

yes looks fine, at least for experimenting.

Powered by Google App Engine
This is Rietveld 408576698