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

Issue 16042013: [oilpan] Resurrect a loop-back persistent handle in RefCountedHeapAllocated (Closed)

Created:
7 years, 6 months ago by haraken
Modified:
7 years, 6 months ago
CC:
blink-reviews, adamk+oilpan_chromium.org, Mads Ager (chromium), abarth-chromium
Visibility:
Public.

Description

[oilpan] Resurrect a loop-back persistent handle in RefCountedHeapAllocated We have to resurrect a loop-back persistent handle (RefCountedHeapAllocated::m_keepAlive) when a reference count goes up from 0 to 1. This can happen in the following scenario: (1) The reference count becomes 0, but Handles keep references to the object. (2) The Handle is assigned to a RefPtr. The reference count becomes 1. R=ager@chromium.org, ager@google.com Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151398

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -26 lines) Patch
M Source/core/css/StyleRule.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/heap/Heap.h View 1 3 1 chunk +18 lines, -1 line 2 comments Download
M Source/heap/tests/HeapTest.cpp View 1 2 3 chunks +57 lines, -0 lines 0 comments Download
M Source/wtf/RefCounted.h View 1 2 6 chunks +39 lines, -22 lines 0 comments Download
M Source/wtf/SizeLimits.cpp View 1 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
haraken
r?
7 years, 6 months ago (2013-05-29 12:19:23 UTC) #1
Mads Ager (chromium)
The code looks good. Would be cool to have a test in Source/heap/tests/HeapTest.cpp. https://codereview.chromium.org/16042013/diff/1/Source/wtf/RefCounted.h File ...
7 years, 6 months ago (2013-05-29 12:31:06 UTC) #2
haraken
Added a test. r? https://codereview.chromium.org/16042013/diff/1/Source/wtf/RefCounted.h File Source/wtf/RefCounted.h (right): https://codereview.chromium.org/16042013/diff/1/Source/wtf/RefCounted.h#newcode124 Source/wtf/RefCounted.h:124: #if CHECK_REF_COUNTED_LIFECYCLE Disabled the check ...
7 years, 6 months ago (2013-05-29 13:37:05 UTC) #3
Mads Ager (google)
LGTM https://codereview.chromium.org/16042013/diff/5001/Source/heap/tests/HeapTest.cpp File Source/heap/tests/HeapTest.cpp (right): https://codereview.chromium.org/16042013/diff/5001/Source/heap/tests/HeapTest.cpp#newcode397 Source/heap/tests/HeapTest.cpp:397: // Only handle1 and handle2 keep references to ...
7 years, 6 months ago (2013-05-29 13:47:54 UTC) #4
haraken
https://codereview.chromium.org/16042013/diff/5001/Source/heap/tests/HeapTest.cpp File Source/heap/tests/HeapTest.cpp (right): https://codereview.chromium.org/16042013/diff/5001/Source/heap/tests/HeapTest.cpp#newcode402 Source/heap/tests/HeapTest.cpp:402: handle1 = Handle<RefCountedAndHeapAllocated>(object1.get()); On 2013/05/29 13:47:54, Mads Ager (google) ...
7 years, 6 months ago (2013-05-29 14:52:16 UTC) #5
haraken
https://codereview.chromium.org/16042013/diff/8001/Source/wtf/RefCounted.h File Source/wtf/RefCounted.h (right): https://codereview.chromium.org/16042013/diff/8001/Source/wtf/RefCounted.h#newcode158 Source/wtf/RefCounted.h:158: --m_refCount; This is critical :)
7 years, 6 months ago (2013-05-29 14:53:45 UTC) #6
Mads Ager (chromium)
LGTM https://codereview.chromium.org/16042013/diff/8001/Source/heap/Heap.h File Source/heap/Heap.h (right): https://codereview.chromium.org/16042013/diff/8001/Source/heap/Heap.h#newcode37 Source/heap/Heap.h:37: #include <stdio.h> Remove. https://codereview.chromium.org/16042013/diff/8001/Source/wtf/RefCounted.h File Source/wtf/RefCounted.h (right): https://codereview.chromium.org/16042013/diff/8001/Source/wtf/RefCounted.h#newcode158 ...
7 years, 6 months ago (2013-05-29 16:46:38 UTC) #7
haraken
Thanks for reviewing! https://codereview.chromium.org/16042013/diff/8001/Source/heap/Heap.h File Source/heap/Heap.h (right): https://codereview.chromium.org/16042013/diff/8001/Source/heap/Heap.h#newcode37 Source/heap/Heap.h:37: #include <stdio.h> On 2013/05/29 16:46:38, Mads ...
7 years, 6 months ago (2013-05-29 16:49:02 UTC) #8
haraken
Committed patchset #4 manually as r151398 (presubmit successful).
7 years, 6 months ago (2013-05-29 16:49:50 UTC) #9
abarth-chromium
https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h File Source/heap/Heap.h (right): https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h#newcode447 Source/heap/Heap.h:447: if (UNLIKELY(!RefCounted<T>::refCount())) { This is likely to be a ...
7 years, 6 months ago (2013-05-29 20:39:37 UTC) #10
haraken
https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h File Source/heap/Heap.h (right): https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h#newcode447 Source/heap/Heap.h:447: if (UNLIKELY(!RefCounted<T>::refCount())) { On 2013/05/29 20:39:38, abarth wrote: > ...
7 years, 6 months ago (2013-05-30 04:50:52 UTC) #11
Mads Ager (google)
7 years, 6 months ago (2013-05-30 05:55:00 UTC) #12
Message was sent while issue was closed.
On 2013/05/30 04:50:52, haraken wrote:
> https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h
> File Source/heap/Heap.h (right):
> 
>
https://codereview.chromium.org/16042013/diff/14001/Source/heap/Heap.h#newcod...
> Source/heap/Heap.h:447: if (UNLIKELY(!RefCounted<T>::refCount())) {
> On 2013/05/29 20:39:38, abarth wrote:
> > This is likely to be a noticeable perf hit on some classes.  (Obviously not
an
> > issue if we use this class only for a short period of time.)
> 
> Yes, but I guess we will face a bunch of other performance problems when
> migrating RefCounted objects to the handle system. I'll study them when
> migrating CSSValue hierarchies to the managed heap.

The plan is to get the node hierarchy and the css hierarchy moved to the managed
heap and get rid of ref counting for them completely. At that point, none of
those hierarchies will use RefCountedHeapAllocated anymore and we can start
measuring performance. We know that we are adding overhead right now and
RefCountedHeapAllocated is only there as a transition thing. Measuring
performance at this point makes little sense since we are still doing all the
reference counting and have added the handles in addition. We need reference
counting gone before measuring performance makes sense. :)

Powered by Google App Engine
This is Rietveld 408576698