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

Issue 996763002: Clean up SkDynamicAnnotations. (Closed)

Created:
5 years, 9 months ago by mtklein_C
Modified:
5 years, 9 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Clean up SkDynamicAnnotations. Unprotected reads -> relaxed reads. Unprotected write -> relaxed write. The only unprotected write we had was in SkTraceEvent, which it looks like we nabbed from Chrome at some point and changed only to silence TSAN. Chrome's version uses AtomicWord / NoBarrier_Load / NoBarrier_Store, which boils down to the same as here, intptr_t / relaxed load / relaxed store. This leaves one place where we're lying a bit to TSAN, in include/core/SkLazyPtr.h where we're doing a data-dependent consume load. We're telling TSAN it's consume, but telling any other compiler to compile it as relaxed, given how they all upgrade consume to acquire. This eliminates a barrier for us on ARM. How do you guys deal with this? Just use a consume memory order, take the hit, and hope compilers get smarter one day? BUG=chromium:465721 No public API changes. TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/172b45518a6a2c9c924cce124dcf27de88b03788

Patch Set 1 #

Patch Set 2 : remove SkThreadPriv.h too #

Total comments: 8

Patch Set 3 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -105 lines) Patch
M gyp/common_conditions.gypi View 1 2 1 chunk +1 line, -1 line 0 comments Download
D include/core/SkDynamicAnnotations.h View 1 chunk +0 lines, -59 lines 0 comments Download
M include/core/SkLazyPtr.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkOnce.h View 1 2 3 chunks +22 lines, -16 lines 0 comments Download
D include/core/SkThreadPriv.h View 1 1 chunk +0 lines, -14 lines 0 comments Download
M src/core/SkLazyFnPtr.h View 2 chunks +2 lines, -3 lines 0 comments Download
M src/core/SkTraceEvent.h View 2 chunks +4 lines, -11 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
mtklein_C
5 years, 9 months ago (2015-03-10 15:42:55 UTC) #2
Alexander Potapenko
https://codereview.chromium.org/996763002/diff/20001/include/core/SkOnce.h File include/core/SkOnce.h (right): https://codereview.chromium.org/996763002/diff/20001/include/core/SkOnce.h#newcode86 include/core/SkOnce.h:86: if (!*done) { For the sake of uniformity this ...
5 years, 9 months ago (2015-03-11 09:09:45 UTC) #3
Alexander Potapenko
Adding dvyukov@ for the consume_load question. Dima, WDYT about SkStaticLazyPtr implementation in https://code.google.com/p/chromium/codesearch#chromium/src/third_party/skia/include/core/SkLazyPtr.h&q=consume_load&sq=package:chromium&l=104 The guys ...
5 years, 9 months ago (2015-03-11 09:15:41 UTC) #4
Alexander Potapenko
On 2015/03/11 09:15:41, Alexander Potapenko wrote: > Adding dvyukov@ for the consume_load question. > > ...
5 years, 9 months ago (2015-03-11 09:25:45 UTC) #5
Alexander Potapenko
In an offline discussion Dima told me he's ok with the current implementation that provides ...
5 years, 9 months ago (2015-03-11 11:32:59 UTC) #6
mtklein
All done I think. https://codereview.chromium.org/996763002/diff/20001/include/core/SkOnce.h File include/core/SkOnce.h (right): https://codereview.chromium.org/996763002/diff/20001/include/core/SkOnce.h#newcode86 include/core/SkOnce.h:86: if (!*done) { On 2015/03/11 ...
5 years, 9 months ago (2015-03-11 15:31:21 UTC) #8
Alexander Potapenko
On 2015/03/11 15:31:21, mtklein wrote: > All done I think. > > https://codereview.chromium.org/996763002/diff/20001/include/core/SkOnce.h > File ...
5 years, 9 months ago (2015-03-12 07:03:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/996763002/40001
5 years, 9 months ago (2015-03-12 12:21:32 UTC) #11
commit-bot: I haz the power
5 years, 9 months ago (2015-03-12 12:27:53 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/172b45518a6a2c9c924cce124dcf27de88b03788

Powered by Google App Engine
This is Rietveld 408576698