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

Side by Side Diff: chrome/browser/metrics/tracking_synchronizer.h

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 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 #ifndef CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_ 5 #ifndef CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_
6 #define CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_ 6 #define CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Send profiler_data back to callback_object_ by calling 72 // Send profiler_data back to callback_object_ by calling
73 // DecrementPendingProcessesAndSendData which records that we are waiting 73 // DecrementPendingProcessesAndSendData which records that we are waiting
74 // for one less profiler data from renderer or browser child process for the 74 // for one less profiler data from renderer or browser child process for the
75 // given sequence number. This method is accessible on UI thread. 75 // given sequence number. This method is accessible on UI thread.
76 virtual void OnProfilerDataCollected( 76 virtual void OnProfilerDataCollected(
77 int sequence_number, 77 int sequence_number,
78 const tracked_objects::ProcessDataSnapshot& profiler_data, 78 const tracked_objects::ProcessDataSnapshot& profiler_data,
79 content::ProcessType process_type) OVERRIDE; 79 content::ProcessType process_type) OVERRIDE;
80 80
81 #if defined(USE_TCMALLOC)
82 virtual void OnTcmallocStatsCollected(
83 base::ProcessId pid,
84 content::ProcessType process_type,
85 const std::string& output) OVERRIDE;
86 #endif
87
81 // Establish a new sequence_number_, and use it to notify all the processes of 88 // Establish a new sequence_number_, and use it to notify all the processes of
82 // the need to supply, to the browser, their tracking data. It also registers 89 // the need to supply, to the browser, their tracking data. It also registers
83 // |callback_object| in |outstanding_requests_| map. Return the 90 // |callback_object| in |outstanding_requests_| map. Return the
84 // sequence_number_ that was used. This method is accessible on UI thread. 91 // sequence_number_ that was used. This method is accessible on UI thread.
85 int RegisterAndNotifyAllProcesses( 92 int RegisterAndNotifyAllProcesses(
86 const base::WeakPtr<TrackingSynchronizerObserver>& callback_object); 93 const base::WeakPtr<TrackingSynchronizerObserver>& callback_object);
87 94
88 // It finds the RequestContext for the given |sequence_number| and notifies 95 // It finds the RequestContext for the given |sequence_number| and notifies
89 // the RequestContext's |callback_object_| about the |value|. This is called 96 // the RequestContext's |callback_object_| about the |value|. This is called
90 // whenever we receive profiler data from processes. It also records that we 97 // whenever we receive profiler data from processes. It also records that we
(...skipping 18 matching lines...) Expand all
109 // last_used_sequence_number_ is the most recently used number (used to avoid 116 // last_used_sequence_number_ is the most recently used number (used to avoid
110 // reuse for a long time). 117 // reuse for a long time).
111 int last_used_sequence_number_; 118 int last_used_sequence_number_;
112 119
113 DISALLOW_COPY_AND_ASSIGN(TrackingSynchronizer); 120 DISALLOW_COPY_AND_ASSIGN(TrackingSynchronizer);
114 }; 121 };
115 122
116 } // namespace chrome_browser_metrics 123 } // namespace chrome_browser_metrics
117 124
118 #endif // CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_ 125 #endif // CHROME_BROWSER_METRICS_TRACKING_SYNCHRONIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698