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

Side by Side Diff: test/cctest/test-trace-event.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 | « test/cctest/libplatform/test-tracing.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include <stdlib.h> 4 #include <stdlib.h>
5 #include <string.h> 5 #include <string.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/list.h" 9 #include "src/list.h"
10 #include "src/list-inl.h" 10 #include "src/list-inl.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool IdleTasksEnabled(Isolate* isolate) override { return false; } 64 bool IdleTasksEnabled(Isolate* isolate) override { return false; }
65 65
66 bool PendingIdleTask() { return false; } 66 bool PendingIdleTask() { return false; }
67 67
68 void PerformIdleTask(double idle_time_in_seconds) {} 68 void PerformIdleTask(double idle_time_in_seconds) {}
69 69
70 bool PendingDelayedTask() { return false; } 70 bool PendingDelayedTask() { return false; }
71 71
72 void PerformDelayedTask() {} 72 void PerformDelayedTask() {}
73 73
74 uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag, 74 uint64_t AddTraceEvent(
75 const char* name, const char* scope, uint64_t id, 75 char phase, const uint8_t* category_enabled_flag, const char* name,
76 uint64_t bind_id, int num_args, const char** arg_names, 76 const char* scope, uint64_t id, uint64_t bind_id, int num_args,
77 const uint8_t* arg_types, const uint64_t* arg_values, 77 const char** arg_names, const uint8_t* arg_types,
78 unsigned int flags) override { 78 const uint64_t* arg_values,
79 std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
80 unsigned int flags) override {
79 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id, 81 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id,
80 bind_id, num_args, flags); 82 bind_id, num_args, flags);
81 trace_object_list_.Add(to); 83 trace_object_list_.Add(to);
82 return 0; 84 return 0;
83 } 85 }
84 86
85 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, 87 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
86 const char* name, uint64_t handle) override {} 88 const char* name, uint64_t handle) override {}
87 89
88 const uint8_t* GetCategoryGroupEnabled(const char* name) override { 90 const uint8_t* GetCategoryGroupEnabled(const char* name) override {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name); 275 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name);
274 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id); 276 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id);
275 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase); 277 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase);
276 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name); 278 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name);
277 CHECK_EQ(TRACE_EVENT_PHASE_LEAVE_CONTEXT, GET_TRACE_OBJECT(2)->phase); 279 CHECK_EQ(TRACE_EVENT_PHASE_LEAVE_CONTEXT, GET_TRACE_OBJECT(2)->phase);
278 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name); 280 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name);
279 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id); 281 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id);
280 282
281 i::V8::SetPlatformForTesting(old_platform); 283 i::V8::SetPlatformForTesting(old_platform);
282 } 284 }
OLDNEW
« no previous file with comments | « test/cctest/libplatform/test-tracing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698