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

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

Issue 2022983003: Roll base to 5e00da80f6adb7082d1c0e88d3274cf87cc43bc5 and tonic to f7acabb8fa6c91124486a41194eac3cd… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.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 (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 <deque> 7 #include <deque>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 named_thread_.Stop(); 44 named_thread_.Stop();
45 } 45 }
46 46
47 TraceOutputter::~TraceOutputter() { g_outputter_thread = NULL; } 47 TraceOutputter::~TraceOutputter() { g_outputter_thread = NULL; }
48 48
49 void TraceOutputter::TraceDevice(const std::string& category, 49 void TraceOutputter::TraceDevice(const std::string& category,
50 const std::string& name, 50 const std::string& name,
51 int64 start_time, 51 int64 start_time,
52 int64 end_time) { 52 int64 end_time) {
53 TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1( 53 TRACE_EVENT_COPY_BEGIN_WITH_ID_TID_AND_TIMESTAMP1(
54 TRACE_DISABLED_BY_DEFAULT("gpu.device"), 54 TRACE_DISABLED_BY_DEFAULT("gpu.device"), name.c_str(), local_trace_id_,
55 name.c_str(), 55 named_thread_.GetThreadId(), start_time, "gl_category", category.c_str());
56 local_trace_id_,
57 named_thread_.thread_id(),
58 start_time,
59 "gl_category",
60 category.c_str());
61 TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1( 56 TRACE_EVENT_COPY_END_WITH_ID_TID_AND_TIMESTAMP1(
62 TRACE_DISABLED_BY_DEFAULT("gpu.device"), 57 TRACE_DISABLED_BY_DEFAULT("gpu.device"), name.c_str(), local_trace_id_,
63 name.c_str(), 58 named_thread_.GetThreadId(), end_time, "gl_category", category.c_str());
64 local_trace_id_,
65 named_thread_.thread_id(),
66 end_time,
67 "gl_category",
68 category.c_str());
69 ++local_trace_id_; 59 ++local_trace_id_;
70 } 60 }
71 61
72 void TraceOutputter::TraceServiceBegin(const std::string& category, 62 void TraceOutputter::TraceServiceBegin(const std::string& category,
73 const std::string& name) { 63 const std::string& name) {
74 TRACE_EVENT_COPY_BEGIN1(TRACE_DISABLED_BY_DEFAULT("gpu.service"), 64 TRACE_EVENT_COPY_BEGIN1(TRACE_DISABLED_BY_DEFAULT("gpu.service"),
75 name.c_str(), "gl_category", category.c_str()); 65 name.c_str(), "gl_category", category.c_str());
76 } 66 }
77 67
78 void TraceOutputter::TraceServiceEnd(const std::string& category, 68 void TraceOutputter::TraceServiceEnd(const std::string& category,
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 void GPUTracer::IssueProcessTask() { 358 void GPUTracer::IssueProcessTask() {
369 if (finished_traces_.empty() || process_posted_) 359 if (finished_traces_.empty() || process_posted_)
370 return; 360 return;
371 361
372 process_posted_ = true; 362 process_posted_ = true;
373 PostTask(); 363 PostTask();
374 } 364 }
375 365
376 } // namespace gles2 366 } // namespace gles2
377 } // namespace gpu 367 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698