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

Side by Side Diff: cc/debug/devtools_instrumentation.h

Issue 144463016: cc: add more devtools instrumentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | cc/scheduler/scheduler.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_ 5 #ifndef CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
6 #define CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_ 6 #define CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 9
10 namespace cc { 10 namespace cc {
11 namespace devtools_instrumentation { 11 namespace devtools_instrumentation {
12 12
13 namespace internal { 13 namespace internal {
14 const char kCategory[] = "cc,devtools"; 14 const char kCategory[] = "cc,devtools";
15 const char kFrameId[] = "frameId"; 15 const char kFrameId[] = "frameId";
16 const char kLayerId[] = "layerId"; 16 const char kLayerId[] = "layerId";
17 const char kLayerTreeId[] = "layerTreeId"; 17 const char kLayerTreeId[] = "layerTreeId";
18 const char kPixelRefId[] = "pixelRefId"; 18 const char kPixelRefId[] = "pixelRefId";
19 19
20 const char kImageDecodeTask[] = "ImageDecodeTask"; 20 const char kImageDecodeTask[] = "ImageDecodeTask";
21 const char kBeginFrame[] = "BeginFrame"; 21 const char kBeginFrame[] = "BeginFrame";
22 const char kActivateLayerTree[] = "ActivateLayerTree"; 22 const char kActivateLayerTree[] = "ActivateLayerTree";
23 const char kRequestMainThreadFrame[] = "RequestMainThreadFrame";
24 const char kDrawFrame[] = "DrawFrame";
23 } // namespace internal 25 } // namespace internal
24 26
25 const char kRasterTask[] = "RasterTask"; 27 const char kRasterTask[] = "RasterTask";
26 const char kPaintSetup[] = "PaintSetup"; 28 const char kPaintSetup[] = "PaintSetup";
27 29
28 class ScopedLayerTask { 30 class ScopedLayerTask {
29 public: 31 public:
30 ScopedLayerTask(const char* event_name, int layer_id) 32 ScopedLayerTask(const char* event_name, int layer_id)
31 : event_name_(event_name) { 33 : event_name_(event_name) {
32 TRACE_EVENT_BEGIN1(internal::kCategory, event_name_, 34 TRACE_EVENT_BEGIN1(internal::kCategory, event_name_,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 internal::kFrameId, frame_id); 96 internal::kFrameId, frame_id);
95 } 97 }
96 98
97 inline void didBeginFrame(int layer_tree_host_id) { 99 inline void didBeginFrame(int layer_tree_host_id) {
98 TRACE_EVENT_INSTANT1(internal::kCategory, 100 TRACE_EVENT_INSTANT1(internal::kCategory,
99 internal::kBeginFrame, 101 internal::kBeginFrame,
100 TRACE_EVENT_SCOPE_THREAD, 102 TRACE_EVENT_SCOPE_THREAD,
101 internal::kLayerTreeId, layer_tree_host_id); 103 internal::kLayerTreeId, layer_tree_host_id);
102 } 104 }
103 105
106 inline void didDrawFrame(int layer_tree_host_id) {
danakj 2014/02/11 17:58:13 why do functions in this file have webkit style na
107 TRACE_EVENT_INSTANT1(internal::kCategory,
108 internal::kDrawFrame,
109 TRACE_EVENT_SCOPE_THREAD,
110 internal::kLayerTreeId,
111 layer_tree_host_id);
112 }
113
114 inline void didRequestMainThreadFrame(int layer_tree_host_id) {
115 TRACE_EVENT_INSTANT1(internal::kCategory,
116 internal::kRequestMainThreadFrame,
117 TRACE_EVENT_SCOPE_THREAD,
118 internal::kLayerTreeId,
119 layer_tree_host_id);
120 }
121
104 } // namespace devtools_instrumentation 122 } // namespace devtools_instrumentation
105 } // namespace cc 123 } // namespace cc
106 124
107 #endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_ 125 #endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698