|
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=
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:
Total messages: 10 (7 generated)
|