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

Issue 2658723007: Hook up allocator shim on mac. (Closed)

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

Description

Hook up allocator shim on mac. This CL should have no behavioral effect, since the relevant code is not enabled yet. allocator_shim_override_mac_symbols.h intercepts heap allocations using the newly introduced APIs in allocator_interception_mac.h and redirects them to the allocator shim. This eventually forwards to AllocatorDispatch::default_dispatch, which in turns calls the original malloc zone functions.. BUG=665567 Review-Url: https://codereview.chromium.org/2658723007 Cr-Commit-Position: refs/heads/master@{#447705} Committed: https://chromium.googlesource.com/chromium/src/+/0d0395aeb25b9ab1422ab547f976d049a14e192f

Patch Set 1 #

Patch Set 2 : Clean up, working. #

Patch Set 3 : clang format. #

Patch Set 4 : Rebase. #

Total comments: 28

Patch Set 5 : Hook up free definite size. #

Patch Set 6 : Comments from primiano. #

Patch Set 7 : Comments from primiano. #

Total comments: 4

Patch Set 8 : Comments from primiano. #

Patch Set 9 : Remove CallUnshimmed. #

Total comments: 2

Patch Set 10 : remove a debugging test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+547 lines, -66 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M base/allocator/allocator_interception_mac.h View 1 2 3 4 5 2 chunks +23 lines, -5 lines 0 comments Download
M base/allocator/allocator_interception_mac.mm View 1 2 3 4 5 5 chunks +51 lines, -13 lines 0 comments Download
M base/allocator/allocator_shim.h View 1 2 3 4 4 chunks +19 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim.cc View 1 2 3 4 5 6 3 chunks +45 lines, -3 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_glibc.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
A base/allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc View 1 2 3 4 5 7 8 1 chunk +88 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_default_dispatch_to_winheap.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
A base/allocator/allocator_shim_override_mac_symbols.h View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
M base/allocator/allocator_shim_unittest.cc View 1 2 3 4 5 6 7 8 9 14 chunks +130 lines, -31 lines 0 comments Download
M base/debug/thread_heap_usage_tracker.cc View 1 2 3 4 1 chunk +39 lines, -3 lines 0 comments Download
M base/debug/thread_heap_usage_tracker_unittest.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 1 2 3 4 5 1 chunk +42 lines, -7 lines 0 comments Download
M build/config/allocator.gni View 1 2 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 67 (42 generated)
erikchen
primiano: Please review.
3 years, 10 months ago (2017-01-27 22:42:53 UTC) #13
DmitrySkiba
Continuing from 2601573002: > I hooked up free_definite_size. Yes, it's hooked, but what I meant ...
3 years, 10 months ago (2017-01-27 23:00:53 UTC) #15
erikchen
> > #ifdef is not a good way of marking this as mac-only, since that ...
3 years, 10 months ago (2017-01-27 23:04:04 UTC) #16
Primiano Tucci (use gerrit)
thanks a lot for the progress here. It looks in a good state. The only ...
3 years, 10 months ago (2017-01-28 05:10:03 UTC) #23
erikchen
primiano: Please review. https://codereview.chromium.org/2658723007/diff/60001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/2658723007/diff/60001/base/BUILD.gn#newcode1149 base/BUILD.gn:1149: "allocator/allocator_shim_default_dispatch_to_zoned_malloc.cc", On 2017/01/28 05:10:02, Primiano Tucci ...
3 years, 10 months ago (2017-01-31 02:21:22 UTC) #30
DmitrySkiba
https://codereview.chromium.org/2658723007/diff/60001/base/allocator/allocator_shim_default_dispatch_to_zoned_malloc.cc File base/allocator/allocator_shim_default_dispatch_to_zoned_malloc.cc (right): https://codereview.chromium.org/2658723007/diff/60001/base/allocator/allocator_shim_default_dispatch_to_zoned_malloc.cc#newcode23 base/allocator/allocator_shim_default_dispatch_to_zoned_malloc.cc:23: auto CallUnshimmed(F ChromeMallocZone::*m, Args... args) On 2017/01/31 02:21:22, erikchen ...
3 years, 10 months ago (2017-01-31 02:33:37 UTC) #31
erikchen
> Interesting. Originally I added this because in tests some global objects were > allocating ...
3 years, 10 months ago (2017-01-31 04:10:18 UTC) #32
Primiano Tucci (use gerrit)
Everything % 1 thing looks great to me. Thanks for the patience and also thanks ...
3 years, 10 months ago (2017-01-31 17:40:05 UTC) #33
erikchen
On 2017/01/31 17:40:05, Primiano Tucci wrote: > Everything % 1 thing looks great to me. ...
3 years, 10 months ago (2017-01-31 18:25:12 UTC) #34
erikchen
https://codereview.chromium.org/2658723007/diff/120001/base/allocator/allocator_shim_unittest.cc File base/allocator/allocator_shim_unittest.cc (right): https://codereview.chromium.org/2658723007/diff/120001/base/allocator/allocator_shim_unittest.cc#newcode355 base/allocator/allocator_shim_unittest.cc:355: #endif // defined(OS_MACOSX) On 2017/01/31 17:40:05, Primiano Tucci wrote: ...
3 years, 10 months ago (2017-01-31 18:27:53 UTC) #35
erikchen
On 2017/01/31 18:27:53, erikchen wrote: > https://codereview.chromium.org/2658723007/diff/120001/base/allocator/allocator_shim_unittest.cc > File base/allocator/allocator_shim_unittest.cc (right): > > https://codereview.chromium.org/2658723007/diff/120001/base/allocator/allocator_shim_unittest.cc#newcode355 > ...
3 years, 10 months ago (2017-01-31 20:03:16 UTC) #40
erikchen
mark: Please review.
3 years, 10 months ago (2017-01-31 20:06:36 UTC) #44
Mark Mentovai
LGTM
3 years, 10 months ago (2017-01-31 20:27:05 UTC) #45
erikchen
On 2017/01/31 20:27:05, Mark Mentovai wrote: > LGTM Landing this, since I've also addressed all ...
3 years, 10 months ago (2017-01-31 22:00:34 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/2658723007/160001
3 years, 10 months ago (2017-01-31 22:01:33 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/354239)
3 years, 10 months ago (2017-01-31 22:15:26 UTC) #52
Primiano Tucci (use gerrit)
Ok I spent some time debugging ThreadHeapUsageTracker, here's what's going on. I didn't realize that ...
3 years, 10 months ago (2017-01-31 22:17:02 UTC) #53
Primiano Tucci (use gerrit)
+brettw for adding is_mac condition to build/config/allocator.gni
3 years, 10 months ago (2017-01-31 22:26:18 UTC) #55
Sigurður Ásgeirsson
On Tue, Jan 31, 2017 at 2:17 PM <primiano@chromium.org> wrote: > The possible solutions to ...
3 years, 10 months ago (2017-01-31 23:14:34 UTC) #56
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2658723007/diff/160001/base/allocator/allocator_shim_unittest.cc File base/allocator/allocator_shim_unittest.cc (right): https://codereview.chromium.org/2658723007/diff/160001/base/allocator/allocator_shim_unittest.cc#newcode250 base/allocator/allocator_shim_unittest.cc:250: TEST_F(AllocatorShimTest, asdf) { I might be a naming freak, ...
3 years, 10 months ago (2017-02-01 22:07:10 UTC) #57
erikchen
https://codereview.chromium.org/2658723007/diff/160001/base/allocator/allocator_shim_unittest.cc File base/allocator/allocator_shim_unittest.cc (right): https://codereview.chromium.org/2658723007/diff/160001/base/allocator/allocator_shim_unittest.cc#newcode250 base/allocator/allocator_shim_unittest.cc:250: TEST_F(AllocatorShimTest, asdf) { On 2017/02/01 22:07:10, Primiano Tucci wrote: ...
3 years, 10 months ago (2017-02-01 23:10:03 UTC) #58
erikchen
dpranke: Please review build/config/allocator.gni.
3 years, 10 months ago (2017-02-01 23:10:51 UTC) #60
Dirk Pranke
lgtm
3 years, 10 months ago (2017-02-02 01:33:36 UTC) #61
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/2658723007/180001
3 years, 10 months ago (2017-02-02 02:05:08 UTC) #64
commit-bot: I haz the power
3 years, 10 months ago (2017-02-02 06:18:01 UTC) #67
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/0d0395aeb25b9ab1422ab547f976...

Powered by Google App Engine
This is Rietveld 408576698