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

Issue 1780001: Clean JS function results cache on each major GC. (Closed)

Created:
10 years, 8 months ago by antonm
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Clean JS function results cache on each major GC. We don't want to retain cached objects for too long. Committed: http://code.google.com/p/v8/source/detail?r=4582

Patch Set 1 #

Total comments: 4

Patch Set 2 : Next round #

Total comments: 4

Patch Set 3 : Next round #

Total comments: 5

Patch Set 4 : Reoworking the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -7 lines) Patch
M src/bootstrapper.cc View 1 2 3 1 chunk +5 lines, -7 lines 0 comments Download
M src/heap.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 2 chunks +23 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 3 1 chunk +26 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 3 chunks +31 lines, -0 lines 0 comments Download
M test/cctest/test-threads.cc View 3 1 chunk +84 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
antonm
Lasse, may you have a look? And any ideas how to make guard in Heap::ClearJSFunction... ...
10 years, 8 months ago (2010-04-23 17:03:36 UTC) #1
Lasse Reichstein
http://codereview.chromium.org/1780001/diff/1/3 File src/heap.cc (right): http://codereview.chromium.org/1780001/diff/1/3#newcode548 src/heap.cc:548: if (context == NULL) return; Are Result-caches per-context yet? ...
10 years, 8 months ago (2010-04-26 10:04:55 UTC) #2
antonm
Lasse, may you have another look? http://codereview.chromium.org/1780001/diff/1/3 File src/heap.cc (right): http://codereview.chromium.org/1780001/diff/1/3#newcode548 src/heap.cc:548: if (context == ...
10 years, 8 months ago (2010-04-26 16:34:45 UTC) #3
Lasse Reichstein
LGTM. Consider adding a threaded test that repeatedly uses the cache from different threads, causes ...
10 years, 8 months ago (2010-04-29 07:14:18 UTC) #4
antonm
Lasse, I've added a test as you suggested. It's pretty weak---only checks if we don't ...
10 years, 7 months ago (2010-04-29 18:37:04 UTC) #5
Lasse Reichstein
LGTM. http://codereview.chromium.org/1780001/diff/6001/7004 File src/objects-inl.h (right): http://codereview.chromium.org/1780001/diff/6001/7004#newcode575 src/objects-inl.h:575: return ((self->length() - JSFunctionResultCache::kEntriesIndex) I wouldn't add it ...
10 years, 7 months ago (2010-05-04 13:40:39 UTC) #6
Lasse Reichstein
Still LGTM. http://codereview.chromium.org/1780001/diff/11001/12007 File test/cctest/test-threads.cc (right): http://codereview.chromium.org/1780001/diff/11001/12007#newcode65 test/cctest/test-threads.cc:65: first_section_->Lock(); I'm not sure how Mutex'es work. ...
10 years, 7 months ago (2010-05-04 13:50:35 UTC) #7
antonm
Thanks a lot for review, Lasse. http://codereview.chromium.org/1780001/diff/6001/7004 File src/objects-inl.h (right): http://codereview.chromium.org/1780001/diff/6001/7004#newcode575 src/objects-inl.h:575: return ((self->length() - ...
10 years, 7 months ago (2010-05-04 16:17:30 UTC) #8
Erik Corry
10 years, 7 months ago (2010-05-04 19:31:34 UTC) #9
New version of the threaded test LGTM.

You can't in general unlock a mutex from a different thread from the one it was
locked in.  That would defeat deadlock detection.  Semaphores don't have that
restriction and for the same reason you can't normally detect a semaphore
deadlock.   At least this is how I see it and Wikipedia seems to agree.

Powered by Google App Engine
This is Rietveld 408576698