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

Side by Side Diff: gpu/command_buffer/service/gpu_tracer.cc

Issue 2359503002: Let TRACE_EVENT_XXX_WITH_TIMESTAMP accept TimeTicks instead of int64_t (Closed)
Patch Set: Rebase Created 4 years, 3 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
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 "gpu/command_buffer/service/gpu_tracer.h" 5 #include "gpu/command_buffer/service/gpu_tracer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const std::string& category, 67 const std::string& category,
68 const std::string& name, 68 const std::string& name,
69 int64_t start_time, 69 int64_t start_time,
70 int64_t end_time) { 70 int64_t end_time) {
71 DCHECK(source >= 0 && source < NUM_TRACER_SOURCES); 71 DCHECK(source >= 0 && source < NUM_TRACER_SOURCES);
72 TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2( 72 TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP2(
73 TRACE_DISABLED_BY_DEFAULT("gpu.device"), 73 TRACE_DISABLED_BY_DEFAULT("gpu.device"),
74 name.c_str(), 74 name.c_str(),
75 local_trace_device_id_, 75 local_trace_device_id_,
76 named_thread_.GetThreadId(), 76 named_thread_.GetThreadId(),
77 start_time, 77 base::TimeTicks::FromInternalValue(start_time),
78 "gl_category", 78 "gl_category",
79 category.c_str(), 79 category.c_str(),
80 "channel", 80 "channel",
81 kGpuTraceSourceNames[source]); 81 kGpuTraceSourceNames[source]);
82 82
83 // Time stamps are inclusive, since the traces are durations we subtract 83 // Time stamps are inclusive, since the traces are durations we subtract
84 // 1 microsecond from the end time to make the trace markers show up cleaner. 84 // 1 microsecond from the end time to make the trace markers show up cleaner.
85 TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2( 85 TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP2(
86 TRACE_DISABLED_BY_DEFAULT("gpu.device"), 86 TRACE_DISABLED_BY_DEFAULT("gpu.device"),
87 name.c_str(), 87 name.c_str(),
88 local_trace_device_id_, 88 local_trace_device_id_,
89 named_thread_.GetThreadId(), 89 named_thread_.GetThreadId(),
90 end_time - 1, 90 base::TimeTicks::FromInternalValue(end_time - 1),
91 "gl_category", 91 "gl_category",
92 category.c_str(), 92 category.c_str(),
93 "channel", 93 "channel",
94 kGpuTraceSourceNames[source]); 94 kGpuTraceSourceNames[source]);
95 ++local_trace_device_id_; 95 ++local_trace_device_id_;
96 } 96 }
97 97
98 void TraceOutputter::TraceServiceBegin(GpuTracerSource source, 98 void TraceOutputter::TraceServiceBegin(GpuTracerSource source,
99 const std::string& category, 99 const std::string& category,
100 const std::string& name) { 100 const std::string& name) {
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 while (!finished_traces_.empty()) { 418 while (!finished_traces_.empty()) {
419 finished_traces_.front()->Destroy(have_context); 419 finished_traces_.front()->Destroy(have_context);
420 finished_traces_.pop_front(); 420 finished_traces_.pop_front();
421 } 421 }
422 } 422 }
423 423
424 } // namespace gles2 424 } // namespace gles2
425 } // namespace gpu 425 } // namespace gpu
OLDNEW
« no previous file with comments | « content/renderer/devtools/v8_sampling_profiler.cc ('k') | third_party/WebKit/Source/platform/TraceEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698