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

Unified Diff: content/renderer/render_thread_impl.h

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Created 4 years, 3 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
Index: content/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index cb03a378ca551c6f46100a6153101763938ac77a..cd1e2651b25bbeed19947e79bdf511e01f1e78b9 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -21,6 +21,7 @@
#include "base/strings/string16.h"
#include "base/threading/thread_checker.h"
#include "base/timer/timer.h"
+#include "base/trace_event/malloc_dump_provider.h"
#include "build/build_config.h"
#include "content/child/child_thread_impl.h"
#include "content/child/memory/child_memory_coordinator_impl.h"
@@ -38,6 +39,7 @@
#include "net/base/network_change_notifier.h"
#include "third_party/WebKit/public/platform/WebConnectionType.h"
#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h"
+#include "third_party/WebKit/public/web/WebMemoryStatistics.h"
#include "ui/gfx/native_widget_types.h"
#if defined(OS_MACOSX)
@@ -474,6 +476,12 @@ class CONTENT_EXPORT RenderThreadImpl
bool OnControlMessageReceived(const IPC::Message& msg) override;
void OnProcessBackgrounded(bool backgrounded) override;
void OnProcessPurgeAndSuspend() override;
+ void OnDumpMemoryUsage();
+
+ blink::WebMemoryStatistics blink_memory_stats_;
+ base::trace_event::MallocStatistics malloc_stats_;
+ size_t discardable_stats_;
+
void RecordAction(const base::UserMetricsAction& action) override;
void RecordComputedAction(const std::string& action) override;

Powered by Google App Engine
This is Rietveld 408576698