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

Unified Diff: chrome/browser/ui/webui/about_ui.cc

Issue 10041017: Show gpu process stats in about:tcmalloc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with correct (?) layering Created 8 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 | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698