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

Issue 2703803004: macOS: Shim all malloc zones. (Closed)

Created:
3 years, 10 months ago by erikchen
Modified:
3 years, 10 months ago
CC:
chromium-reviews, wfh+watch_chromium.org, mac-reviews_chromium.org, Dai Mikurube (NOT FULLTIME), vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

macOS: Shim all malloc zones. All information about malloc zones [and their original functions] is stored in MallocZoneAggregator. When the allocator shim is ready to dispatch back to the original system implementations, it calls the MallocZoneAggregator with |context|, which provides enough information to dispatch to the correct malloc zone. BUG=693237 Review-Url: https://codereview.chromium.org/2703803004 Cr-Commit-Position: refs/heads/master@{#452784} Committed: https://chromium.googlesource.com/chromium/src/+/7a54483e22a7e4578870d144b7d4a71380e63a10

Patch Set 1 #

Patch Set 2 : clean up #

Patch Set 3 : Add base export. #

Patch Set 4 : Change location of BASE_EXPORT. #

Patch Set 5 : Add a memory barrier. #

Total comments: 24

Patch Set 6 : Comments from mark. #

Patch Set 7 : Minor formatting. #

Total comments: 9

Patch Set 8 : Comments from primiano. #

Patch Set 9 : Style. #

Patch Set 10 : Minor cleanup. #

Patch Set 11 : Add base_export #

Patch Set 12 : more base export. #

Total comments: 32

Patch Set 13 : Comments from primiano. #

Patch Set 14 : Nits. #

Total comments: 10

Patch Set 15 : Comments from primiano, mark. #

Patch Set 16 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -126 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M base/allocator/allocator_interception_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -42 lines 0 comments Download
M base/allocator/allocator_interception_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +40 lines, -41 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +25 lines, -23 lines 0 comments Download
M base/allocator/allocator_shim_override_mac_symbols.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
A + base/allocator/malloc_zone_functions_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +40 lines, -17 lines 0 comments Download
A base/allocator/malloc_zone_functions_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +110 lines, -0 lines 0 comments Download
A base/allocator/malloc_zone_functions_mac_unittest.cc View 1 2 3 4 5 6 7 1 chunk +57 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 61 (37 generated)
erikchen
primiano: Please review.
3 years, 10 months ago (2017-02-21 00:00:36 UTC) #14
erikchen
mark: Please review.
3 years, 10 months ago (2017-02-21 22:11:04 UTC) #17
Mark Mentovai
https://codereview.chromium.org/2703803004/diff/80001/base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc File base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc (right): https://codereview.chromium.org/2703803004/diff/80001/base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc#newcode17 base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc:17: // zones. Avoid using a LeakyInstance since performance is ...
3 years, 10 months ago (2017-02-21 22:52:51 UTC) #19
erikchen
https://codereview.chromium.org/2703803004/diff/80001/base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc File base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc (right): https://codereview.chromium.org/2703803004/diff/80001/base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc#newcode17 base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc:17: // zones. Avoid using a LeakyInstance since performance is ...
3 years, 10 months ago (2017-02-21 23:44:34 UTC) #21
Primiano Tucci (use gerrit)
Did a first pass, I think I am not fully grasping the intended design. My ...
3 years, 10 months ago (2017-02-22 12:25:39 UTC) #22
erikchen
> 1) That MallocZoneFunctions seems to be a copy of ChromeMallocZone. Why not > using ...
3 years, 10 months ago (2017-02-22 18:36:40 UTC) #23
erikchen
chatted with mark@, he seems willing to accept primiano's proposals, so I'm going to go ...
3 years, 10 months ago (2017-02-22 18:47:15 UTC) #24
erikchen
On 2017/02/22 18:47:15, erikchen wrote: > chatted with mark@, he seems willing to accept primiano's ...
3 years, 10 months ago (2017-02-22 19:30:58 UTC) #25
erikchen
mark, primiano: Please review. https://codereview.chromium.org/2703803004/diff/140001/base/allocator/allocator_interception_mac.mm File base/allocator/allocator_interception_mac.mm (right): https://codereview.chromium.org/2703803004/diff/140001/base/allocator/allocator_interception_mac.mm#newcode31 base/allocator/allocator_interception_mac.mm:31: #include "base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h" On 2017/02/22 12:25:39, ...
3 years, 10 months ago (2017-02-22 21:03:10 UTC) #26
Primiano Tucci (use gerrit)
layering and naming looks such better! thanks a lot for the patience of rewrapping this. ...
3 years, 10 months ago (2017-02-23 00:40:17 UTC) #37
Primiano Tucci (use gerrit)
layering and naming looks such better! thanks a lot for the patience of rewrapping this. ...
3 years, 10 months ago (2017-02-23 00:40:18 UTC) #38
Primiano Tucci (use gerrit)
layering and naming looks such better! thanks a lot for the patience of rewrapping this. ...
3 years, 10 months ago (2017-02-23 00:40:18 UTC) #39
erikchen
https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm File base/allocator/allocator_interception_mac.mm (right): https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm#newcode351 base/allocator/allocator_interception_mac.mm:351: for (unsigned int i = 0; i < count; ...
3 years, 10 months ago (2017-02-23 01:43:14 UTC) #42
Mark Mentovai
OK, LGTM. https://codereview.chromium.org/2703803004/diff/280001/base/allocator/allocator_interception_mac.h File base/allocator/allocator_interception_mac.h (right): https://codereview.chromium.org/2703803004/diff/280001/base/allocator/allocator_interception_mac.h#newcode17 base/allocator/allocator_interception_mac.h:17: // Saves the function pointers currently used ...
3 years, 10 months ago (2017-02-23 02:20:15 UTC) #43
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2703803004/diff/140001/base/allocator/malloc_zone_aggregator_mac.cc File base/allocator/malloc_zone_aggregator_mac.cc (right): https://codereview.chromium.org/2703803004/diff/140001/base/allocator/malloc_zone_aggregator_mac.cc#newcode49 base/allocator/malloc_zone_aggregator_mac.cc:49: memset(zones_, 0, sizeof(zones_)); On 2017/02/22 21:03:09, erikchen wrote: > ...
3 years, 10 months ago (2017-02-23 11:19:41 UTC) #44
Primiano Tucci (use gerrit)
LGTM with the rest of the comment addressed (rest == ignore my comment on the ...
3 years, 10 months ago (2017-02-23 17:47:16 UTC) #45
erikchen
https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm File base/allocator/allocator_interception_mac.mm (right): https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm#newcode351 base/allocator/allocator_interception_mac.mm:351: for (unsigned int i = 0; i < count; ...
3 years, 10 months ago (2017-02-23 20:06:45 UTC) #48
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/2703803004/300001
3 years, 10 months ago (2017-02-23 20:07:08 UTC) #49
erikchen
Chatted with erg@. His response was that given that wasn't a blocker for this CL ...
3 years, 10 months ago (2017-02-23 20:13:12 UTC) #51
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm File base/allocator/allocator_interception_mac.mm (right): https://codereview.chromium.org/2703803004/diff/240001/base/allocator/allocator_interception_mac.mm#newcode351 base/allocator/allocator_interception_mac.mm:351: for (unsigned int i = 0; i < count; ...
3 years, 10 months ago (2017-02-23 21:06:07 UTC) #52
commit-bot: I haz the power
Failed to apply patch for base/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-23 21:26:11 UTC) #54
erikchen
> okay for me, but you just added an extra layer of indirection when accessing ...
3 years, 10 months ago (2017-02-24 09:00:54 UTC) #55
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/2703803004/320001
3 years, 10 months ago (2017-02-24 09:12:27 UTC) #58
commit-bot: I haz the power
3 years, 10 months ago (2017-02-24 10:05:25 UTC) #61
Message was sent while issue was closed.
Committed patchset #16 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/7a54483e22a7e4578870d144b7d4...

Powered by Google App Engine
This is Rietveld 408576698