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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 11094041: Merge 161048 - Disable tcmalloc profile files. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 | « chrome/renderer/chrome_render_process_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
===================================================================
--- chrome/renderer/chrome_render_process_observer.cc (revision 161050)
+++ chrome/renderer/chrome_render_process_observer.cc (working copy)
@@ -220,12 +220,6 @@
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetCacheCapacities, OnSetCacheCapacities)
IPC_MESSAGE_HANDLER(ChromeViewMsg_ClearCache, OnClearCache)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup)
-#if defined(USE_TCMALLOC)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_SetTcmallocHeapProfiling,
- OnSetTcmallocHeapProfiling)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_WriteTcmallocHeapProfile,
- OnWriteTcmallocHeapProfile)
-#endif
IPC_MESSAGE_HANDLER(ChromeViewMsg_GetV8HeapStats, OnGetV8HeapStats)
IPC_MESSAGE_HANDLER(ChromeViewMsg_GetCacheResourceStats,
OnGetCacheResourceStats)
@@ -273,40 +267,6 @@
RenderThread::Get()->Send(new ChromeViewHostMsg_ResourceTypeStats(stats));
}
-#if defined(USE_TCMALLOC)
-void ChromeRenderProcessObserver::OnSetTcmallocHeapProfiling(
- bool profiling, const std::string& filename_prefix) {
-#if !defined(OS_WIN)
- // TODO(stevenjb): Create MallocExtension wrappers for HeapProfile functions.
- if (profiling)
- HeapProfilerStart(filename_prefix.c_str());
- else
- HeapProfilerStop();
-#endif
-}
-
-void ChromeRenderProcessObserver::OnWriteTcmallocHeapProfile(
- const FilePath::StringType& filename) {
-#if !defined(OS_WIN)
- // TODO(stevenjb): Create MallocExtension wrappers for HeapProfile functions.
- if (!IsHeapProfilerRunning())
- return;
- char* profile = GetHeapProfile();
- if (!profile) {
- LOG(WARNING) << "Unable to get heap profile.";
- return;
- }
- // The render process can not write to a file, so copy the result into
- // a string and pass it to the handler (which runs on the browser host).
- std::string result(profile);
- delete profile;
- RenderThread::Get()->Send(
- new ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK(filename, result));
-#endif
-}
-
-#endif
-
void ChromeRenderProcessObserver::OnSetFieldTrialGroup(
const std::string& field_trial_name,
const std::string& group_name) {
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698