summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS3
-rw-r--r--base/allocator/allocator.gyp24
-rw-r--r--build/all.gyp9
3 files changed, 32 insertions, 4 deletions
diff --git a/DEPS b/DEPS
index e351258..032488c 100644
--- a/DEPS
+++ b/DEPS
@@ -230,6 +230,9 @@ deps_os = {
"src/third_party/swig/linux":
"/trunk/deps/third_party/swig/linux@" + Var("swig_revision"),
+
+ "src/third_party/libunwind":
+ "/trunk/deps/third_party/libunwind@47716",
},
}
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index a1ad04d..033161e 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -178,7 +178,7 @@
'allocator_shim.cc',
'generic_allocators.cc',
- 'win_allocator.cc',
+ 'win_allocator.cc',
],
# sources! means that these are not compiled directly.
'sources!': [
@@ -224,7 +224,6 @@
'<(tcmalloc_dir)/src/stacktrace_libunwind-inl.h',
'<(tcmalloc_dir)/src/stacktrace_powerpc-inl.h',
'<(tcmalloc_dir)/src/stacktrace_win32-inl.h',
- '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
'<(tcmalloc_dir)/src/stacktrace_x86-inl.h',
'<(tcmalloc_dir)/src/stacktrace_x86_64-inl.h',
'<(tcmalloc_dir)/src/tcmalloc_guard.h',
@@ -284,6 +283,7 @@
'<(tcmalloc_dir)/src/base/vdso_support.h',
'<(tcmalloc_dir)/src/maybe_threads.cc',
'<(tcmalloc_dir)/src/maybe_threads.h',
+ '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
'<(tcmalloc_dir)/src/symbolize.h',
'<(tcmalloc_dir)/src/system-alloc.cc',
'<(tcmalloc_dir)/src/system-alloc.h',
@@ -339,6 +339,24 @@
'-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
'-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
]},
+ 'conditions': [
+ # In 64 bit mode, use libunwind to get stacktraces in TCMalloc if we
+ # don't have the frame pointer.
+ # gcc will disable the frame pointer for O2 optimized 64 bit build.
+ [ 'target_arch=="x64"', {
+ 'configurations': {
+ 'Release_Base': {
+ 'defines': [
+ 'NO_FRAME_POINTER',
+ 'HAVE_LIBUNWIND_H=1',
+ ],
+ },
+ },
+ 'dependencies': [
+ '../../third_party/libunwind/libunwind.gyp:libunwind',
+ ],
+ }],
+ ],
}],
[ 'linux_use_debugallocation==1', {
'sources!': [
diff --git a/build/all.gyp b/build/all.gyp
index 8e7c5de..a77e2c0 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -83,6 +83,13 @@
'../tools/xdisplaycheck/xdisplaycheck.gyp:*',
'../net/third_party/nss/nss.gyp:*',
],
+ 'conditions': [
+ ['target_arch=="x64"', {
+ 'dependencies': [
+ '../third_party/libunwind/libunwind.gyp:*',
+ ],
+ }],
+ ],
}],
['OS=="win"', {
'conditions': [