Skip to content

Commit

Permalink
Revert 183089
Browse files Browse the repository at this point in the history
Needs owner review

> Linux: add option to use system tcmalloc (off by default)
> 
> This changes things only for Linux distros, Google Chrome
> will continue to use bundled tcmalloc.
> 
> TBR=darin
> 
> BUG=174634
> 
> Review URL: https://codereview.chromium.org/12224030

TBR=phajdan.jr@chromium.org
Review URL: https://codereview.chromium.org/12298019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183104 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jschuh@chromium.org committed Feb 18, 2013
1 parent 65011fa commit 597323a
Show file tree
Hide file tree
Showing 7 changed files with 443 additions and 510 deletions.
936 changes: 438 additions & 498 deletions base/allocator/allocator.gyp

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion chrome/chrome_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
'common_net',
'chrome_resources.gyp:chrome_resources',
'chrome_resources.gyp:chrome_strings',
'../base/allocator/allocator.gyp:allocator_headers',
'../components/components.gyp:visitedlink_renderer',
'../content/content.gyp:content_renderer',
'../net/net.gyp:net',
Expand Down
4 changes: 1 addition & 3 deletions content/app/content_main_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@ class ContentMainRunnerImpl : public ContentMainRunner {
base::allocator::SetGetStatsFunction(GetStatsThunk);
base::allocator::SetReleaseFreeMemoryFunction(ReleaseFreeMemoryThunk);

#if !defined(USE_SYSTEM_TCMALLOC)
// Provide optional hook for monitoring allocation quantities on a
// per-thread basis. Only set the hook if the environment indicates this
// needs to be enabled.
Expand All @@ -560,8 +559,7 @@ class ContentMainRunnerImpl : public ContentMainRunner {
MallocExtension::GetBytesAllocatedOnCurrentThread,
tracked_objects::TIME_SOURCE_TYPE_TCMALLOC);
}
#endif // !defined(USE_SYSTEM_TCMALLOC)
#endif // !defined(OS_MACOSX) && defined(USE_TCMALLOC)
#endif

// On Android,
// - setlocale() is not supported.
Expand Down
1 change: 0 additions & 1 deletion content/content_app.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
'..',
],
'dependencies': [
'../base/allocator/allocator.gyp:allocator_headers',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../crypto/crypto.gyp:crypto',
Expand Down
1 change: 0 additions & 1 deletion content/content_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

{
'dependencies': [
'../base/allocator/allocator.gyp:allocator_headers',
'../jingle/jingle.gyp:jingle_glue',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
Expand Down
4 changes: 2 additions & 2 deletions content/renderer/devtools/devtools_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void DevToolsAgent::clearBrowserCookies() {
Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
}

#if defined(USE_TCMALLOC) && !defined(OS_WIN) && !defined(USE_SYSTEM_TCMALLOC)
#if defined(USE_TCMALLOC) && !defined(OS_WIN)
static void AllocationVisitor(void* data, const void* ptr) {
typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
Visitor* visitor = reinterpret_cast<Visitor*>(data);
Expand All @@ -138,7 +138,7 @@ static void AllocationVisitor(void* data, const void* ptr) {
#endif

void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) {
#if defined(USE_TCMALLOC) && !defined(OS_WIN) && !defined(USE_SYSTEM_TCMALLOC)
#if defined(USE_TCMALLOC) && !defined(OS_WIN)
IterateAllocatedObjects(&AllocationVisitor, visitor);
#endif
}
Expand Down
6 changes: 2 additions & 4 deletions tools/generate_shim_headers/generate_shim_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def GeneratorMain(argv):
parser.add_option('--headers-root', action='append')
parser.add_option('--define', action='append')
parser.add_option('--output-directory')
parser.add_option('--prefix', default='')
parser.add_option('--use-include-next', action='store_true')
parser.add_option('--outputs', action='store_true')
parser.add_option('--generate', action='store_true')
Expand Down Expand Up @@ -81,11 +80,10 @@ def GeneratorMain(argv):
for header in include_before.split(':'):
f.write('#include %s\n' % header)

include_target = options.prefix + header_filename
if options.use_include_next:
f.write('#include_next <%s>\n' % include_target)
f.write('#include_next <%s>\n' % header_filename)
else:
f.write('#include <%s>\n' % include_target)
f.write('#include <%s>\n' % header_filename)

if include_after:
for header in include_after.split(':'):
Expand Down

0 comments on commit 597323a

Please sign in to comment.