Index: chrome/browser/ui/webui/about_ui.cc |
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc |
index 84921a40bdb45ed183df85a5488d32676f708161..bcc4c7b542797f087e234675dcf85c619b4e833b 100644 |
--- a/chrome/browser/ui/webui/about_ui.cc |
+++ b/chrome/browser/ui/webui/about_ui.cc |
@@ -46,7 +46,9 @@ |
#include "chrome/common/net/gaia/google_service_auth_error.h" |
#include "chrome/common/render_messages.h" |
#include "chrome/common/url_constants.h" |
+#include "content/public/browser/browser_child_process_host_iterator.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/child_process_data.h" |
#include "content/public/browser/plugin_service.h" |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/render_view_host.h" |
@@ -54,6 +56,7 @@ |
#include "content/public/browser/web_ui.h" |
#include "content/public/common/content_client.h" |
#include "content/public/common/process_type.h" |
+#include "content/common/child_process_messages.h" |
#include "crypto/nss_util.h" |
#include "googleurl/src/gurl.h" |
#include "grit/browser_resources.h" |
@@ -788,6 +791,12 @@ class AboutDnsHandler : public base::RefCountedThreadSafe<AboutDnsHandler> { |
}; |
#if defined(USE_TCMALLOC) |
+void RequestTcmallocStatsFromChildProcesses() { |
+ for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { |
+ iter.Send(new ChildProcessMsg_GetTcmallocStats); |
+ } |
+} |
+ |
std::string AboutTcmalloc() { |
std::string data; |
AboutTcmallocOutputsType* outputs = |
@@ -821,13 +830,18 @@ std::string AboutTcmalloc() { |
MallocExtension::instance()->GetStats(buffer, sizeof(buffer)); |
std::string browser("Browser"); |
AboutTcmallocOutputs::GetInstance()->SetOutput(browser, buffer); |
+ |
+ // FIXME: Why do I have to iterate over both this and |
jam
2012/04/18 23:06:41
1) chrome code uses TODOs not FIXME :)
2) there ar
|
+ // BrowserChildProcessHostIterator? |
content::RenderProcessHost::iterator |
it(content::RenderProcessHost::AllHostsIterator()); |
while (!it.IsAtEnd()) { |
- it.GetCurrentValue()->Send(new ChromeViewMsg_GetRendererTcmalloc); |
+ it.GetCurrentValue()->Send(new ChildProcessMsg_GetTcmallocStats); |
it.Advance(); |
} |
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind( |
jam
2012/04/18 23:06:41
nit: i think this is non standard tabbing per the
|
+ &RequestTcmallocStatsFromChildProcesses)); |
return data; |
} |
#endif |