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

Side by Side Diff: src/libplatform/default-platform.cc

Issue 2367603002: [tracing] Support ConvertableToTraceFormat argument type. (Closed)
Patch Set: Fix layout tests failures & reland. Created 4 years, 2 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 | « src/libplatform/default-platform.h ('k') | src/libplatform/tracing/trace-object.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 V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project 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 "src/libplatform/default-platform.h" 5 #include "src/libplatform/default-platform.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 9
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 172
173 bool DefaultPlatform::IdleTasksEnabled(Isolate* isolate) { return false; } 173 bool DefaultPlatform::IdleTasksEnabled(Isolate* isolate) { return false; }
174 174
175 175
176 double DefaultPlatform::MonotonicallyIncreasingTime() { 176 double DefaultPlatform::MonotonicallyIncreasingTime() {
177 return base::TimeTicks::HighResolutionNow().ToInternalValue() / 177 return base::TimeTicks::HighResolutionNow().ToInternalValue() /
178 static_cast<double>(base::Time::kMicrosecondsPerSecond); 178 static_cast<double>(base::Time::kMicrosecondsPerSecond);
179 } 179 }
180 180
181
182 uint64_t DefaultPlatform::AddTraceEvent( 181 uint64_t DefaultPlatform::AddTraceEvent(
183 char phase, const uint8_t* category_enabled_flag, const char* name, 182 char phase, const uint8_t* category_enabled_flag, const char* name,
184 const char* scope, uint64_t id, uint64_t bind_id, int num_args, 183 const char* scope, uint64_t id, uint64_t bind_id, int num_args,
185 const char** arg_names, const uint8_t* arg_types, 184 const char** arg_names, const uint8_t* arg_types,
186 const uint64_t* arg_values, unsigned int flags) { 185 const uint64_t* arg_values,
186 std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
187 unsigned int flags) {
187 if (tracing_controller_) { 188 if (tracing_controller_) {
188 return tracing_controller_->AddTraceEvent( 189 return tracing_controller_->AddTraceEvent(
189 phase, category_enabled_flag, name, scope, id, bind_id, num_args, 190 phase, category_enabled_flag, name, scope, id, bind_id, num_args,
190 arg_names, arg_types, arg_values, flags); 191 arg_names, arg_types, arg_values, arg_convertables, flags);
191 } 192 }
192 193
193 return 0; 194 return 0;
194 } 195 }
195 196
196 void DefaultPlatform::UpdateTraceEventDuration( 197 void DefaultPlatform::UpdateTraceEventDuration(
197 const uint8_t* category_enabled_flag, const char* name, uint64_t handle) { 198 const uint8_t* category_enabled_flag, const char* name, uint64_t handle) {
198 if (tracing_controller_) { 199 if (tracing_controller_) {
199 tracing_controller_->UpdateTraceEventDuration(category_enabled_flag, name, 200 tracing_controller_->UpdateTraceEventDuration(category_enabled_flag, name,
200 handle); 201 handle);
(...skipping 19 matching lines...) Expand all
220 tracing::TracingController* tracing_controller) { 221 tracing::TracingController* tracing_controller) {
221 tracing_controller_ = tracing_controller; 222 tracing_controller_ = tracing_controller;
222 } 223 }
223 224
224 size_t DefaultPlatform::NumberOfAvailableBackgroundThreads() { 225 size_t DefaultPlatform::NumberOfAvailableBackgroundThreads() {
225 return static_cast<size_t>(thread_pool_size_); 226 return static_cast<size_t>(thread_pool_size_);
226 } 227 }
227 228
228 } // namespace platform 229 } // namespace platform
229 } // namespace v8 230 } // namespace v8
OLDNEW
« no previous file with comments | « src/libplatform/default-platform.h ('k') | src/libplatform/tracing/trace-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698