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

Issue 2232433002: Use SkNVRefCnt for a couple common types. (Closed)

Created:
4 years, 4 months ago by mtklein_C
Modified:
4 years, 4 months ago
Reviewers:
Joel.Liang, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Use SkNVRefCnt for a couple common types. These types are ref-counted, but don't otherwise need a vtable. This makes them good candidates for SkNVRefCnt. Destruction can be a little more direct, and if nothing else, sizeof(T) will get a little smaller by dropping the vptr. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2232433002 Committed: https://skia.googlesource.com/skia/+/b47cd4b3d6daad037651daa20fae6770285966d6

Patch Set 1 #

Patch Set 2 : path-ref too #

Patch Set 3 : data too #

Patch Set 4 : debug cleanup #

Total comments: 1

Patch Set 5 : final #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M include/core/SkData.h View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M include/core/SkPathRef.h View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M include/core/SkTextBlob.h View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M src/core/SkPathRef.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 37 (20 generated)
mtklein_C
4 years, 4 months ago (2016-08-09 18:15:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2232433002/60001
4 years, 4 months ago (2016-08-09 18:15:29 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on master.client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/12337)
4 years, 4 months ago (2016-08-09 18:16:54 UTC) #17
reed1
generalize question: changing to NVRefCnt.. does that always allow us to also mark the class ...
4 years, 4 months ago (2016-08-09 18:36:59 UTC) #18
mtklein
On 2016/08/09 18:36:59, reed1 wrote: > generalize question: changing to NVRefCnt.. does that always allow ...
4 years, 4 months ago (2016-08-09 18:39:14 UTC) #19
reed1
On 2016/08/09 18:39:14, mtklein wrote: > On 2016/08/09 18:36:59, reed1 wrote: > > generalize question: ...
4 years, 4 months ago (2016-08-09 18:40:11 UTC) #20
mtklein
On 2016/08/09 18:40:11, reed1 wrote: > On 2016/08/09 18:39:14, mtklein wrote: > > On 2016/08/09 ...
4 years, 4 months ago (2016-08-09 18:53:28 UTC) #21
reed1
lgtm
4 years, 4 months ago (2016-08-09 19:07:30 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2232433002/80001
4 years, 4 months ago (2016-08-09 19:18:41 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://skia.googlesource.com/skia/+/b47cd4b3d6daad037651daa20fae6770285966d6
4 years, 4 months ago (2016-08-09 19:20:09 UTC) #30
Joel.Liang
On 2016/08/09 19:20:09, commit-bot: I haz the power wrote: > Committed patchset #5 (id:80001) as ...
4 years, 4 months ago (2016-08-16 06:18:02 UTC) #31
mtklein
On 2016/08/16 06:18:02, Joel.Liang wrote: > On 2016/08/09 19:20:09, commit-bot: I haz the power wrote: ...
4 years, 4 months ago (2016-08-16 12:30:26 UTC) #32
Joel.Liang
On 2016/08/16 12:30:26, mtklein wrote: > On 2016/08/16 06:18:02, Joel.Liang wrote: > > On 2016/08/09 ...
4 years, 4 months ago (2016-08-16 15:48:18 UTC) #33
mtklein
On 2016/08/16 15:48:18, Joel.Liang wrote: > On 2016/08/16 12:30:26, mtklein wrote: > > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 15:50:33 UTC) #34
Joel.Liang
On 2016/08/16 15:50:33, mtklein wrote: > On 2016/08/16 15:48:18, Joel.Liang wrote: > > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 15:58:11 UTC) #35
mtklein
On 2016/08/16 15:58:11, Joel.Liang wrote: > On 2016/08/16 15:50:33, mtklein wrote: > > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 16:02:18 UTC) #36
mtklein
4 years, 4 months ago (2016-08-16 16:03:25 UTC) #37
Message was sent while issue was closed.
On 2016/08/16 16:02:18, mtklein wrote:
> On 2016/08/16 15:58:11, Joel.Liang wrote:
> > On 2016/08/16 15:50:33, mtklein wrote:
> > > On 2016/08/16 15:48:18, Joel.Liang wrote:
> > > > On 2016/08/16 12:30:26, mtklein wrote:
> > > > > On 2016/08/16 06:18:02, Joel.Liang wrote:
> > > > > > On 2016/08/09 19:20:09, commit-bot: I haz the power wrote:
> > > > > > > Committed patchset #5 (id:80001) as
> > > > > > >
> > > > >
> > >
> https://skia.googlesource.com/skia/+/b47cd4b3d6daad037651daa20fae6770285966d6
> > > > > > 
> > > > > > This CL will cause "Bus error\n EXIT_CODE is 135" on Android
devices.
> > > > > > You can run gm tests to reproduce this issue.
> > > > > > ./platform_tools/android/bin/android_run_skia dm --config gpu
> > > --resourcePath
> > > > > > /sdcard/skia_resources
> > > > > > 
> > > > > > I have tested on Huawei Mate 8, Samsung Note 10.1 and Samsung Galaxy
> S5.
> > > > > 
> > > > > I don't think we've seen that.  Can you post a stack trace?
> > > > 
> > > > 6.31m elapsed, 2 active, 81 queued, 48MB RAM, 1433MB peak
> > > > 	unit test  PathMeasure
> > > > 	unit test  SkSharedMutexMultiThreaded
> > > > [New Thread 32072.32102]
> > > > [New Thread 32072.32116]
> > > > [New Thread 32072.32117]
> > > > [New Thread 32072.32118]
> > > > [New Thread 32072.32119]
> > > > [New Thread 32072.32120]
> > > > [New Thread 32072.32121]
> > > > [New Thread 32072.32122]
> > > > [New Thread 32072.32126]
> > > > 
> > > > Thread 2 "skia_launcher" received signal SIGBUS, Bus error.
> > > > [Switching to Thread 32072.32102]
> > > > compress_r11eac_blocks () at
> > > ../../../../src/opts/SkTextureCompressor_opts.h:208
> > > > 208	        vst1q_u64(dst1, d1);
> > > > (gdb) bt
> > > > #0  compress_r11eac_blocks () at
> > > > ../../../../src/opts/SkTextureCompressor_opts.h:208
> > > > #1  compress_a8_r11eac () at
> > > ../../../../src/opts/SkTextureCompressor_opts.h:231
> > > > #2  0xb60629a4 in CompressBufferToFormat () at
> > > > ../../../../src/utils/SkTextureCompressor.cpp:125
> > > > #3  CompressBitmapToFormat () at
> > > > ../../../../src/utils/SkTextureCompressor.cpp:157
> > > > #4  0xb5312038 in test_CompressCheckerboard () at
> > > > ../../../../tests/TextureCompressionTest.cpp:157
> > > > #5  0xb512fb62 in run_test () at ../../../../dm/DM.cpp:1248
> > > > #6  0xb5f853c6 in operator() ()
> > > >     at
> > > >
> > >
> >
>
/home/joel/dev/skia/android_repo/platform_tools/android/bin/../toolchains/arm-r12b-14/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../include/c++/4.9.x/functional:2439
> > > > #7  Loop () at ../../../../src/core/SkTaskGroup.cpp:167
> > > > #8  0xb6069f16 in thread_start () at
> > > > ../../../../src/utils/SkThreadUtils_pthread.cpp:66
> > > > #9  0xb6f67668 in __pthread_start(void*) ()
> > > >    from
> > > >
> > >
> >
>
/home/joel/dev/skia/android_repo/out/config/android-arm_v7_neon/android_gdb_tmp/libc.so
> > > > #10 0xb6f65684 in __start_thread ()
> > > >    from
> > > >
> > >
> >
>
/home/joel/dev/skia/android_repo/out/config/android-arm_v7_neon/android_gdb_tmp/libc.so
> > > > #11 0x00000000 in ?? ()
> > > > Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
> > > > (gdb)
> > > 
> > > And reverting this change fixes that?
> > > What's the connection between this change and the alignment of that store?
> > > I don't see anything refcounted in SkTextureCompressor_opts.h.
> > 
> > Yes, reverting this change can fix this issue.
> > I haven't done any investigation on this yet. Just confirmed by revert,
build
> > and run test.
> > Have you manage to reproduce this issue?
> 
> No, I have not yet tried.

This is tracked here: https://bugs.chromium.org/p/skia/issues/detail?id=5637

Powered by Google App Engine
This is Rietveld 408576698