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

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed)

Created:
8 years, 2 months ago by danakj
Modified:
8 years, 2 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, backer, piman, skaslev
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

cc: Switch to Chromium DCHECKs LOGs We can't compile-guard code and use DCHECK since it can be enabled at runtime. This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well. This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo"; R=enne,jamesr Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162296

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : rebase #

Total comments: 1

Patch Set 7 : rebase #

Patch Set 8 : with-presubmit #

Total comments: 8

Patch Set 9 : add missing files and stuff #

Patch Set 10 : use DCHECK #

Patch Set 11 : remove-rebased-asserts #

Total comments: 15

Patch Set 12 : re-add-missing-files? #

Patch Set 13 : use-base/logging.h #

Patch Set 14 : rebase #

Patch Set 15 : rebase #

Patch Set 16 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+801 lines, -695 lines) Patch
M cc/DEPS View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
cc/PRESUBMIT.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +38 lines, -0 lines 0 comments Download
M cc/animation_curve.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +4 lines, -2 lines 0 comments Download
cc/caching_bitmap_canvas_layer_texture_updater.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M cc/checkerboard_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M cc/completion_event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +9 lines, -8 lines 0 comments Download
M cc/damage_tracker.cc View 1 2 3 4 5 6 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
cc/dcheck.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
M cc/debug_border_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M cc/debug_rect_history.cc View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +3 lines, -3 lines 0 comments Download
M cc/delay_based_time_source.cc View 1 2 3 4 5 10 11 12 13 14 15 4 chunks +4 lines, -3 lines 0 comments Download
M cc/delegated_renderer_layer_impl.cc View 1 2 3 4 5 10 11 12 13 14 15 4 chunks +10 lines, -10 lines 0 comments Download
M cc/direct_renderer.cc View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +3 lines, -3 lines 0 comments Download
M cc/draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +5 lines, -4 lines 0 comments Download
M cc/font_atlas.cc View 1 2 3 4 5 6 10 11 12 13 14 15 3 chunks +3 lines, -3 lines 0 comments Download
M cc/frame_rate_controller.cc View 1 2 3 4 5 10 11 12 13 14 15 4 chunks +4 lines, -3 lines 0 comments Download
M cc/frame_rate_counter.cc View 1 2 3 4 5 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M cc/gl_renderer.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
cc/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 32 chunks +41 lines, -47 lines 0 comments Download
cc/gl_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +4 lines, -4 lines 0 comments Download
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M cc/io_surface_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M cc/keyframed_animation_curve.cc View 1 2 3 4 5 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
cc/layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
cc/layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +5 lines, -5 lines 0 comments Download
M cc/layer_animation_controller.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +2 lines, -3 lines 0 comments Download
M cc/layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +11 lines, -13 lines 0 comments Download
M cc/layer_iterator.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/layer_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 1 chunk +3 lines, -1 line 0 comments Download
M cc/layer_sorter.cc View 1 2 3 4 5 10 11 12 13 14 15 12 chunks +25 lines, -32 lines 0 comments Download
cc/layer_texture_sub_image.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M cc/layer_tiling_data.cc View 1 2 3 4 5 6 10 11 12 13 14 15 3 chunks +4 lines, -2 lines 0 comments Download
cc/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 13 chunks +17 lines, -17 lines 0 comments Download
cc/layer_tree_host_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +9 lines, -9 lines 0 comments Download
cc/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 chunks +28 lines, -28 lines 0 comments Download
cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +6 lines, -6 lines 0 comments Download
cc/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +8 lines, -8 lines 0 comments Download
M cc/math_util.h View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
cc/math_util.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
cc/occlusion_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +12 lines, -12 lines 0 comments Download
cc/occlusion_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -5 lines 0 comments Download
M cc/platform_color.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M cc/prioritized_texture.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
cc/prioritized_texture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +21 lines, -23 lines 0 comments Download
cc/prioritized_texture_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 chunks +49 lines, -49 lines 0 comments Download
cc/prioritized_texture_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/program_binding.h View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +6 lines, -4 lines 0 comments Download
cc/program_binding.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +12 lines, -13 lines 0 comments Download
M cc/proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +7 lines, -6 lines 0 comments Download
M cc/proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -5 lines 0 comments Download
cc/quad_culler.cc View 1 2 3 4 5 6 10 11 12 13 14 15 1 chunk +4 lines, -4 lines 0 comments Download
cc/rate_limiter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/render_pass.cc View 1 2 3 4 5 10 11 12 13 14 15 3 chunks +4 lines, -4 lines 0 comments Download
M cc/render_pass_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 1 chunk +4 lines, -4 lines 0 comments Download
M cc/render_surface_filters.cc View 1 2 3 4 5 6 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M cc/render_surface_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +6 lines, -5 lines 0 comments Download
cc/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 26 chunks +61 lines, -61 lines 0 comments Download
cc/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +38 lines, -37 lines 0 comments Download
M cc/scheduler.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +4 lines, -3 lines 0 comments Download
M cc/scheduler_state_machine.cc View 1 2 3 4 5 10 11 12 13 14 15 8 chunks +11 lines, -11 lines 0 comments Download
M cc/scheduler_unittest.cc View 1 2 3 4 5 6 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M cc/scoped_ptr_hash_map.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M cc/scoped_ptr_vector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +7 lines, -6 lines 0 comments Download
M cc/scoped_texture.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -2 lines 0 comments Download
M cc/scoped_texture.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -5 lines 0 comments Download
M cc/scoped_thread_proxy.h View 1 2 3 4 5 10 11 12 13 14 15 4 chunks +5 lines, -4 lines 0 comments Download
cc/scrollbar_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
cc/shader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 chunks +17 lines, -16 lines 0 comments Download
M cc/single_thread_proxy.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
cc/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +24 lines, -24 lines 0 comments Download
M cc/software_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M cc/solid_color_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M cc/stream_video_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
cc/stubs/config.h View 1 2 3 4 5 6 7 8 10 11 1 chunk +17 lines, -0 lines 0 comments Download
M cc/stubs/trace_event.h View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M cc/test/fake_web_compositor_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M cc/test/fake_web_compositor_software_output_device.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/scheduler_test_common.cc View 1 2 3 4 5 6 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
cc/texture_copier.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/texture_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
M cc/texture_layer_impl.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 6 10 11 12 13 14 15 40 chunks +70 lines, -70 lines 0 comments Download
cc/threaded_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +12 lines, -12 lines 0 comments Download
cc/throttled_texture_uploader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -5 lines 0 comments Download
M cc/tile_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download
cc/tiled_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +9 lines, -9 lines 0 comments Download
M cc/tiled_layer_impl.cc View 1 2 3 4 5 6 10 11 12 13 14 15 1 chunk +3 lines, -3 lines 0 comments Download
cc/tiled_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/timer.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
cc/tree_synchronizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
cc/unthrottled_texture_uploader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
cc/video_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/video_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +13 lines, -13 lines 0 comments Download
M cc/yuv_video_draw_quad.cc View 1 2 3 4 5 10 11 12 13 14 15 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 54 (0 generated)
danakj
8 years, 2 months ago (2012-10-12 01:19:44 UTC) #1
enne (OOO)
lgtm
8 years, 2 months ago (2012-10-12 01:31:51 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11048044/1
8 years, 2 months ago (2012-10-12 01:33:04 UTC) #3
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-12 01:46:40 UTC) #4
danakj
PTAL I updated the description, this replaces all asserts with chromium-style ones.
8 years, 2 months ago (2012-10-12 21:47:28 UTC) #5
danakj
@skaslev FYI on DCHECK_IS_ENABLED() for renderer clearing.
8 years, 2 months ago (2012-10-12 21:48:50 UTC) #6
slavi
https://codereview.chromium.org/11048044/diff/12001/cc/CCCompletionEvent.h File cc/CCCompletionEvent.h (left): https://codereview.chromium.org/11048044/diff/12001/cc/CCCompletionEvent.h#oldcode53 cc/CCCompletionEvent.h:53: #ifndef NDEBUG Maybe change all the #ifndef NDEBUG to ...
8 years, 2 months ago (2012-10-12 22:10:13 UTC) #7
danakj
https://codereview.chromium.org/11048044/diff/12001/cc/CCCompletionEvent.h File cc/CCCompletionEvent.h (left): https://codereview.chromium.org/11048044/diff/12001/cc/CCCompletionEvent.h#oldcode53 cc/CCCompletionEvent.h:53: #ifndef NDEBUG On 2012/10/12 22:10:13, slaf wrote: > Maybe ...
8 years, 2 months ago (2012-10-12 22:13:20 UTC) #8
piman
On Fri, Oct 12, 2012 at 3:13 PM, <danakj@chromium.org> wrote: > > https://codereview.chromium.**org/11048044/diff/12001/cc/** > CCCompletionEvent.h<https://codereview.chromium.org/11048044/diff/12001/cc/CCCompletionEvent.h> ...
8 years, 2 months ago (2012-10-12 22:17:29 UTC) #9
danakj
On Fri, Oct 12, 2012 at 3:17 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
8 years, 2 months ago (2012-10-12 22:18:55 UTC) #10
slavi
On 2012/10/12 22:18:55, danakj wrote: > On Fri, Oct 12, 2012 at 3:17 PM, Antoine ...
8 years, 2 months ago (2012-10-12 22:28:58 UTC) #11
slavi
On 2012/10/12 22:28:58, slaf wrote: > On 2012/10/12 22:18:55, danakj wrote: > > On Fri, ...
8 years, 2 months ago (2012-10-12 22:29:52 UTC) #12
danakj
On 2012/10/12 22:29:52, slaf wrote: > *Is the plan to revisit all the removed #if ...
8 years, 2 months ago (2012-10-12 22:31:39 UTC) #13
enne (OOO)
Can you add a presubmit check to prevent the use of a raw DCHECK in ...
8 years, 2 months ago (2012-10-15 18:23:34 UTC) #14
slavi
On 2012/10/15 18:23:34, enne wrote: > Can you add a presubmit check to prevent the ...
8 years, 2 months ago (2012-10-16 00:58:45 UTC) #15
slavi
On 2012/10/16 00:58:45, slavi wrote: > On 2012/10/15 18:23:34, enne wrote: > > Can you ...
8 years, 2 months ago (2012-10-16 00:59:59 UTC) #16
danakj
NDEBUG is not enough, you need !NDEBUG || DCHECK_ALWAYS_ON. Try bots are release but with ...
8 years, 2 months ago (2012-10-16 01:03:26 UTC) #17
slavi
lgtm http://codereview.chromium.org/11048044/diff/17002/cc/yuv_video_draw_quad.cc File cc/yuv_video_draw_quad.cc (right): http://codereview.chromium.org/11048044/diff/17002/cc/yuv_video_draw_quad.cc#newcode28 cc/yuv_video_draw_quad.cc:28: CC_DCHECK(quad->material() == CCDrawQuad::YUVVideoContent); I would say that this ...
8 years, 2 months ago (2012-10-16 06:23:09 UTC) #18
danakj
presubmit test added
8 years, 2 months ago (2012-10-16 18:12:39 UTC) #19
enne (OOO)
https://codereview.chromium.org/11048044/diff/28001/cc/PRESUBMIT.py File cc/PRESUBMIT.py (right): https://codereview.chromium.org/11048044/diff/28001/cc/PRESUBMIT.py#newcode14 cc/PRESUBMIT.py:14: white_list = tuple(white_list or ('^cc/.*\.(cc|h)$',)) nit: r'^cc... Also, what ...
8 years, 2 months ago (2012-10-16 18:34:22 UTC) #20
enne (OOO)
8 years, 2 months ago (2012-10-16 18:34:43 UTC) #21
slavi
On 2012/10/16 18:34:43, enne wrote: Why are we forbidding DCHECKs in cc? All of Chrome ...
8 years, 2 months ago (2012-10-16 19:05:04 UTC) #22
danakj
ptal no more missing files :) https://codereview.chromium.org/11048044/diff/28001/cc/PRESUBMIT.py File cc/PRESUBMIT.py (right): https://codereview.chromium.org/11048044/diff/28001/cc/PRESUBMIT.py#newcode14 cc/PRESUBMIT.py:14: white_list = tuple(white_list ...
8 years, 2 months ago (2012-10-16 19:11:51 UTC) #23
danakj
On 2012/10/16 19:05:04, slavi wrote: > On 2012/10/16 18:34:43, enne wrote: > > Why are ...
8 years, 2 months ago (2012-10-16 19:17:37 UTC) #24
slavi
On 2012/10/16 19:17:37, danakj wrote: > On 2012/10/16 19:05:04, slavi wrote: > > On 2012/10/16 ...
8 years, 2 months ago (2012-10-16 19:22:34 UTC) #25
enne (OOO)
On 2012/10/16 19:22:34, slavi wrote: > > May I suggest that we use DCHECKs by ...
8 years, 2 months ago (2012-10-16 19:27:54 UTC) #26
slavi
On 2012/10/16 19:27:54, enne wrote: > On 2012/10/16 19:22:34, slavi wrote: > > > > ...
8 years, 2 months ago (2012-10-16 19:33:18 UTC) #27
enne (OOO)
On 2012/10/16 19:33:18, slavi wrote: > The proper rule in the rest of the code ...
8 years, 2 months ago (2012-10-16 19:35:47 UTC) #28
enne (OOO)
Or, I want cc to have dchecks on release bots even when they involve member ...
8 years, 2 months ago (2012-10-16 19:36:18 UTC) #29
danakj
On 2012/10/16 19:33:18, slavi wrote: > Chrome does use a lot of debug vars too. ...
8 years, 2 months ago (2012-10-16 19:38:14 UTC) #30
slavi
On 2012/10/16 19:36:18, enne wrote: > Or, I want cc to have dchecks on release ...
8 years, 2 months ago (2012-10-16 19:39:09 UTC) #31
enne (OOO)
My chain of reasoning goes like this: * I want all DCHECKS in cc on ...
8 years, 2 months ago (2012-10-16 19:47:05 UTC) #32
slavi
On 2012/10/16 19:47:05, enne wrote: > My chain of reasoning goes like this: > > ...
8 years, 2 months ago (2012-10-16 19:57:56 UTC) #33
enne (OOO)
lgtm
8 years, 2 months ago (2012-10-16 20:01:29 UTC) #34
danakj
piman had a good suggestion to use the official build macros. #define CC_DCHECK_ENABLED() !LOGGING_IS_OFFICIAL_BUILD Then ...
8 years, 2 months ago (2012-10-16 20:01:30 UTC) #35
slavi
On 2012/10/16 20:01:30, danakj wrote: > piman had a good suggestion to use the official ...
8 years, 2 months ago (2012-10-16 20:02:44 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11048044/33004
8 years, 2 months ago (2012-10-16 20:27:37 UTC) #37
slavi
https://codereview.chromium.org/11048044/diff/33004/cc/gl_renderer_unittest.cc File cc/gl_renderer_unittest.cc (right): https://codereview.chromium.org/11048044/diff/33004/cc/gl_renderer_unittest.cc#newcode254 cc/gl_renderer_unittest.cc:254: #if CC_DCHECK_ENABLED() Keep this as #ifndef NDEBUG? https://codereview.chromium.org/11048044/diff/33004/cc/gl_renderer_unittest.cc#newcode263 cc/gl_renderer_unittest.cc:263: ...
8 years, 2 months ago (2012-10-16 20:31:46 UTC) #38
danakj
https://codereview.chromium.org/11048044/diff/33004/cc/prioritized_texture.h File cc/prioritized_texture.h (right): https://codereview.chromium.org/11048044/diff/33004/cc/prioritized_texture.h#newcode115 cc/prioritized_texture.h:115: #if CC_DCHECK_ENABLED() On 2012/10/16 20:31:46, slavi wrote: > Keep ...
8 years, 2 months ago (2012-10-16 20:36:17 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11048044/41001
8 years, 2 months ago (2012-10-16 20:49:27 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11048044/26107
8 years, 2 months ago (2012-10-16 22:51:48 UTC) #41
commit-bot: I haz the power
Change committed as 162296
8 years, 2 months ago (2012-10-17 00:50:22 UTC) #42
danakj
Sad news. This got reverted for breaking the build. Apparently you can have DCHECKS enabled ...
8 years, 2 months ago (2012-10-17 15:37:38 UTC) #43
piman
On Wed, Oct 17, 2012 at 8:37 AM, <danakj@chromium.org> wrote: > Sad news. This got ...
8 years, 2 months ago (2012-10-17 16:34:52 UTC) #44
danakj
On Wed, Oct 17, 2012 at 12:34 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
8 years, 2 months ago (2012-10-17 16:38:59 UTC) #45
piman
On Wed, Oct 17, 2012 at 9:38 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
8 years, 2 months ago (2012-10-17 16:45:24 UTC) #46
danakj
On Wed, Oct 17, 2012 at 12:45 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
8 years, 2 months ago (2012-10-17 16:48:08 UTC) #47
jamesr1
On Wed, Oct 17, 2012 at 9:47 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
8 years, 2 months ago (2012-10-17 17:02:45 UTC) #48
piman
On Wed, Oct 17, 2012 at 9:47 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
8 years, 2 months ago (2012-10-17 17:07:28 UTC) #49
danakj
On Wed, Oct 17, 2012 at 1:02 PM, James Robinson <jamesr@google.com> wrote: > > > ...
8 years, 2 months ago (2012-10-17 17:07:34 UTC) #50
danakj
On Wed, Oct 17, 2012 at 1:07 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
8 years, 2 months ago (2012-10-17 17:10:22 UTC) #51
jamesr1
On Wed, Oct 17, 2012 at 10:09 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
8 years, 2 months ago (2012-10-17 17:19:34 UTC) #52
danakj
On Wed, Oct 17, 2012 at 1:19 PM, James Robinson <jamesr@google.com> wrote: > > > ...
8 years, 2 months ago (2012-10-17 17:23:33 UTC) #53
jamesr
8 years, 2 months ago (2012-10-17 17:28:02 UTC) #54
On Wed, Oct 17, 2012 at 10:23 AM, Dana Jansens <danakj@chromium.org> wrote:

> On Wed, Oct 17, 2012 at 1:19 PM, James Robinson <jamesr@google.com> wrote:
> >
> >
> > On Wed, Oct 17, 2012 at 10:09 AM, Dana Jansens <danakj@chromium.org>
> wrote:
> >>
> >> On Wed, Oct 17, 2012 at 1:07 PM, Antoine Labour <piman@chromium.org>
> >> wrote:
> >> >
> >> >
> >> > On Wed, Oct 17, 2012 at 9:47 AM, Dana Jansens <danakj@chromium.org>
> >> > wrote:
> >> >>
> >> >> On Wed, Oct 17, 2012 at 12:45 PM, Antoine Labour <piman@chromium.org
> >
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Wed, Oct 17, 2012 at 9:38 AM, Dana Jansens <danakj@chromium.org
> >
> >> >> > wrote:
> >> >> >>
> >> >> >> On Wed, Oct 17, 2012 at 12:34 PM, Antoine Labour
> >> >> >> <piman@chromium.org>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Wed, Oct 17, 2012 at 8:37 AM, <danakj@chromium.org> wrote:
> >> >> >> >>
> >> >> >> >> Sad news. This got reverted for breaking the build.
> >> >> >> >>
> >> >> >> >> Apparently you can have DCHECKS enabled in an official build.
> So
> >> >> >> >> guarding
> >> >> >> >> on
> >> >> >> >> LOGGING_IS_OFFICIAL_BUILD won't do. Going back to CC_DCHECK.
> >> >> >> >
> >> >> >> >
> >> >> >> > It looks like DCHECK, by design, will still reference the
> >> >> >> > variables
> >> >> >> > in
> >> >> >> > the
> >> >> >> > condition when compiled out.
> >> >> >> > Still, doesn't mean we need to fork the style guide.
> >> >> >> >
> >> >> >> > Most of the places a DCHECK will be fine. In a few places where
> we
> >> >> >> > want
> >> >> >> > to
> >> >> >> > avoid the cost of keeping track of some variables, we can #ifdef
> >> >> >> > it
> >> >> >> > on
> >> >> >> > some
> >> >> >> > condition, and #ifdef the corresponding DCHECK(s), on the same
> >> >> >> > condition.
> >> >> >> > But limit it to those places.
> >> >> >> >
> >> >> >> > It doesn't have to affect the 95% of other DCHECKs.
> >> >> >>
> >> >> >> The problem that I see with this is that then some DCHECKs are run
> >> >> >> in
> >> >> >> different build conditions than others. It makes it trickier to
> know
> >> >> >> what's being tested. If you get a crash dump with a DCHECK
> failing,
> >> >> >> and there are guarded DCHECKs above it, did they pass or were they
> >> >> >> compiled out?
> >> >> >
> >> >> >
> >> >> > Then make it a CHECK?
> >> >>
> >> >> I'm not sure how that helps. You still don't know if the condition in
> >> >> the CHECK passed or it was just not compiled in.
> >> >
> >> >
> >> > Just make the condition obvious? e.g. NDEBUG?
> >> > I think that's entirely orthogonal.
> >>
> >> NDEBUG doesn't work for try bots :( This is the whole problem..
> >
> >
> > Of course they do, but only on the debug bots.  They don't on _rel bots
> or
> > the rel-with-dchecks bots.  But this is a really really minor issue.
>
> The CQ bots are release bots with dchecks on, those are the trybots
> I'm worrying about. Missing checks in the CQ can mean more closing the
> tree and causing reverts. Shouldn't we be trying our best to run all
> our debug checks on the CQ bots? How many times has the EWS caught
> debug checks failing in unit tests?
>

I'm pretty sure WebKit EWS bots are release, so zero times.


>
> If the majority feel this way then fine, but it seems bad to me.
>

Let's see if it's a problem - I doubt it will be.

- James


> > We
> > have debug bots on the waterfall and developers are (hopefully) running
> > tests in debug.  I don't think it's worth being any different from the
> rest
> > of the chrome world here.  Write CHECK()s when you want it to crash in
> the
> > field, DCHECK() when you want it only happening on debug or
> rel-with-dcheck
> > bots, and #ifndef NDEBUG if you want to guard some data and not have it
> > compiled in out in the field.  The last category won't run on all of the
> > bots we have but it'll run on enough to give us coverage.
> >
> > I haven't personally seen any of the last category of checks fail on the
> > bots that I can remember - they're really the most useful for developers
> who
> > are hacking on stuff locally and want to make sure it's still working.
> > Those developers are hopefully using real debug builds on their machine.
> >
> > - James
> >
> >>
> >> >>
> >> >> I think we should
> >> >> have all our checks enabled/disabled together.
> >> >
> >> >
> >> > The same argument could go with cc vs rest-of-chrome.
> >>
> >> Yes except they can't appear together in the same method, making one
> >> dependent on the other.
> >>
> >> > We're really only talking about a few asserts here, that are complex
> >> > enough
> >> > that they need specific tracking that we don't want to do in official
> >> > builds. It's a fairly rare case. I don't think that justifies changing
> >> > every
> >> > assert, subtly changing the semantic, causing additional cognitive
> cost
> >> > for
> >> > readers of the code, and extra reviews cycles that will constantly
> >> > happen
> >> > because of the style fork.
> >>
> >> Well, FWIW there will be no extra review cycles since we made a
> >> PRESUBMIT. This saves us from having extra review cycles because
> >> someone chose the wrong guard/didn't remember to guard/etc.
> >>
> >> > Antoine
> >> >
> >> >
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >>
> >> >
> >> > --
> >> >
> >> >
> >
> >
>

Powered by Google App Engine
This is Rietveld 408576698