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

Issue 2623373004: Move ~200 Feature objects to read-only memory in Windows builds (Closed)

Created:
3 years, 11 months ago by brucedawson
Modified:
3 years, 11 months ago
Reviewers:
dcheng
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move ~200 Feature objects to read-only memory in Windows builds A VC++ bug was preventing base::Feature objects from going into the read-only section despite being tagged as const. Adding a constexpr constructor solves this problem. Some of the variables (kTimerThrottlingForHiddenFrames for instance) get optimized away entirely which is why the size changes are not symmetrical. The VC++ bug is: https://connect.microsoft.com/VisualStudio/feedback/details/3117602 Previous instances of this bug were worked around by deleting const but this seemed undesirable in this case. Luckily the constexpr fix seems to work just as well. Approximate deltas are: chrome.dll .text: -48 bytes change .rdata: 1216 bytes change .data: -1376 bytes change .reloc: -32 bytes change Total change: -240 bytes chrome_child.dll .text: -16 bytes change .rdata: 704 bytes change .data: -800 bytes change .reloc: 32 bytes change Total change: -80 bytes Modest, but it's good to move a few hundred variables to read-only memory. This should not affect other platforms. BUG=677351 Review-Url: https://codereview.chromium.org/2623373004 Cr-Commit-Position: refs/heads/master@{#443616} Committed: https://chromium.googlesource.com/chromium/src/+/cbbcb90c9c4388226eadba1632bc85040e66c8cc

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M base/feature_list.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
brucedawson
What do you think? Not a big change but I don't think it has any ...
3 years, 11 months ago (2017-01-13 01:17:43 UTC) #7
dcheng
On 2017/01/13 01:17:43, brucedawson wrote: > What do you think? > > Not a big ...
3 years, 11 months ago (2017-01-13 09:17:08 UTC) #9
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/2623373004/1
3 years, 11 months ago (2017-01-13 18:18:43 UTC) #11
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 18:25:17 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/cbbcb90c9c4388226eadba1632bc...

Powered by Google App Engine
This is Rietveld 408576698