|
|
Created:
6 years, 10 months ago by kouhei (in TOK) Modified:
6 years, 9 months ago CC:
blink-reviews Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionOilpan: mark ThreadAffinity as MainThreadOnly for Node or CSSValue inheriting classes.
BUG=None
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168257
Patch Set 1 #
Total comments: 2
Patch Set 2 : remove DerivesNodeOrCSSValue #Patch Set 3 : reverse #Patch Set 4 : rebased #
Total comments: 1
Patch Set 5 : fix #Patch Set 6 : rebase #Messages
Total messages: 34 (0 generated)
Proof-of-concept patch. haraken: wdyt?
+oilpan-reviews@ Looks good but Mads should take a look. https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h File Source/heap/ThreadState.h (right): https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h#ne... Source/heap/ThreadState.h:96: struct DefaultThreadingTrait<T, false> { Would you add a comment to mention that only Node and CSSValue use MainThreadOnly?
dbc https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h File Source/heap/ThreadState.h (right): https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h#ne... Source/heap/ThreadState.h:93: template<typename T, bool derivesNodeOrCSSValue = DerivesNodeOrCSSValue<T>::value > class DefaultThreadingTrait; I think this can use: derivesNodeOrCSSValue = IsSubclass<T, Node>::value || IsSubClass<T, CSSValue>::value and then eliminate the DerivesNodeOrCSSValue template.
On 2014/02/21 07:04:53, zerny-chromium wrote: > dbc > > https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h > File Source/heap/ThreadState.h (right): > > https://codereview.chromium.org/171743004/diff/1/Source/heap/ThreadState.h#ne... > Source/heap/ThreadState.h:93: template<typename T, bool derivesNodeOrCSSValue = > DerivesNodeOrCSSValue<T>::value > class DefaultThreadingTrait; > I think this can use: > > derivesNodeOrCSSValue = IsSubclass<T, Node>::value || IsSubClass<T, > CSSValue>::value > > and then eliminate the DerivesNodeOrCSSValue template. Good point!
This change is the opposite of what I would expect. We should make CSSValue and Node have default MainThreadOnly affinity because they are performance critical. For everything else, we should use AnyThread affinity by default. Then we need to explicitly make Document and other Nodes have default AnyThread affinity. Are you sure this works? There are a lot of things in the list that are now MainThreadOnly affinity with this change but are used from multiple threads?
Hopefully Erik will have numbers from his mac today. Let's hope that we can go for AnyThread affinity for anything without regressing...
The USED_FROM_MULTIPLE_THREAD macros have been causing real issues, so at the moment I'd propose to land this CL until we can conclude that we can remove the macros completely. LGTM once the following Mads' comment is addressed: > This change is the opposite of what I would expect. We should make CSSValue and > Node have default MainThreadOnly affinity because they are performance critical. > For everything else, we should use AnyThread affinity by default. Then we need > to explicitly make Document and other Nodes have default AnyThread affinity.
On 2014/02/27 00:44:47, haraken wrote: > The USED_FROM_MULTIPLE_THREAD macros have been causing real issues, so at the > moment I'd propose to land this CL until we can conclude that we can remove the > macros completely. > > LGTM once the following Mads' comment is addressed: > > > This change is the opposite of what I would expect. We should make CSSValue > and > > Node have default MainThreadOnly affinity because they are performance > critical. > > For everything else, we should use AnyThread affinity by default. Then we need > > to explicitly make Document and other Nodes have default AnyThread affinity. done.
LGTM
The CQ bit was checked by kouhei@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/171743004/130001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on mac_blink_rel for step(s) blink_heap_unittests, blink_platform_unittests, webkit_lint, webkit_python_tests, webkit_tests, webkit_unit_tests, wtf_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_blink_...
FYI, the build is failing due to a class/struct mismatch. https://codereview.chromium.org/171743004/diff/130001/Source/heap/ThreadState.h File Source/heap/ThreadState.h (right): https://codereview.chromium.org/171743004/diff/130001/Source/heap/ThreadState... Source/heap/ThreadState.h:77: template<typename T, bool derivesNodeOrCSSValue = WTF::IsSubclass<T, Node>::value || WTF::IsSubclass<T, CSSValue>::value > class DefaultThreadingTrait; Error: class/struct mismatch.
On 2014/02/27 11:05:45, zerny-chromium wrote: > FYI, the build is failing due to a class/struct mismatch. > > https://codereview.chromium.org/171743004/diff/130001/Source/heap/ThreadState.h > File Source/heap/ThreadState.h (right): > > https://codereview.chromium.org/171743004/diff/130001/Source/heap/ThreadState... > Source/heap/ThreadState.h:77: template<typename T, bool derivesNodeOrCSSValue = > WTF::IsSubclass<T, Node>::value || WTF::IsSubclass<T, CSSValue>::value > class > DefaultThreadingTrait; > Error: class/struct mismatch. Good point. kouhei@: Would you fix that and land this CL? This is blocking a couple of CLs. Thanks!
kouhei@ is ooo, so I'll take over the CL. Since I cannot upload a CL to this issue (because this issue is owned by kouhei@), so I uploaded a new CL here: https://codereview.chromium.org/182733003/
The CQ bit was checked by kouhei@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/171743004/150001
On 2014/02/28 01:25:38, haraken wrote: > kouhei@ is ooo, so I'll take over the CL. > > Since I cannot upload a CL to this issue (because this issue is owned by > kouhei@), so I uploaded a new CL here: > https://codereview.chromium.org/182733003/ Uploaded the fix. checking cq
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on win_blink_rel for step(s) webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_...
The CQ bit was checked by kouhei@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/171743004/150001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on win_blink_rel for step(s) webkit_tests, webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_...
The CQ bit was checked by haraken@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/171743004/150001
The CQ bit was unchecked by haraken@chromium.org
I hit a lot of issues about threading affinity when moving core/animations/ to the heap, so I'll wait for this CL landed before working on core/animations :)
On 2014/02/28 07:50:01, haraken wrote: > I hit a lot of issues about threading affinity when moving core/animations/ to > the heap, so I'll wait for this CL landed before working on core/animations :) Got it. Can you flip the CQ bit once that is resolved?
On 2014/02/28 07:53:12, kouhei wrote: > On 2014/02/28 07:50:01, haraken wrote: > > I hit a lot of issues about threading affinity when moving core/animations/ to > > the heap, so I'll wait for this CL landed before working on core/animations :) > > Got it. Can you flip the CQ bit once that is resolved? Sorry for not being clear. I think we now have two compile errors: - The first one will be fixed by https://codereview.chromium.org/182733004/. However, the tree is almost closed today and thus we haven't yet landed the fix. - The second one is the one you observe in win try bots in this CL. This failure is different from the first one. - After landing the two CLs (i.e., https://codereview.chromium.org/182733004/ and this CL), we can restart working on core/animations/, mediastream/ etc.
The CQ bit was checked by kouhei@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/171743004/170001
Message was sent while issue was closed.
Change committed as 168257 |