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

Issue 1487403002: Remove allocator_extension_thunks since this layer is not required (Closed)

Created:
5 years ago by ssid
Modified:
5 years ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, Dai Mikurube (NOT FULLTIME), extensions-reviews_chromium.org, tfarina, tracing+reviews_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove allocator_extension_thunks since this layer is not required crrev.com/10239012 added thunks target. There allocator_shim.cc wanted to set function pointers when heap_init_() was called. To do this, allocator_shim.cc (part of allocator target) used thunks to store the functions without actually depending on thunks (relying on the fact that base would finally link thunks). Since allocator_shim.cc included thunks.h and allocator_unittests included allocator, but not base, thunks target was introduced to avoid depending on base. Current situation is that thunks is no longer used by the shim layer and not used by allocator_unittests either (after shim was removed). Thunks was left around for no reason. See design doc in the bug. This CL removes the target and stores the functions in base. Landed as https://codereview.chromium.org/1487403002/ BUG=564618

Patch Set 1 #

Patch Set 2 : Fix #

Patch Set 3 : Hm, do not remove allocator_unittests. #

Total comments: 4

Patch Set 4 : Remove NULL #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -167 lines) Patch
M base/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M base/allocator/BUILD.gn View 1 chunk +0 lines, -12 lines 0 comments Download
M base/allocator/allocator.gyp View 1 2 3 chunks +0 lines, -37 lines 0 comments Download
M base/allocator/allocator_extension.h View 2 chunks +11 lines, -3 lines 1 comment Download
M base/allocator/allocator_extension.cc View 1 2 3 1 chunk +18 lines, -12 lines 0 comments Download
M base/allocator/allocator_extension_thunks.h View 1 1 chunk +0 lines, -32 lines 0 comments Download
M base/allocator/allocator_extension_thunks.cc View 1 1 chunk +0 lines, -43 lines 0 comments Download
M base/base.gyp View 2 chunks +0 lines, -2 lines 0 comments Download
M base/trace_event/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 2 chunks +19 lines, -23 lines 0 comments Download
M tools/gn/bootstrap/bootstrap.py View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 27 (7 generated)
ssid
PTAL, Thanks.
5 years ago (2015-12-02 12:12:38 UTC) #2
ssid
Fixed bots now.
5 years ago (2015-12-02 13:28:44 UTC) #3
Primiano Tucci (use gerrit)
This CL overall looks good, adding +wfh and +thakis for an authoritative review. In the ...
5 years ago (2015-12-02 13:50:42 UTC) #7
ssid
On 2015/12/02 13:50:42, Primiano Tucci wrote: > This CL overall looks good, adding +wfh and ...
5 years ago (2015-12-02 14:03:34 UTC) #9
Nico
This lgtm (unless jamesr shouts). But please check that allocator_unittests still builds and passes on ...
5 years ago (2015-12-02 14:21:31 UTC) #10
ssid
On 2015/12/02 14:21:31, Nico wrote: > This lgtm (unless jamesr shouts). But please check that ...
5 years ago (2015-12-02 14:31:24 UTC) #11
Nico
Do they pass too? On Wed, Dec 2, 2015 at 9:31 AM, <ssid@chromium.org> wrote: > ...
5 years ago (2015-12-02 14:34:38 UTC) #12
Primiano Tucci (use gerrit)
On 2015/12/02 14:34:38, Nico wrote: > Do they pass too? O__o They are definitely not ...
5 years ago (2015-12-02 15:37:44 UTC) #13
Nico
As far as I know it's not run anywhere, yes (hence me wanting to delete ...
5 years ago (2015-12-02 15:40:46 UTC) #14
ssid
On 2015/12/02 15:40:46, Nico wrote: > As far as I know it's not run anywhere, ...
5 years ago (2015-12-02 15:44:23 UTC) #15
Primiano Tucci (use gerrit)
On 2015/12/02 15:40:46, Nico wrote: > As far as I know it's not run anywhere, ...
5 years ago (2015-12-02 15:48:46 UTC) #16
Nico
Oh, the win_clang bots are special in that they build all targets -- most other ...
5 years ago (2015-12-02 15:48:48 UTC) #17
Nico
I think it's much easier to move these (2 iirc? very few for sure) tests ...
5 years ago (2015-12-02 15:57:41 UTC) #18
Primiano Tucci (use gerrit)
On 2015/12/02 15:57:41, Nico wrote: > I think it's much easier to move these (2 ...
5 years ago (2015-12-02 15:59:11 UTC) #19
ssid
On 2015/12/02 15:48:48, Nico wrote: > Oh, the win_clang bots are special in that they ...
5 years ago (2015-12-02 16:13:00 UTC) #20
Primiano Tucci (use gerrit)
On 2015/12/02 16:13:00, ssid wrote: > I guess we want to just test if it ...
5 years ago (2015-12-02 16:14:52 UTC) #21
Will Harris
The allocator_unittests are mostly to test edge case behavior that is specific to tcmalloc - ...
5 years ago (2015-12-02 17:49:18 UTC) #22
ssid
On 2015/12/02 17:49:18, Will Harris wrote: > The allocator_unittests are mostly to test edge case ...
5 years ago (2015-12-02 18:13:07 UTC) #23
jamesr
This scheme was to support having a runtime-switchable allocator on windows which was removed some ...
5 years ago (2015-12-02 18:56:45 UTC) #24
Will Harris
5 years ago (2015-12-04 21:09:02 UTC) #25
lgtm

One thing I noticed while reviewing this CL is that the comment in
content_main_runner.cc where the functions are initialized from tcmalloc is
wrong - _heap_init in the allocator shim no longer sets up these thunks, since
they are now completely tcmalloc specific

https://code.google.com/p/chromium/codesearch#chromium/src/content/app/conten...

https://codereview.chromium.org/1487403002/diff/60001/base/allocator/allocato...
File base/allocator/allocator_extension.h (right):

https://codereview.chromium.org/1487403002/diff/60001/base/allocator/allocato...
base/allocator/allocator_extension.h:25: // malloc implementation.
nit: s/malloc/allocator/

Powered by Google App Engine
This is Rietveld 408576698