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

Issue 2138173002: Hookup the generic heap intercept for Windows. (Closed)

Created:
4 years, 5 months ago by Sigurður Ásgeirsson
Modified:
4 years, 5 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, Dai Mikurube (NOT FULLTIME)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Hookup the generic heap intercept for Windows. With this change, it's possible to set a GN arg "use_experimental_allocator_shim" to true to enable the generic allocator shim on Windows. This only works in non-component builds due to the way the allocator is intercepted on Windows. BUG=550886 Committed: https://crrev.com/e422cb9901097b09317bc07fd7e1f8f603727ae5 Cr-Commit-Position: refs/heads/master@{#406879}

Patch Set 1 #

Patch Set 2 : Address presubmit nits. #

Patch Set 3 : Fix broken realloc unittest. #

Total comments: 4

Patch Set 4 : Add missing files. #

Patch Set 5 : Fix dangling use of ::g_win_new_mode. #

Total comments: 29

Patch Set 6 : Merge the win-shim refactoring CL. #

Patch Set 7 : Address Primiano's comments. #

Patch Set 8 : Snip an errant curly. #

Total comments: 14

Patch Set 9 : Address Will's and Primiano's comments. #

Patch Set 10 : Scrub code moved to _ucrt header from .cc. #

Patch Set 11 : Redirect base::GetPageSize->GetCachedPageSize. #

Total comments: 2

Patch Set 12 : Rephrase comment in hopes that the code is sane as-is. #

Patch Set 13 : Merge ToT. #

Patch Set 14 : Squash the use_experimental_allocator_shim for NaCL as per Brett's suggestion. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -26 lines) Patch
M base/allocator/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -3 lines 0 comments Download
M base/allocator/allocator_shim.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +37 lines, -18 lines 0 comments Download
A base/allocator/allocator_shim_default_dispatch_to_winheap.cc View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
A base/allocator/allocator_shim_override_ucrt_symbols_win.h View 1 2 3 4 5 6 7 8 1 chunk +74 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_unittest.cc View 1 2 3 4 5 6 6 chunks +12 lines, -3 lines 0 comments Download
M build/config/allocator.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +14 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 36 (17 generated)
Sigurður Ásgeirsson
Hey Primiano, this passes all unittests, but as you see it's unbeautiful, and doesn't yet ...
4 years, 5 months ago (2016-07-11 19:51:51 UTC) #2
Primiano Tucci (use gerrit)
Ok this makes great sense to me. I'd just split in two parts, mainly for ...
4 years, 5 months ago (2016-07-12 14:51:05 UTC) #3
Sigurður Ásgeirsson
Please take another look - I've rebased to CL 2143693003, and cleaned up the varia. ...
4 years, 5 months ago (2016-07-14 19:04:27 UTC) #7
Primiano Tucci (use gerrit)
Looks great, just some small final suggestions. https://codereview.chromium.org/2138173002/diff/80001/base/allocator/allocator_impl_win.cc File base/allocator/allocator_impl_win.cc (right): https://codereview.chromium.org/2138173002/diff/80001/base/allocator/allocator_impl_win.cc#newcode30 base/allocator/allocator_impl_win.cc:30: void* WinHeapMalloc(size_t ...
4 years, 5 months ago (2016-07-15 14:02:10 UTC) #8
Will Harris
drive by! Thanks for doing this, siggi! in general, the tests we have in base_unittests ...
4 years, 5 months ago (2016-07-15 15:49:54 UTC) #10
Primiano Tucci (use gerrit)
Btw none of my comments up are huge deals, so speculative LGTM with comment addressed ...
4 years, 5 months ago (2016-07-15 17:58:09 UTC) #11
Sigurður Ásgeirsson
K, addressed comments. Brett for owners on allocator.gni please. I'd also love your take on ...
4 years, 5 months ago (2016-07-18 19:27:07 UTC) #15
brettw
https://codereview.chromium.org/2138173002/diff/190001/build/config/allocator.gni File build/config/allocator.gni (right): https://codereview.chromium.org/2138173002/diff/190001/build/config/allocator.gni#newcode36 build/config/allocator.gni:36: # TODO(siggi): NaCL doesn't appear to obey this configuration, ...
4 years, 5 months ago (2016-07-18 20:11:08 UTC) #16
brettw
Can you also provide a more detailed commit message?
4 years, 5 months ago (2016-07-18 20:11:34 UTC) #17
Sigurður Ásgeirsson
Hey Brett, I'm going to need more direction on how to override an arg flag ...
4 years, 5 months ago (2016-07-19 13:44:50 UTC) #19
Sigurður Ásgeirsson
Brett - gentle nudge
4 years, 5 months ago (2016-07-20 13:13:43 UTC) #20
brettw
Sorry for the delay, I needed to actually try it. I'm not seeing that problem ...
4 years, 5 months ago (2016-07-20 18:28:34 UTC) #21
Sigurður Ásgeirsson
Interesting, I tried patching this into my workspace with the same failure results. I then ...
4 years, 5 months ago (2016-07-21 14:26:23 UTC) #22
Sigurður Ásgeirsson
Well then, Brett, your suggestion works like a charm at ToT. All good now?
4 years, 5 months ago (2016-07-21 14:44:41 UTC) #23
Will Harris
lgtm
4 years, 5 months ago (2016-07-21 15:20:41 UTC) #26
brettw
lgtm
4 years, 5 months ago (2016-07-21 16:45:28 UTC) #29
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/2138173002/250001
4 years, 5 months ago (2016-07-21 16:51:24 UTC) #32
commit-bot: I haz the power
Committed patchset #14 (id:250001)
4 years, 5 months ago (2016-07-21 16:58:11 UTC) #34
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 17:00:09 UTC) #36
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/e422cb9901097b09317bc07fd7e1f8f603727ae5
Cr-Commit-Position: refs/heads/master@{#406879}

Powered by Google App Engine
This is Rietveld 408576698