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

Issue 2321563006: Make GrResourceCache dynamically change between LRU and random replacement strategies. (Closed)

Created:
4 years, 3 months ago by bsalomon
Modified:
4 years, 2 months ago
Reviewers:
robertphillips
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Make GrResourceCache dynamically change between LRU and random replacement strategies. Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior. The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006 Committed: https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 10

Patch Set 3 : Address comments #

Patch Set 4 : work around gcc bug #

Patch Set 5 : rebase #

Patch Set 6 : fix merge error #

Patch Set 7 : Fix another merge error #

Patch Set 8 : fix recursive flusing, add asserts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -37 lines) Patch
M include/gpu/GrGpuResource.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/GrDrawingManager.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/gpu/GrDrawingManager.cpp View 1 2 3 4 2 chunks +12 lines, -2 lines 0 comments Download
M src/gpu/GrResourceCache.h View 1 2 3 4 5 6 7 8 chunks +54 lines, -16 lines 0 comments Download
M src/gpu/GrResourceCache.cpp View 1 2 3 4 5 6 7 11 chunks +103 lines, -19 lines 0 comments Download

Messages

Total messages: 24 (10 generated)
bsalomon
Before: 43/43 MB 1 49.1ms 53.3ms 53.1ms 57.6ms 4% ▅█▁▃▂▄▆▄▄▅ gpu image_cache_budget_dynamic_flip_flop 44/44 MB 1 ...
4 years, 3 months ago (2016-09-08 18:51:31 UTC) #2
bsalomon
When you have time, no rush.
4 years, 3 months ago (2016-09-08 18:51:58 UTC) #4
robertphillips
https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp File src/gpu/GrDrawingManager.cpp (right): https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp#newcode132 src/gpu/GrDrawingManager.cpp:132: // Avoid notifying the cache about redundant client flushes. ...
4 years, 3 months ago (2016-09-13 13:05:22 UTC) #5
bsalomon
https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp File src/gpu/GrDrawingManager.cpp (right): https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp#newcode132 src/gpu/GrDrawingManager.cpp:132: // Avoid notifying the cache about redundant client flushes. ...
4 years, 3 months ago (2016-09-13 13:31:33 UTC) #6
robertphillips
lgtm https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp File src/gpu/GrDrawingManager.cpp (right): https://codereview.chromium.org/2321563006/diff/20001/src/gpu/GrDrawingManager.cpp#newcode132 src/gpu/GrDrawingManager.cpp:132: // Avoid notifying the cache about redundant client ...
4 years, 3 months ago (2016-09-13 13:56:48 UTC) #7
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/2321563006/40001
4 years, 3 months ago (2016-09-13 14:15:53 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-GN-Trybot on master.client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-GN-Trybot/builds/1139) Build-Ubuntu-GCC-x86_64-Release-GN-Trybot on master.client.skia.compile (JOB_FAILED, ...
4 years, 3 months ago (2016-09-13 14:18:03 UTC) #11
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/2321563006/60001
4 years, 3 months ago (2016-09-13 14:53:40 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-GN-Trybot on master.client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-GN-Trybot/builds/1143)
4 years, 3 months ago (2016-09-13 15:03:18 UTC) #16
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/2321563006/140001
4 years, 2 months ago (2016-10-03 20:41:34 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7
4 years, 2 months ago (2016-10-03 21:07:03 UTC) #21
robertphillips
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/2386993004/ by robertphillips@google.com. ...
4 years, 2 months ago (2016-10-04 12:30:04 UTC) #22
robertphillips
On this Macs this is aborting with the call stack: msaa16 gm textblobmixedsizes Stack trace: ...
4 years, 2 months ago (2016-10-04 12:31:54 UTC) #23
robertphillips
4 years, 2 months ago (2016-10-04 12:33:13 UTC) #24
Message was sent while issue was closed.
On Windows this is failing on the assert:

c:\b\work\skia\include\gpu\grgpuresource.h:72: fatal error: "assert(fRefCnt >=
0)"

Caught exception 2147483651 EXCEPTION_BREAKPOINT, was running:
	nvprdit16 image gen_codec_gpu abnormal.wbmp
Likely culprit:
	nvprdit16 image gen_codec_gpu abnormal.wbmp

Powered by Google App Engine
This is Rietveld 408576698