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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 11975048: Native memory histograms for the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios build fix Created 7 years, 10 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 | Annotate | Revision Log
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 #include "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 private: 82 private:
83 base::TimeTicks begin_process_message_; 83 base::TimeTicks begin_process_message_;
84 base::HistogramBase* const process_times_; 84 base::HistogramBase* const process_times_;
85 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver); 85 DISALLOW_COPY_AND_ASSIGN(RendererMessageLoopObserver);
86 }; 86 };
87 87
88 // For measuring memory usage after each task. Behind a command line flag. 88 // For measuring memory usage after each task. Behind a command line flag.
89 class MemoryObserver : public MessageLoop::TaskObserver { 89 class MemoryObserver : public MessageLoop::TaskObserver {
90 public: 90 public:
91 MemoryObserver() {} 91 MemoryObserver() {}
92 virtual ~MemoryObserver() {}
92 93
93 virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {} 94 virtual void WillProcessTask(base::TimeTicks time_posted) OVERRIDE {}
94 95
95 virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE { 96 virtual void DidProcessTask(base::TimeTicks time_posted) OVERRIDE {
96 HISTOGRAM_MEMORY_KB("Memory.RendererUsed", webkit_glue::MemoryUsageKB()); 97 HISTOGRAM_MEMORY_KB("Memory.RendererUsed", webkit_glue::MemoryUsageKB());
97 } 98 }
98 private: 99 private:
99 DISALLOW_COPY_AND_ASSIGN(MemoryObserver); 100 DISALLOW_COPY_AND_ASSIGN(MemoryObserver);
100 }; 101 };
101 102
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 MessageLoop::current()->Run(); 224 MessageLoop::current()->Run();
224 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 225 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
225 } 226 }
226 } 227 }
227 platform.PlatformUninitialize(); 228 platform.PlatformUninitialize();
228 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 229 TRACE_EVENT_END_ETW("RendererMain", 0, "");
229 return 0; 230 return 0;
230 } 231 }
231 232
232 } // namespace content 233 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_automation_controller.cc ('k') | tools/perf/perf_tools/memory_benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698