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

Issue 1469843002: Remove dependency on allocator from 'content' targets (Closed)

Created:
5 years, 1 month ago by ssid
Modified:
4 years, 10 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, Dai Mikurube (NOT FULLTIME), mlamouri+watch-content_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org, jam, rickyz+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, tracing+reviews_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@unify_allocator1_2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove dependency on allocator from 'content' targets Current content targets that are libraries depend on allocator. Only the final executable should decide the allocator. More over this would create two copies of tcmalloc library in linux in shared library build, one from content and one from the chrome executable (target:chrome_initial). This Cl removes the dependency from content, and creates a shim layer for tcmalloc that is built in allocator target, which will be included by the executable. This is done by creating a weak function which will be replaced by the shim layer. Many places in code uses the tcmalloc functions for reasons like, getting stats or managing heap profiler. Some use allocator_extension, while other use the functions directly by depending on tcmalloc. All these have been redirected to use the allocator_extension in base, and this is initialized using the weak function described above and some clean-up of allocator extension. This CL does not actually remove the dependency in gyp and gn build files since there are other targets that depend on content and all these executables should be added with allocator dependency. So, it will be added in seperate CL. I am still not sure if the allocator_extension_thunks target is even necessary. This will be cleaned-up in follow up CLs. BUG=

Patch Set 1 #

Patch Set 2 : Fix build #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -222 lines) Patch
M base/allocator/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
M base/allocator/allocator.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M base/allocator/allocator_extension.h View 2 chunks +32 lines, -16 lines 1 comment Download
M base/allocator/allocator_extension.cc View 1 2 chunks +76 lines, -24 lines 1 comment Download
M base/allocator/allocator_extension_thunks.h View 1 chunk +30 lines, -18 lines 0 comments Download
M base/allocator/allocator_extension_thunks.cc View 1 chunk +9 lines, -40 lines 0 comments Download
A base/allocator/tcmalloc_extension.cc View 1 chunk +72 lines, -0 lines 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 2 chunks +20 lines, -23 lines 0 comments Download
M base/trace_event/trace_event_memory.h View 3 chunks +3 lines, -18 lines 0 comments Download
M base/trace_event/trace_event_memory.cc View 4 chunks +5 lines, -12 lines 0 comments Download
M base/trace_event/trace_event_memory_unittest.cc View 1 3 chunks +8 lines, -8 lines 0 comments Download
M content/app/content_main_runner.cc View 5 chunks +19 lines, -54 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 chunk +1 line, -3 lines 0 comments Download
M content/browser/renderer_host/memory_benchmark_message_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/zygote_host/zygote_host_impl_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/child_thread_impl.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/memory_benchmarking_extension.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 10 (7 generated)
ssid
+brettw +wfh PTAL. Background context: We are trying to introduce a shim layer for allocator ...
5 years, 1 month ago (2015-11-23 13:22:33 UTC) #4
Primiano Tucci (use gerrit)
temporarily removing wfh and brett. Rationale: I see what's going on here (layering being violated ...
5 years ago (2015-11-25 12:47:17 UTC) #6
Primiano Tucci (use gerrit)
5 years ago (2015-11-25 12:49:48 UTC) #9
Ehm pressed enter to soon.

The last statement was intended to be
"Will re-add OWNERS once we had a broader discussion."

Powered by Google App Engine
This is Rietveld 408576698