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

Issue 850063002: Do not fire timers for finalizing objects. (Closed)

Created:
5 years, 11 months ago by sof
Modified:
5 years, 11 months ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Do not fire timers for finalizing objects. If a lazy sweep is in progress and a timer fires, do check that the underlying object is still alive before invoking its method. R=haraken BUG=448392 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188577

Patch Set 1 #

Total comments: 5

Patch Set 2 : Renamed predicate to isFinalizedObjectAlive() #

Patch Set 3 : Support non-Oilpan use #

Patch Set 4 : Mark pages as lazily swept #

Total comments: 1

Patch Set 5 : Handle mixins #

Patch Set 6 : Parameterize isFinalizedObjectAlive() over object type #

Patch Set 7 : export Heap::hasBeenLazilySwept() #

Total comments: 3

Patch Set 8 : blind Windows compilation fix #

Patch Set 9 : Reset sweep status on pages before sweeping instead #

Total comments: 29

Patch Set 10 : tweak some flag setting #

Patch Set 11 : Add some asserts, tweak logic #

Patch Set 12 : have objectPayloadSizeForTesting mark pages as swept also #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -18 lines) Patch
M Source/platform/Timer.h View 1 2 3 4 5 2 chunks +24 lines, -1 line 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +61 lines, -13 lines 1 comment Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +18 lines, -4 lines 0 comments Download

Messages

Total messages: 45 (3 generated)
sof
Please take a look.
5 years, 11 months ago (2015-01-14 13:55:48 UTC) #2
haraken
Thanks for looking into the crash! I understand the problem but I'm not sure if ...
5 years, 11 months ago (2015-01-14 14:29:08 UTC) #4
sof
https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp#newcode2133 Source/platform/heap/Heap.cpp:2133: return s_markingVisitor->isMarked(objectPointer); On 2015/01/14 14:29:08, haraken wrote: > > ...
5 years, 11 months ago (2015-01-14 14:36:19 UTC) #5
haraken
https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp#newcode2133 Source/platform/heap/Heap.cpp:2133: return s_markingVisitor->isMarked(objectPointer); On 2015/01/14 14:36:19, sof wrote: > On ...
5 years, 11 months ago (2015-01-14 14:37:44 UTC) #6
sof
https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp#newcode2133 Source/platform/heap/Heap.cpp:2133: return s_markingVisitor->isMarked(objectPointer); On 2015/01/14 14:37:44, haraken wrote: > On ...
5 years, 11 months ago (2015-01-14 15:53:33 UTC) #7
sof
https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/1/Source/platform/heap/Heap.cpp#newcode2133 Source/platform/heap/Heap.cpp:2133: return s_markingVisitor->isMarked(objectPointer); On 2015/01/14 15:53:32, sof wrote: > On ...
5 years, 11 months ago (2015-01-14 16:06:01 UTC) #8
sof
Hmm, seeing a bunch of tests time out with this protective measure of not invoking ...
5 years, 11 months ago (2015-01-14 17:12:32 UTC) #9
sof
Just to clarify the real issue here -- it isn't directly a problem to invoke ...
5 years, 11 months ago (2015-01-14 22:09:47 UTC) #10
haraken
On 2015/01/14 22:09:47, sof wrote: > Just to clarify the real issue here -- it ...
5 years, 11 months ago (2015-01-15 01:27:24 UTC) #11
haraken
On 2015/01/15 01:27:24, haraken wrote: > On 2015/01/14 22:09:47, sof wrote: > > Just to ...
5 years, 11 months ago (2015-01-15 03:51:21 UTC) #12
sof
On 2015/01/15 01:27:24, haraken wrote: > On 2015/01/14 22:09:47, sof wrote: > > Just to ...
5 years, 11 months ago (2015-01-15 06:16:19 UTC) #13
sof
On 2015/01/15 06:16:19, sof wrote: > On 2015/01/15 01:27:24, haraken wrote: > > On 2015/01/14 ...
5 years, 11 months ago (2015-01-15 11:01:45 UTC) #14
haraken
> Hmm, seeing a bunch of tests time out with this protective measure of not ...
5 years, 11 months ago (2015-01-15 15:42:26 UTC) #15
sof
On 2015/01/15 15:42:26, haraken wrote: > > Hmm, seeing a bunch of tests time out ...
5 years, 11 months ago (2015-01-15 15:47:31 UTC) #16
sof
On 2015/01/15 11:01:45, sof wrote: > On 2015/01/15 06:16:19, sof wrote: > > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 15:51:18 UTC) #17
haraken
On 2015/01/15 15:47:31, sof wrote: > On 2015/01/15 15:42:26, haraken wrote: > > > Hmm, ...
5 years, 11 months ago (2015-01-15 16:04:02 UTC) #18
sof
On 2015/01/15 16:04:02, haraken wrote: > On 2015/01/15 15:47:31, sof wrote: > > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 16:09:49 UTC) #19
haraken
On 2015/01/15 16:09:49, sof wrote: > On 2015/01/15 16:04:02, haraken wrote: > > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 16:30:27 UTC) #20
sof
On 2015/01/15 16:30:27, haraken wrote: > On 2015/01/15 16:09:49, sof wrote: > > On 2015/01/15 ...
5 years, 11 months ago (2015-01-15 16:44:23 UTC) #21
sof
The reasoning behind https://codereview.chromium.org/850063002/#msg7 is somewhat subtle, but I realized it was wrong/incomplete while going ...
5 years, 11 months ago (2015-01-15 23:02:32 UTC) #22
haraken
I'll take a detailed look after the remaining issues are fixed. I think this CL ...
5 years, 11 months ago (2015-01-16 00:57:10 UTC) #23
sof
On 2015/01/16 00:57:10, haraken wrote: > I'll take a detailed look after the remaining issues ...
5 years, 11 months ago (2015-01-16 09:04:45 UTC) #24
sof
On 2015/01/16 09:04:45, sof wrote: > On 2015/01/16 00:57:10, haraken wrote: > > I'll take ...
5 years, 11 months ago (2015-01-16 12:43:52 UTC) #25
haraken
Thanks for working on this. The approach looks good to me. https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): ...
5 years, 11 months ago (2015-01-16 13:40:01 UTC) #26
sof
https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp#newcode1266 Source/platform/heap/Heap.cpp:1266: return currentToken == (m_sweepStatus == 2); On 2015/01/16 13:40:01, ...
5 years, 11 months ago (2015-01-16 13:43:10 UTC) #27
haraken
https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp#newcode1266 Source/platform/heap/Heap.cpp:1266: return currentToken == (m_sweepStatus == 2); On 2015/01/16 13:43:10, ...
5 years, 11 months ago (2015-01-16 13:54:55 UTC) #28
sof
On 2015/01/16 13:54:55, haraken wrote: > https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp#newcode1266 > ...
5 years, 11 months ago (2015-01-16 14:07:19 UTC) #29
haraken
On 2015/01/16 14:07:19, sof wrote: > On 2015/01/16 13:54:55, haraken wrote: > > > https://codereview.chromium.org/850063002/diff/120001/Source/platform/heap/Heap.cpp ...
5 years, 11 months ago (2015-01-16 14:30:45 UTC) #30
haraken
On 2015/01/16 14:30:45, haraken wrote: > On 2015/01/16 14:07:19, sof wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 14:32:29 UTC) #31
sof
On 2015/01/16 14:30:45, haraken wrote: > On 2015/01/16 14:07:19, sof wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 14:34:21 UTC) #32
haraken
On 2015/01/16 14:34:21, sof wrote: > On 2015/01/16 14:30:45, haraken wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 14:42:16 UTC) #33
sof
On 2015/01/16 14:42:16, haraken wrote: > On 2015/01/16 14:34:21, sof wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 14:46:53 UTC) #34
sof
On 2015/01/16 14:46:53, sof wrote: > On 2015/01/16 14:42:16, haraken wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 14:50:58 UTC) #35
haraken
On 2015/01/16 14:50:58, sof wrote: > On 2015/01/16 14:46:53, sof wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 15:12:27 UTC) #36
sof
On 2015/01/16 15:12:27, haraken wrote: > On 2015/01/16 14:50:58, sof wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 15:17:40 UTC) #37
sof
On 2015/01/16 15:17:40, sof wrote: > On 2015/01/16 15:12:27, haraken wrote: > > On 2015/01/16 ...
5 years, 11 months ago (2015-01-16 15:59:24 UTC) #38
haraken
Mostly looks good to me. https://codereview.chromium.org/850063002/diff/160001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/160001/Source/platform/heap/Heap.cpp#newcode546 Source/platform/heap/Heap.cpp:546: markAsUnswept(); Isn't it guaranteed ...
5 years, 11 months ago (2015-01-16 17:29:50 UTC) #39
sof
https://codereview.chromium.org/850063002/diff/160001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/850063002/diff/160001/Source/platform/heap/Heap.cpp#newcode546 Source/platform/heap/Heap.cpp:546: markAsUnswept(); On 2015/01/16 17:29:49, haraken wrote: > > Isn't ...
5 years, 11 months ago (2015-01-16 19:30:17 UTC) #40
haraken
LGTM
5 years, 11 months ago (2015-01-17 08:24:28 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/850063002/210004
5 years, 11 months ago (2015-01-17 08:26:53 UTC) #43
commit-bot: I haz the power
Committed patchset #12 (id:210004) as https://src.chromium.org/viewvc/blink?view=rev&revision=188577
5 years, 11 months ago (2015-01-17 08:36:05 UTC) #44
haraken
5 years, 11 months ago (2015-01-19 05:35:49 UTC) #45
Message was sent while issue was closed.
https://codereview.chromium.org/850063002/diff/210004/Source/platform/heap/He...
File Source/platform/heap/Heap.h (right):

https://codereview.chromium.org/850063002/diff/210004/Source/platform/heap/He...
Source/platform/heap/Heap.h:862: //

A couple of suggestions to clean up the method and the comment:

- Rename isFinalizedObjectAlive to willBeSweptInLazySweeping. Flip true/false of
the return value. ("isFinalizedObjectAlive" is confusing because we're not
allowed to pass an already-finalized object.)

- Update the comment to:

// Returns true if the |objectPointer| is going to be swept in the on-going
// lazy sweeping. If no lazy sweeping is in progress, it returns true.
// If lazy sweeping is in progress, it returns true iff the |objectPointer|
// hasn't yet been swept and it's unmarked. You should not pass an
already-finalized
// object to |objectPointer|.

- Add an ASSERT to verify that |objectPointer| is not an already-finalized
object:

  ASSERT(!objectPointer->isFree());
  objectPointer->checkHeader();

Powered by Google App Engine
This is Rietveld 408576698