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

Issue 14321006: Adds TCMalloc support for Android. (Closed)

Created:
7 years, 7 months ago by bulach
Modified:
7 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, erikwright+watch_chromium.org, jam, dmikurube+memory_chromium.org
Visibility:
Public.

Description

Adds TCMalloc support for Android. This is part of the effort to bring TCMalloc to android. The first goal is to get instrumentation to facilitate integration with DMP and memory profiling. This is not yet intended for full production usage as the default allocator. BUG=162208 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201524

Patch Set 1 #

Total comments: 8

Patch Set 2 : System properties #

Patch Set 3 : System properties inside tcmalloc #

Patch Set 4 : Stacktrace #

Patch Set 5 : Just my patch #

Total comments: 41

Patch Set 6 : Dai's comments #

Total comments: 17

Patch Set 7 : Further comments #

Total comments: 4

Patch Set 8 : Peter's comments #

Total comments: 4

Patch Set 9 : Last nits #

Patch Set 10 : Rebased #

Total comments: 7

Patch Set 11 : Always use phtread_once #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -88 lines) Patch
M base/allocator/allocator.gyp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M build/build_config.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M content/content_shell.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/tcmalloc/README.chromium View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/tcmalloc/chromium/src/base/sysinfo.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/config.h View 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/tcmalloc/chromium/src/config_android.h View 1 2 3 4 5 6 5 chunks +8 lines, -5 lines 0 comments Download
M third_party/tcmalloc/chromium/src/getpc.h View 1 2 3 4 5 6 3 chunks +13 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -2 lines 0 comments Download
M third_party/tcmalloc/chromium/src/maybe_threads.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -1 line 0 comments Download
M third_party/tcmalloc/chromium/src/profiler.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/tcmalloc/chromium/src/stacktrace_android-inl.h View 1 2 3 4 5 6 7 8 3 chunks +67 lines, -74 lines 0 comments Download
M third_party/tcmalloc/chromium/src/stacktrace_config.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
bulach
warning! this is *nowhere* near ready. :) however, adding android_use_tcmalloc=1 to GYP_DEFINES, it allows building ...
7 years, 7 months ago (2013-04-29 15:43:14 UTC) #1
digit1
lgtm - seems a good start though :-) For ucontext, see what I've done for ...
7 years, 7 months ago (2013-04-29 16:11:27 UTC) #2
Peter Beverloo
A few minor drive-by nits. Cool to see this being worked on! https://codereview.chromium.org/14321006/diff/1/content/content_shell.gypi File content/content_shell.gypi ...
7 years, 7 months ago (2013-04-29 17:03:30 UTC) #3
Dai Mikurube (NOT FULLTIME)
almost looks good, but not sure of the crash. added a comment about debugallocation in ...
7 years, 7 months ago (2013-04-29 17:28:00 UTC) #4
bulach
forgot to mention that comments so far have been addressed.. it's still WIP, but anyways.. ...
7 years, 7 months ago (2013-04-30 18:43:07 UTC) #5
bulach
dai: patchset #5 contains just my patch. locally I have it on top of all ...
7 years, 7 months ago (2013-05-02 17:42:04 UTC) #6
Dai Mikurube (NOT FULLTIME)
Thanks, bulach@ Some nit comments. https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/base/commandlineflags.h File third_party/tcmalloc/chromium/src/base/commandlineflags.h (right): https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/base/commandlineflags.h#newcode3 third_party/tcmalloc/chromium/src/base/commandlineflags.h:3: // nit: unnecessary deletion ...
7 years, 7 months ago (2013-05-03 08:52:59 UTC) #7
Dai Mikurube (NOT FULLTIME)
Some more comments on stacktrace_android-inl.h. https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/stacktrace_android-inl.h File third_party/tcmalloc/chromium/src/stacktrace_android-inl.h (right): https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/stacktrace_android-inl.h#newcode41 third_party/tcmalloc/chromium/src/stacktrace_android-inl.h:41: #include <unwind.h> Import comments ...
7 years, 7 months ago (2013-05-03 11:02:35 UTC) #8
bulach
thanks dai! all comments addressed, ptal. https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/base/commandlineflags.h File third_party/tcmalloc/chromium/src/base/commandlineflags.h (right): https://codereview.chromium.org/14321006/diff/26001/third_party/tcmalloc/chromium/src/base/commandlineflags.h#newcode3 third_party/tcmalloc/chromium/src/base/commandlineflags.h:3: // On 2013/05/03 ...
7 years, 7 months ago (2013-05-07 14:55:51 UTC) #9
Dai Mikurube (NOT FULLTIME)
Sorry for adding some more comments that I didn't in the last look. Mostly nits. ...
7 years, 7 months ago (2013-05-08 14:53:25 UTC) #10
bulach
thanks dai! all addressed, ptal https://codereview.chromium.org/14321006/diff/40001/third_party/tcmalloc/chromium/src/base/sysinfo.cc File third_party/tcmalloc/chromium/src/base/sysinfo.cc (right): https://codereview.chromium.org/14321006/diff/40001/third_party/tcmalloc/chromium/src/base/sysinfo.cc#newcode506 third_party/tcmalloc/chromium/src/base/sysinfo.cc:506: #if defined(__linux__) && !defined(__ANDROID__) ...
7 years, 7 months ago (2013-05-08 16:09:10 UTC) #11
Peter Beverloo
Two minor nits :-) https://codereview.chromium.org/14321006/diff/58001/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h File third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h (right): https://codereview.chromium.org/14321006/diff/58001/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h#newcode58 third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h:58: #define STD_BACK_ALLOC Should this read ...
7 years, 7 months ago (2013-05-08 16:17:13 UTC) #12
bulach
thanks peter! addressed. https://codereview.chromium.org/14321006/diff/58001/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h File third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h (right): https://codereview.chromium.org/14321006/diff/58001/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h#newcode58 third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h:58: #define STD_BACK_ALLOC On 2013/05/08 16:17:13, Peter ...
7 years, 7 months ago (2013-05-08 18:22:48 UTC) #13
Dai Mikurube (NOT FULLTIME)
LGTM with a very small nit. :) Let's show it to appropriate OWNERs (maybe willchan@ ...
7 years, 7 months ago (2013-05-09 16:29:28 UTC) #14
Dai Mikurube (NOT FULLTIME)
https://codereview.chromium.org/14321006/diff/69001/content/content_shell.gypi File content/content_shell.gypi (right): https://codereview.chromium.org/14321006/diff/69001/content/content_shell.gypi#newcode201 content/content_shell.gypi:201: }], Ah, but finally, I'm not sure it should ...
7 years, 7 months ago (2013-05-09 17:04:50 UTC) #15
bulach
+willchan: base/ and third_party/tcmalloc +jochen: content/ thanks dai! remaining nits addressed, changed the description, sending ...
7 years, 7 months ago (2013-05-09 17:33:58 UTC) #16
jochen (gone - plz use gerrit)
content lgtm
7 years, 7 months ago (2013-05-09 18:14:12 UTC) #17
Dai Mikurube (NOT FULLTIME)
common.gypi might need rebasing. :)
7 years, 7 months ago (2013-05-15 15:38:29 UTC) #18
Jeffrey Yasskin
https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc File third_party/tcmalloc/chromium/src/maybe_threads.cc (right): https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc#newcode128 third_party/tcmalloc/chromium/src/maybe_threads.cc:128: // Android's pthread_once_t is typedef volatile and memcmp only ...
7 years, 7 months ago (2013-05-21 17:09:43 UTC) #19
Dai Mikurube (NOT FULLTIME)
https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc File third_party/tcmalloc/chromium/src/maybe_threads.cc (right): https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc#newcode130 third_party/tcmalloc/chromium/src/maybe_threads.cc:130: if (memcmp(const_cast<const void*>(reinterpret_cast<const volatile void*>( On 2013/05/21 17:09:43, Jeffrey ...
7 years, 7 months ago (2013-05-21 17:21:46 UTC) #20
Dai Mikurube (NOT FULLTIME)
https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc File third_party/tcmalloc/chromium/src/maybe_threads.cc (right): https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc#newcode130 third_party/tcmalloc/chromium/src/maybe_threads.cc:130: if (memcmp(const_cast<const void*>(reinterpret_cast<const volatile void*>( On 2013/05/21 17:21:46, Dai ...
7 years, 7 months ago (2013-05-21 17:26:12 UTC) #21
willchan no longer on Chromium
I asked Jeffrey for his help here since he understands that way better than I ...
7 years, 7 months ago (2013-05-21 18:06:28 UTC) #22
digit1
https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc File third_party/tcmalloc/chromium/src/maybe_threads.cc (right): https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc#newcode128 third_party/tcmalloc/chromium/src/maybe_threads.cc:128: // Android's pthread_once_t is typedef volatile and memcmp only ...
7 years, 7 months ago (2013-05-21 18:16:24 UTC) #23
bulach
thanks everyone! I think I removed the contentious issue, ptal. https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc File third_party/tcmalloc/chromium/src/maybe_threads.cc (right): https://codereview.chromium.org/14321006/diff/87001/third_party/tcmalloc/chromium/src/maybe_threads.cc#newcode128 ...
7 years, 7 months ago (2013-05-22 07:41:41 UTC) #24
Jeffrey Yasskin
maybe_threads.cc lgtm
7 years, 7 months ago (2013-05-22 07:55:30 UTC) #25
Dai Mikurube (NOT FULLTIME)
Still lgtm. Thanks!
7 years, 7 months ago (2013-05-22 08:16:50 UTC) #26
digit1
lgtm, thanks :)
7 years, 7 months ago (2013-05-22 09:30:49 UTC) #27
bulach
thanks everyone! :) CQing..
7 years, 7 months ago (2013-05-22 09:31:41 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/14321006/99001
7 years, 7 months ago (2013-05-22 09:33:14 UTC) #29
commit-bot: I haz the power
7 years, 7 months ago (2013-05-22 15:17:17 UTC) #30
Message was sent while issue was closed.
Change committed as 201524

Powered by Google App Engine
This is Rietveld 408576698