OLD | NEW |
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 Loading... |
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( | 74 uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag, |
75 char phase, const uint8_t* category_enabled_flag, const char* name, | 75 const char* name, const char* scope, uint64_t id, |
76 const char* scope, uint64_t id, uint64_t bind_id, int num_args, | 76 uint64_t bind_id, int num_args, const char** arg_names, |
77 const char** arg_names, const uint8_t* arg_types, | 77 const uint8_t* arg_types, const uint64_t* arg_values, |
78 const uint64_t* arg_values, | 78 unsigned int flags) override { |
79 std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables, | |
80 unsigned int flags) override { | |
81 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id, | 79 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id, |
82 bind_id, num_args, flags); | 80 bind_id, num_args, flags); |
83 trace_object_list_.Add(to); | 81 trace_object_list_.Add(to); |
84 return 0; | 82 return 0; |
85 } | 83 } |
86 | 84 |
87 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, | 85 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, |
88 const char* name, uint64_t handle) override {} | 86 const char* name, uint64_t handle) override {} |
89 | 87 |
90 const uint8_t* GetCategoryGroupEnabled(const char* name) override { | 88 const uint8_t* GetCategoryGroupEnabled(const char* name) override { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name); | 273 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name); |
276 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id); | 274 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id); |
277 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase); | 275 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase); |
278 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name); | 276 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name); |
279 CHECK_EQ(TRACE_EVENT_PHASE_LEAVE_CONTEXT, GET_TRACE_OBJECT(2)->phase); | 277 CHECK_EQ(TRACE_EVENT_PHASE_LEAVE_CONTEXT, GET_TRACE_OBJECT(2)->phase); |
280 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name); | 278 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name); |
281 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id); | 279 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id); |
282 | 280 |
283 i::V8::SetPlatformForTesting(old_platform); | 281 i::V8::SetPlatformForTesting(old_platform); |
284 } | 282 } |
OLD | NEW |