diff options
author | rockot <rockot@chromium.org> | 2015-09-17 12:28:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-17 19:30:05 +0000 |
commit | 2f830359d1735966e8a2fe2b63bd0912b2cea58b (patch) | |
tree | b44e4d9d3696255a073f5e7e46352063934e5123 | |
parent | d9f47c12d046441bdc681c850b83c4bcc6b887fa (diff) | |
download | chromium_src-2f830359d1735966e8a2fe2b63bd0912b2cea58b.zip chromium_src-2f830359d1735966e8a2fe2b63bd0912b2cea58b.tar.gz chromium_src-2f830359d1735966e8a2fe2b63bd0912b2cea58b.tar.bz2 |
Restore missing HEAP_PROFILE definitions
These were unintentionally removed by
https://crrev.com/5747a19cad8feb463125f3c80376d3c535f25523
and are still needed for builds with profiling enabled.
R=thakis@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1344373003
Cr-Commit-Position: refs/heads/master@{#349467}
-rw-r--r-- | third_party/tcmalloc/chromium/src/heap-profiler.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/tcmalloc/chromium/src/heap-profiler.cc b/third_party/tcmalloc/chromium/src/heap-profiler.cc index 43a6f35..693023a 100644 --- a/third_party/tcmalloc/chromium/src/heap-profiler.cc +++ b/third_party/tcmalloc/chromium/src/heap-profiler.cc @@ -80,6 +80,32 @@ #endif #endif +#if defined(__ANDROID__) || defined(ANDROID) +// On android, there are no environment variables. +// Instead, we use system properties, set via: +// adb shell setprop prop_name prop_value +// From <sys/system_properties.h>, +// PROP_NAME_MAX 32 +// PROP_VALUE_MAX 92 +#define HEAPPROFILE "heapprof" +#define HEAP_PROFILE_ALLOCATION_INTERVAL "heapprof.allocation_interval" +#define HEAP_PROFILE_DEALLOCATION_INTERVAL "heapprof.deallocation_interval" +#define HEAP_PROFILE_INUSE_INTERVAL "heapprof.inuse_interval" +#define HEAP_PROFILE_TIME_INTERVAL "heapprof.time_interval" +#define HEAP_PROFILE_MMAP_LOG "heapprof.mmap_log" +#define HEAP_PROFILE_MMAP "heapprof.mmap" +#define HEAP_PROFILE_ONLY_MMAP "heapprof.only_mmap" +#else // defined(__ANDROID__) || defined(ANDROID) +#define HEAPPROFILE "HEAPPROFILE" +#define HEAP_PROFILE_ALLOCATION_INTERVAL "HEAP_PROFILE_ALLOCATION_INTERVAL" +#define HEAP_PROFILE_DEALLOCATION_INTERVAL "HEAP_PROFILE_DEALLOCATION_INTERVAL" +#define HEAP_PROFILE_INUSE_INTERVAL "HEAP_PROFILE_INUSE_INTERVAL" +#define HEAP_PROFILE_TIME_INTERVAL "HEAP_PROFILE_TIME_INTERVAL" +#define HEAP_PROFILE_MMAP_LOG "HEAP_PROFILE_MMAP_LOG" +#define HEAP_PROFILE_MMAP "HEAP_PROFILE_MMAP" +#define HEAP_PROFILE_ONLY_MMAP "HEAP_PROFILE_ONLY_MMAP" +#endif // defined(__ANDROID__) || defined(ANDROID) + using STL_NAMESPACE::string; using STL_NAMESPACE::sort; |