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) { |