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

Issue 2744363002: Clear shader disk cache after glProgramBinary failure. (Closed)

Created:
3 years, 9 months ago by ericrk
Modified:
3 years, 9 months ago
CC:
chromium-reviews, rjkroege, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, piman+watch_chromium.org, darin (slow to review), Fady Samuel
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear shader disk cache after glProgramBinary failure. Currently, when the GPU process crashes trying to load a GL program from our disk cache, we take no special action. This means we will very likely try to load this same cache entry again, causing another crash. This CL adds an "activity flags" object which is written by the GPU process and read by the GPU process host. This allows us to detect crashes while loading shaders and clear the cache in these instances. R=vmiura BUG=699122, 658784 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2744363002 Cr-Commit-Position: refs/heads/master@{#457869} Committed: https://chromium.googlesource.com/chromium/src/+/8c0b7bf620cb0ff2d74470b17800281e65405cdd

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix dcheck #

Patch Set 3 : Cache clear fixup #

Total comments: 1

Patch Set 4 : Fix dependency issues. #

Total comments: 6

Patch Set 5 : rebase #

Patch Set 6 : Remove singleton and clean up init #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -38 lines) Patch
M content/browser/gpu/gpu_process_host.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 2 chunks +17 lines, -3 lines 0 comments Download
M content/gpu/gpu_child_thread.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 2 3 4 5 3 chunks +7 lines, -4 lines 0 comments Download
M gpu/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/BUILD.gn View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/DEPS View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/activity_flags.h View 1 2 3 4 5 1 chunk +81 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/activity_flags.cc View 1 2 3 4 5 1 chunk +75 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/activity_flags_unittest.cc View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/memory_program_cache.h View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M gpu/command_buffer/service/memory_program_cache.cc View 1 2 3 4 5 3 chunks +13 lines, -7 lines 0 comments Download
M gpu/command_buffer/service/memory_program_cache_unittest.cc View 1 2 3 4 5 4 chunks +8 lines, -4 lines 0 comments Download
M gpu/ipc/host/shader_disk_cache.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/ipc/host/shader_disk_cache.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/ipc/in_process_command_buffer.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/ipc/in_process_command_buffer.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M gpu/ipc/service/gpu_channel_manager.h View 1 2 3 4 5 3 chunks +7 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_channel_manager.cc View 1 2 3 4 5 3 chunks +6 lines, -4 lines 0 comments Download
M gpu/ipc/service/gpu_channel_test_common.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M services/ui/gpu/gpu_main.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M services/ui/gpu/gpu_main.cc View 1 2 3 4 5 3 chunks +10 lines, -4 lines 0 comments Download
M services/ui/gpu/gpu_service.h View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M services/ui/gpu/gpu_service.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M services/ui/gpu/interfaces/gpu_main.mojom View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M services/ui/ws/gpu_host.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 47 (29 generated)
ericrk
Victor, how does something like this look to you (for handling the GPU proc crash ...
3 years, 9 months ago (2017-03-13 19:06:33 UTC) #1
vmiura
This looks good. Was there more you had in mind to add? https://codereview.chromium.org/2744363002/diff/1/gpu/ipc/common/activity_flags.cc File gpu/ipc/common/activity_flags.cc ...
3 years, 9 months ago (2017-03-13 20:18:36 UTC) #2
ericrk
https://codereview.chromium.org/2744363002/diff/1/gpu/ipc/common/activity_flags.cc File gpu/ipc/common/activity_flags.cc (right): https://codereview.chromium.org/2744363002/diff/1/gpu/ipc/common/activity_flags.cc#newcode66 gpu/ipc/common/activity_flags.cc:66: DCHECK_NE(old_value, new_value); On 2017/03/13 20:18:36, vmiura wrote: > This ...
3 years, 9 months ago (2017-03-13 20:30:45 UTC) #4
ericrk
On 2017/03/13 20:18:36, vmiura wrote: > This looks good. Was there more you had in ...
3 years, 9 months ago (2017-03-13 20:31:17 UTC) #5
vmiura
Cool. LGTM.
3 years, 9 months ago (2017-03-13 20:53:27 UTC) #6
ericrk
3 years, 9 months ago (2017-03-13 22:49:11 UTC) #8
jbauman
lgtm
3 years, 9 months ago (2017-03-15 00:29:05 UTC) #9
ericrk
+tsepez for IPC owners +fsamuel for services/ui owners https://codereview.chromium.org/2744363002/diff/60001/services/ui/ws/gpu_host.cc File services/ui/ws/gpu_host.cc (right): https://codereview.chromium.org/2744363002/diff/60001/services/ui/ws/gpu_host.cc#newcode116 services/ui/ws/gpu_host.cc:116: preferences, ...
3 years, 9 months ago (2017-03-15 00:47:54 UTC) #11
Tom Sepez
mojom LGTM
3 years, 9 months ago (2017-03-15 17:37:12 UTC) #16
Fady Samuel
Sadrul wrote more of this code than I did. Adding him and moving myself to ...
3 years, 9 months ago (2017-03-15 20:28:04 UTC) #24
Fady Samuel
Oops, adding sadrul@ for real.
3 years, 9 months ago (2017-03-15 20:28:54 UTC) #26
ericrk
+sky for the new dependency on mojo/public/cpp/system/buffer.h (from gpu/command_buffer/common/activity_flags.h) Let me know if this dependency ...
3 years, 9 months ago (2017-03-15 21:03:07 UTC) #28
sky
LGTM
3 years, 9 months ago (2017-03-15 23:14:05 UTC) #31
sadrul
https://codereview.chromium.org/2744363002/diff/100001/gpu/command_buffer/common/activity_flags.h File gpu/command_buffer/common/activity_flags.h (right): https://codereview.chromium.org/2744363002/diff/100001/gpu/command_buffer/common/activity_flags.h#newcode50 gpu/command_buffer/common/activity_flags.h:50: static GpuProcessActivityFlags* GetInstance(); Please consider not making it a ...
3 years, 9 months ago (2017-03-16 04:40:32 UTC) #32
ericrk
Sadrul@, thanks for the feedback! I've removed the singleton and tried to clean up init ...
3 years, 9 months ago (2017-03-16 21:25:23 UTC) #36
sadrul
Thank you! lgtm
3 years, 9 months ago (2017-03-16 23:26:08 UTC) #41
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/2744363002/200001
3 years, 9 months ago (2017-03-17 19:58:51 UTC) #44
commit-bot: I haz the power
3 years, 9 months ago (2017-03-17 20:08:14 UTC) #47
Message was sent while issue was closed.
Committed patchset #6 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/8c0b7bf620cb0ff2d74470b17800...

Powered by Google App Engine
This is Rietveld 408576698