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

Unified Diff: content/public/renderer/render_thread.h

Issue 2566043004: Add renderer memory metrics (Closed)
Patch Set: Created 4 years 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/public/renderer/render_thread.h
diff --git a/content/public/renderer/render_thread.h b/content/public/renderer/render_thread.h
index 86e7e9f2f9a4c6650cf73ca011dac54afb49c630..a862bc653bc41ba343109526ad95893303e6eace 100644
--- a/content/public/renderer/render_thread.h
+++ b/content/public/renderer/render_thread.h
@@ -40,6 +40,16 @@ namespace content {
class RenderThreadObserver;
class ResourceDispatcherDelegate;
+struct RendererMemoryMetrics {
+ size_t partition_alloc_kb;
+ size_t blink_gc_kb;
+ size_t malloc_mb;
+ size_t discardable_kb;
+ size_t v8_main_thread_isolate_mb;
+ size_t total_allocated_mb;
+ size_t non_discardable_total_allocated_mb;
+};
+
class CONTENT_EXPORT RenderThread : virtual public ChildThread {
public:
// Returns the one render thread for this process. Note that this can only
@@ -104,6 +114,9 @@ class CONTENT_EXPORT RenderThread : virtual public ChildThread {
// Gets the shutdown event for the process.
virtual base::WaitableEvent* GetShutdownEvent() = 0;
+ virtual void GetRendererMemoryMetrics(
+ RendererMemoryMetrics* memory_metrics) const = 0;
+
// Retrieve the process ID of the browser process.
virtual int32_t GetClientId() = 0;
};

Powered by Google App Engine
This is Rietveld 408576698