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

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

Issue 60353002: cc: add DevTools instrumentation for impl-side frames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tree_id -> layer_tree_host_id, also use StaticAtomicSequenceNumber to allocate it Created 7 years, 1 month 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.h » ('j') | cc/trees/layer_tree_host.cc » ('J')
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 kLayerId[] = "layerId"; 16 const char kLayerId[] = "layerId";
16 const char kLayerTreeId[] = "layerTreeId"; 17 const char kLayerTreeId[] = "layerTreeId";
17 const char kPixelRefId[] = "pixelRefId"; 18 const char kPixelRefId[] = "pixelRefId";
18 19
19 const char kImageDecodeTask[] = "ImageDecodeTask"; 20 const char kImageDecodeTask[] = "ImageDecodeTask";
20 } 21 const char kBeginFrame[] = "BeginFrame";
22 const char kCommitMainThreadFrame[] = "CommitMainThreadFrame";
23 } // namespace internal
21 24
22 const char kPaintLayer[] = "PaintLayer"; 25 const char kPaintLayer[] = "PaintLayer";
23 const char kRasterTask[] = "RasterTask"; 26 const char kRasterTask[] = "RasterTask";
24 const char kPaintSetup[] = "PaintSetup"; 27 const char kPaintSetup[] = "PaintSetup";
25 const char kUpdateLayer[] = "UpdateLayer"; 28 const char kUpdateLayer[] = "UpdateLayer";
26 29
27 class ScopedLayerTask { 30 class ScopedLayerTask {
28 public: 31 public:
29 ScopedLayerTask(const char* event_name, int layer_id) 32 ScopedLayerTask(const char* event_name, int layer_id)
30 : event_name_(event_name) { 33 : event_name_(event_name) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 : base::debug::TraceScopedTrackableObject<int>( 80 : base::debug::TraceScopedTrackableObject<int>(
78 internal::kCategory, 81 internal::kCategory,
79 internal::kLayerId, 82 internal::kLayerId,
80 layer_id) { 83 layer_id) {
81 } 84 }
82 85
83 private: 86 private:
84 DISALLOW_COPY_AND_ASSIGN(ScopedLayerObjectTracker); 87 DISALLOW_COPY_AND_ASSIGN(ScopedLayerObjectTracker);
85 }; 88 };
86 89
90 inline void didCommitMainThreadFrame(uint64 tree_id, int frame_id) {
nduca 2013/11/12 05:51:18 oh i get it now, i gave you bad advice... you wan
91 TRACE_EVENT_INSTANT2(internal::kCategory,
92 internal::kCommitMainThreadFrame,
93 TRACE_EVENT_SCOPE_THREAD,
94 internal::kLayerTreeId, tree_id,
95 internal::kFrameId, frame_id);
96 }
97
98 inline void didBeginFrame(uint64 tree_id) {
99 TRACE_EVENT_INSTANT1(internal::kCategory,
100 internal::kBeginFrame,
101 TRACE_EVENT_SCOPE_THREAD,
102 internal::kLayerTreeId, tree_id);
nduca 2013/11/12 05:51:18 would it be better to include the frame id on this
103 }
104
87 } // namespace devtools_instrumentation 105 } // namespace devtools_instrumentation
88 } // namespace cc 106 } // namespace cc
89 107
90 #endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_ 108 #endif // CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler.h » ('j') | cc/trees/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698