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

Issue 2942273002: Avoid some static initializers in Windows builds (Closed)

Created:
3 years, 6 months ago by brucedawson
Modified:
3 years, 6 months ago
CC:
chromium-reviews, blink-reviews-platform-graphics_chromium.org, dshwang, pennymac+watch_chromium.org, scheib+watch_chromium.org, ortuno+watch_chromium.org, fmalita+watch_chromium.org, kinuko+watch, rwlbuis, cbentzel+watch_chromium.org, krit, drott+blinkwatch_chromium.org, grt+watch_chromium.org, blink-reviews-html_chromium.org, jam, Justin Novosad, net-reviews_chromium.org, dglazkov+blink, Rik, darin-cc_chromium.org, Navid Zolghadr, blink-reviews, mlamouri+watch-content_chromium.org, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, dtapuska+blinkwatch_chromium.org, wfh+watch_chromium.org, dtapuska+chromiumwatch_chromium.org, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid some static initializers in Windows builds Running the static_initializers tool on the canary build of chrome_child.dll showed a few dozen static initializers. It was run like this: > tools\win\static_initializers\static_initializers.exe chrome_child.dll | find "obj/" | find "initializer" Many of these are trivially avoidable by tagging the objects in question as constexpr. This saves some startup cost, some code size, and it avoids creating so many private pages in the data segment. Testing with a non-official 32-bit release build shows that this change avoids eight static initializers. Once we switch to VC++ 2017 we will be able to use constexpr in more places. The static keyword was removed in a few places because it is redundant to const/constexpr. The effect on non-VC++ builds is unknown. It should be strictly neutral or an improvement. BUG=341941 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;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/2942273002 Cr-Commit-Position: refs/heads/master@{#480928} Committed: https://chromium.googlesource.com/chromium/src/+/3aa1f0e28252bef52ab1869730efc2938185c3cc

Patch Set 1 #

Patch Set 2 : Undo ugly git cl format of unchanged code #

Patch Set 3 : Remove problematic constexpr #

Patch Set 4 : Remove problematic constexprs that don't work in VC++ 2015 #

Patch Set 5 : Remove problematic constexprs that don't work in VC++ 2015 #

Patch Set 6 : constexpr const for clang happiness #

Patch Set 7 : Use constexpr [] instead of constexpr const * #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M chrome/install_static/policy_path_parser.cc View 1 2 3 4 5 6 2 chunks +12 lines, -12 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/TypeAhead.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/AutoscrollController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 43 (36 generated)
brucedawson
Simple change - PTAL.
3 years, 6 months ago (2017-06-16 22:13:55 UTC) #30
tkent
third_party/WebKit lgtm
3 years, 6 months ago (2017-06-18 23:29:20 UTC) #33
brucedawson
gab@ can you look at chrome\install_static? tdressers can you look at content\renderer\input? Trivial change. Thanks.
3 years, 6 months ago (2017-06-19 23:04:49 UTC) #35
grt (UTC plus 2)
install_static lgtm
3 years, 6 months ago (2017-06-20 06:49:15 UTC) #37
dtapuska
On 2017/06/20 06:49:15, grt (UTC plus 2) wrote: > install_static lgtm input/* lgtm (tdresser is ...
3 years, 6 months ago (2017-06-20 14:49:28 UTC) #38
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/2942273002/120001
3 years, 6 months ago (2017-06-20 17:28:39 UTC) #40
commit-bot: I haz the power
3 years, 6 months ago (2017-06-20 20:17:23 UTC) #43
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/3aa1f0e28252bef52ab1869730ef...

Powered by Google App Engine
This is Rietveld 408576698