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

Unified Diff: third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h

Issue 14642011: Introduce functions to set options in tcmalloc's heap profiler in Chrome for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated the comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
diff --git a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
index a2fe805e9199e3193bb809334ad9f5ee92d9bd6d..2ebc865dbb3eb836b19838985052f85e7e17c8f5 100644
--- a/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
+++ b/third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h
@@ -118,6 +118,21 @@ typedef void (*AddressVisitor)(void* data, const void* ptr);
PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback,
void* data);
+#if defined(OS_ANDROID)
+// They should be called BEFORE starting heap profiler by HeapProfilerStart.
+//
+// These functions are introduced to use heap profiler in Chrome for Android
+// instead of setting environment variables. Android applications don't have
+// a good way to use environment variables.
+
+// Note that int is used instead of int64 because base/basictypes.h should not
+// be included under gperftools/.
+
+PERFTOOLS_DLL_DECL void HeapProfilerSetTimeInterval(int time_interval);
+PERFTOOLS_DLL_DECL void HeapProfilerSetMmapProfile(bool mmap_profile);
+PERFTOOLS_DLL_DECL void HeapProfilerSetDeepHeapProfile(bool deep_heap_profile);
+#endif // defined(OS_ANDROID)
+
#ifdef __cplusplus
} // extern "C"
#endif
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698