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

Issue 7282026: Introduce code flushing of RegExp code. (Closed)

Created:
9 years, 5 months ago by Rico
Modified:
9 years, 5 months ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

Introduce code flushing of RegExp code. Due to issues relating mostly to chrome extensions we have lately been running into OOMs that are caused by our executable space running out. This change introduces flushing of code from regexps if we have not used the code for 5 mark sweeps. The approach is different from the normal function code flusing. Here we make a copy of the code inside the data array, and exchange the original code with a smi determined by the sweep_generation (a new heap variable increased everytime we do mark sweep/compact). If we encounter a smi in EnsureCompiled we simply reinstate the code object. If, in the marking phase of mark sweep, we find a regexp that already have a smi in the code field, and this is more than 5 generations old we flush the code from the saved index. Committed: http://code.google.com/p/v8/source/detail?r=8532

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 19

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 4

Patch Set 9 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -45 lines) Patch
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 3 chunks +7 lines, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M src/jsregexp.cc View 1 2 3 4 5 6 7 8 2 chunks +46 lines, -15 lines 0 comments Download
M src/mark-compact.cc View 1 2 3 4 5 6 4 chunks +76 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 5 chunks +40 lines, -4 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 1 chunk +13 lines, -5 lines 1 comment Download
M src/objects-inl.h View 1 2 3 4 5 6 7 3 chunks +24 lines, -0 lines 0 comments Download
M src/objects-visiting.h View 1 2 3 4 5 3 chunks +7 lines, -0 lines 0 comments Download
M src/objects-visiting.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M src/regexp.js View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M src/string.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Rico
9 years, 5 months ago (2011-06-30 12:05:45 UTC) #1
Rico
On 2011/06/30 12:05:45, Rico wrote: Added marking of the in object properties of the RegExp
9 years, 5 months ago (2011-06-30 13:34:48 UTC) #2
Erik Corry
LGTM http://codereview.chromium.org/7282026/diff/7018/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/7282026/diff/7018/src/arm/code-stubs-arm.cc#newcode4425 src/arm/code-stubs-arm.cc:4425: __ b(ne, &runtime); This b is superfluous http://codereview.chromium.org/7282026/diff/7018/src/ia32/code-stubs-ia32.cc ...
9 years, 5 months ago (2011-06-30 18:48:24 UTC) #3
Rico
All comments addressed, will check with Slava if we can skip the write barrier entirely. ...
9 years, 5 months ago (2011-07-01 05:58:09 UTC) #4
Rico
Please have another look. As discussed offline I changed the logic that puts the error ...
9 years, 5 months ago (2011-07-01 08:49:06 UTC) #5
Erik Corry
LGTM http://codereview.chromium.org/7282026/diff/14007/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/7282026/diff/14007/src/heap.cc#newcode1312 src/heap.cc:1312: There is an extra blank line here. http://codereview.chromium.org/7282026/diff/14007/src/jsregexp.cc ...
9 years, 5 months ago (2011-07-01 09:05:23 UTC) #6
Rico
Added better error message handling in jsregexp http://codereview.chromium.org/7282026/diff/14007/src/heap.cc File src/heap.cc (right): http://codereview.chromium.org/7282026/diff/14007/src/heap.cc#newcode1312 src/heap.cc:1312: On 2011/07/01 ...
9 years, 5 months ago (2011-07-01 09:38:26 UTC) #7
Erik Corry
9 years, 5 months ago (2011-07-01 10:26:38 UTC) #8
LGTM

http://codereview.chromium.org/7282026/diff/7047/src/objects-debug.cc
File src/objects-debug.cc (right):

http://codereview.chromium.org/7282026/diff/7047/src/objects-debug.cc#newcode479
src/objects-debug.cc:479: ASSERT(ascii_saved->IsSmi() ||
ascii_saved->IsJSObject() ||
Should be IsString!

Powered by Google App Engine
This is Rietveld 408576698