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

Side by Side Diff: content/renderer/render_thread_impl.h

Issue 2566043004: Add renderer memory metrics (Closed)
Patch Set: Fixed test failure Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 void RegisterPendingFrameCreate(int routing_id, 475 void RegisterPendingFrameCreate(int routing_id,
476 mojom::FrameRequest frame, 476 mojom::FrameRequest frame,
477 mojom::FrameHostPtr host); 477 mojom::FrameHostPtr host);
478 478
479 mojom::StoragePartitionService* GetStoragePartitionService(); 479 mojom::StoragePartitionService* GetStoragePartitionService();
480 480
481 // ChildMemoryCoordinatorDelegate implementation. 481 // ChildMemoryCoordinatorDelegate implementation.
482 void OnTrimMemoryImmediately() override; 482 void OnTrimMemoryImmediately() override;
483 483
484 struct RendererMemoryMetrics {
485 size_t partition_alloc_kb;
486 size_t blink_gc_kb;
487 size_t malloc_mb;
488 size_t discardable_kb;
489 size_t v8_main_thread_isolate_mb;
490 size_t total_allocated_mb;
491 size_t non_discardable_total_allocated_mb;
492 size_t total_allocated_per_render_view_mb;
493 };
494 void GetRendererMemoryMetrics(RendererMemoryMetrics* memory_metrics) const;
495
484 protected: 496 protected:
485 RenderThreadImpl( 497 RenderThreadImpl(
486 const InProcessChildThreadParams& params, 498 const InProcessChildThreadParams& params,
487 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler, 499 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler,
488 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue); 500 const scoped_refptr<base::SingleThreadTaskRunner>& resource_task_queue);
489 RenderThreadImpl( 501 RenderThreadImpl(
490 std::unique_ptr<base::MessageLoop> main_message_loop, 502 std::unique_ptr<base::MessageLoop> main_message_loop,
491 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler); 503 std::unique_ptr<blink::scheduler::RendererScheduler> scheduler);
492 504
493 private: 505 private:
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); 771 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl);
760 }; 772 };
761 773
762 #if defined(COMPILER_MSVC) 774 #if defined(COMPILER_MSVC)
763 #pragma warning(pop) 775 #pragma warning(pop)
764 #endif 776 #endif
765 777
766 } // namespace content 778 } // namespace content
767 779
768 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ 780 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698