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

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed)

Created:
5 years, 8 months ago by no sievers
Modified:
5 years, 7 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, extensions-reviews_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, chromium-apps-reviews_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, asvitkine+watch_chromium.org, kalyank, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org, bajones, Zhenyao Mo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gpu: Fix some context lost marking glitches+leaks and add UMA stats * This fixes some glitches in the decoder where we were not ending up with the correct 'context lost' reason, such as calling things in the wrong order or calling glGetGraphicsResetStatus() while we might not have the correct context current. * Add context lost reasons for when the context group is forcibly lost when GL_OUT_OF_MEMORY is detected and when MakeCurrent fails. * Also communicate parse errors to the client. * Record UMA histograms for each context type (for example 'browser compositor') with the context lost reason. * Always lose (client-side) share-group if we force-lose a context so we don't leak resources. * Fix a bug where we weren't deleting GL resources if the context was lost although we might still be able to make it current. Add a bunch of tests. BUG=475676 Committed: https://crrev.com/fbaa5dc2fcb2e482c1daec1b9bcf1d577d53ca30 Cr-Commit-Position: refs/heads/master@{#327197}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 9

Patch Set 3 : rebase #

Patch Set 4 : address comments #

Total comments: 5

Patch Set 5 : histogram grouping #

Patch Set 6 : histogram descriptions #

Total comments: 4

Patch Set 7 : histogram fixes #

Total comments: 5

Patch Set 8 : histogram nits, add gpu crash context lost enum #

Patch Set 9 : fix Android build #

Patch Set 10 : fix GLManager and fix another resource leak (comment #15) #

Total comments: 7

Patch Set 11 : rebase #

Patch Set 12 : kbr's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+784 lines, -165 lines) Patch
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_device_client.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
A content/common/gpu/client/command_buffer_metrics.h View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
A content/common/gpu/client/command_buffer_metrics.cc View 1 2 3 4 5 6 7 1 chunk +153 lines, -0 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.h View 3 chunks +4 lines, -3 lines 0 comments Download
M content/common/gpu/client/command_buffer_proxy_impl.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -8 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.h View 4 chunks +4 lines, -2 lines 0 comments Download
M content/common/gpu/client/context_provider_command_buffer.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h View 4 chunks +6 lines, -1 line 0 comments Download
M content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc View 1 2 3 4 5 6 7 8 chunks +18 lines, -6 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -5 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 2 chunks +4 lines, -2 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_video_encoder_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/constants.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/context_group.h View 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/context_group.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A gpu/command_buffer/service/gl_context_mock.h View 1 chunk +25 lines, -0 lines 0 comments Download
A + gpu/command_buffer/service/gl_context_mock.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.h View 1 chunk +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +109 lines, -66 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_mock.h View 1 chunk +3 lines, -3 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 2 chunks +18 lines, -5 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h View 4 chunks +6 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 2 chunks +7 lines, -2 lines 0 comments Download
A gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +273 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc View 1 chunk +0 lines, -29 lines 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M gpu/gpu.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 3 chunks +43 lines, -0 lines 0 comments Download
M ui/gl/gl_context_stub_with_extensions.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_context_stub_with_extensions.cc View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (4 generated)
no sievers
ptal. It would be nice if we could also query the reset status for the ...
5 years, 8 months ago (2015-04-18 00:34:34 UTC) #2
piman
I'm super supportive of this. 2 things though. https://codereview.chromium.org/1095893002/diff/20001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1095893002/diff/20001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode3345 gpu/command_buffer/service/gles2_cmd_decoder.cc:3345: if ...
5 years, 8 months ago (2015-04-18 01:03:18 UTC) #3
Ken Russell (switch to Gerrit)
Thanks for working to clean up this code. Your new tests are great. We should ...
5 years, 8 months ago (2015-04-24 02:39:41 UTC) #4
no sievers
https://codereview.chromium.org/1095893002/diff/20001/content/common/gpu/client/command_buffer_metrics.h File content/common/gpu/client/command_buffer_metrics.h (right): https://codereview.chromium.org/1095893002/diff/20001/content/common/gpu/client/command_buffer_metrics.h#newcode26 content/common/gpu/client/command_buffer_metrics.h:26: // Add new values above this point. On 2015/04/24 ...
5 years, 8 months ago (2015-04-24 18:52:47 UTC) #5
no sievers
+asvitkine@chromium.org for histograms.xml +nasko@chromium.org for gpu_messages.h
5 years, 8 months ago (2015-04-24 19:04:42 UTC) #7
Alexei Svitkine (slow)
https://codereview.chromium.org/1095893002/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1095893002/diff/60001/tools/metrics/histograms/histograms.xml#newcode11440 tools/metrics/histograms/histograms.xml:11440: + <summary>The reason a GPU command buffer context was ...
5 years, 8 months ago (2015-04-24 19:13:21 UTC) #8
no sievers
https://codereview.chromium.org/1095893002/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1095893002/diff/60001/tools/metrics/histograms/histograms.xml#newcode11440 tools/metrics/histograms/histograms.xml:11440: + <summary>The reason a GPU command buffer context was ...
5 years, 8 months ago (2015-04-24 19:26:25 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/1095893002/diff/100001/content/common/gpu/client/command_buffer_metrics.cc File content/common/gpu/client/command_buffer_metrics.cc (right): https://codereview.chromium.org/1095893002/diff/100001/content/common/gpu/client/command_buffer_metrics.cc#newcode124 content/common/gpu/client/command_buffer_metrics.cc:124: CONTEXT_LOST_REASON_MAX_ENUM); Unfortunately this won't work. The UMA histogram macro ...
5 years, 8 months ago (2015-04-24 19:31:58 UTC) #10
no sievers
https://codereview.chromium.org/1095893002/diff/100001/content/common/gpu/client/command_buffer_metrics.cc File content/common/gpu/client/command_buffer_metrics.cc (right): https://codereview.chromium.org/1095893002/diff/100001/content/common/gpu/client/command_buffer_metrics.cc#newcode124 content/common/gpu/client/command_buffer_metrics.cc:124: CONTEXT_LOST_REASON_MAX_ENUM); On 2015/04/24 19:31:58, Alexei Svitkine wrote: > Unfortunately ...
5 years, 8 months ago (2015-04-24 19:56:43 UTC) #11
Alexei Svitkine (slow)
https://codereview.chromium.org/1095893002/diff/120001/content/common/gpu/client/command_buffer_metrics.cc File content/common/gpu/client/command_buffer_metrics.cc (right): https://codereview.chromium.org/1095893002/diff/120001/content/common/gpu/client/command_buffer_metrics.cc#newcode150 content/common/gpu/client/command_buffer_metrics.cc:150: switch (type) { To avoid having the switches in ...
5 years, 8 months ago (2015-04-24 20:01:32 UTC) #12
no sievers
https://codereview.chromium.org/1095893002/diff/120001/content/common/gpu/client/command_buffer_metrics.cc File content/common/gpu/client/command_buffer_metrics.cc (right): https://codereview.chromium.org/1095893002/diff/120001/content/common/gpu/client/command_buffer_metrics.cc#newcode150 content/common/gpu/client/command_buffer_metrics.cc:150: switch (type) { On 2015/04/24 20:01:31, Alexei Svitkine wrote: ...
5 years, 8 months ago (2015-04-24 20:12:50 UTC) #13
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1095893002/diff/120001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1095893002/diff/120001/tools/metrics/histograms/histograms.xml#newcode64712 tools/metrics/histograms/histograms.xml:64712: +<histogram_suffixes name="ContextType"> On 2015/04/24 20:12:50, sievers wrote: > ...
5 years, 8 months ago (2015-04-24 20:18:10 UTC) #14
no sievers
https://codereview.chromium.org/1095893002/diff/60001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1095893002/diff/60001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode3335 gpu/command_buffer/service/gles2_cmd_decoder.cc:3335: if (WasContextLost()) { There is actually a bug here ...
5 years, 8 months ago (2015-04-24 21:00:26 UTC) #15
nasko
IPC LGTM
5 years, 7 months ago (2015-04-27 14:07:33 UTC) #16
no sievers
I think this is good to go. There are more bugs I noticed - and ...
5 years, 7 months ago (2015-04-27 21:53:33 UTC) #17
Ken Russell (switch to Gerrit)
LGTM overall. Thanks again for looking at and improving this code. Couple of comments and ...
5 years, 7 months ago (2015-04-27 22:35:34 UTC) #18
piman
lgtm
5 years, 7 months ago (2015-04-27 23:17:40 UTC) #19
no sievers
https://codereview.chromium.org/1095893002/diff/180001/content/common/gpu/gpu_command_buffer_stub.cc File content/common/gpu/gpu_command_buffer_stub.cc (right): https://codereview.chromium.org/1095893002/diff/180001/content/common/gpu/gpu_command_buffer_stub.cc#newcode426 content/common/gpu/gpu_command_buffer_stub.cc:426: // don't leak resources. On 2015/04/27 22:35:33, Ken Russell ...
5 years, 7 months ago (2015-04-27 23:24:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1095893002/220001
5 years, 7 months ago (2015-04-27 23:42:02 UTC) #23
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 7 months ago (2015-04-28 00:45:59 UTC) #24
commit-bot: I haz the power
5 years, 7 months ago (2015-04-28 00:46:52 UTC) #25
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/fbaa5dc2fcb2e482c1daec1b9bcf1d577d53ca30
Cr-Commit-Position: refs/heads/master@{#327197}

Powered by Google App Engine
This is Rietveld 408576698