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

Side by Side Diff: test/cctest/test-trace-event.cc

Issue 1744733002: [Tracing] Remove deprecated AddTraceEvent (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/heap/test-incremental-marking.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const char* name, const char* scope, uint64_t id, 75 const char* name, const char* scope, uint64_t id,
76 uint64_t bind_id, int num_args, const char** arg_names, 76 uint64_t bind_id, int num_args, const char** arg_names,
77 const uint8_t* arg_types, const uint64_t* arg_values, 77 const uint8_t* arg_types, const uint64_t* arg_values,
78 unsigned int flags) override { 78 unsigned int flags) override {
79 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id, 79 MockTraceObject* to = new MockTraceObject(phase, std::string(name), id,
80 bind_id, num_args, flags); 80 bind_id, num_args, flags);
81 trace_object_list_.Add(to); 81 trace_object_list_.Add(to);
82 return 0; 82 return 0;
83 } 83 }
84 84
85 // TODO(fmeawad): Remove once all embedders implement the scope version.
86 uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag,
87 const char* name, uint64_t id, uint64_t bind_id,
88 int num_args, const char** arg_names,
89 const uint8_t* arg_types, const uint64_t* arg_values,
90 unsigned int flags) override {
91 return 0;
92 }
93
94 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, 85 void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
95 const char* name, uint64_t handle) override {} 86 const char* name, uint64_t handle) override {}
96 87
97 const uint8_t* GetCategoryGroupEnabled(const char* name) override { 88 const uint8_t* GetCategoryGroupEnabled(const char* name) override {
98 if (strcmp(name, "v8-cat")) { 89 if (strcmp(name, "v8-cat")) {
99 static uint8_t no = 0; 90 static uint8_t no = 0;
100 return &no; 91 return &no;
101 } else { 92 } else {
102 static uint8_t yes = 0x7; 93 static uint8_t yes = 0x7;
103 return &yes; 94 return &yes;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name); 273 CHECK_EQ("Isolate", GET_TRACE_OBJECT(0)->name);
283 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id); 274 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(0)->id);
284 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase); 275 CHECK_EQ(TRACE_EVENT_PHASE_COMPLETE, GET_TRACE_OBJECT(1)->phase);
285 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name); 276 CHECK_EQ("e", GET_TRACE_OBJECT(1)->name);
286 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);
287 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name); 278 CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name);
288 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id); 279 CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id);
289 280
290 i::V8::SetPlatformForTesting(old_platform); 281 i::V8::SetPlatformForTesting(old_platform);
291 } 282 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698