OLD | NEW |
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 #ifndef V8_V8_PLATFORM_H_ | 5 #ifndef V8_V8_PLATFORM_H_ |
6 #define V8_V8_PLATFORM_H_ | 6 #define V8_V8_PLATFORM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 * tracing and the category of the particular trace are enabled. It is not | 148 * tracing and the category of the particular trace are enabled. It is not |
149 * advisable to call this function on its own; it is really only meant to be | 149 * advisable to call this function on its own; it is really only meant to be |
150 * used by the trace macros. The returned handle can be used by | 150 * used by the trace macros. The returned handle can be used by |
151 * UpdateTraceEventDuration to update the duration of COMPLETE events. | 151 * UpdateTraceEventDuration to update the duration of COMPLETE events. |
152 */ | 152 */ |
153 virtual uint64_t AddTraceEvent( | 153 virtual uint64_t AddTraceEvent( |
154 char phase, const uint8_t* category_enabled_flag, const char* name, | 154 char phase, const uint8_t* category_enabled_flag, const char* name, |
155 const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, | 155 const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, |
156 const char** arg_names, const uint8_t* arg_types, | 156 const char** arg_names, const uint8_t* arg_types, |
157 const uint64_t* arg_values, unsigned int flags) { | 157 const uint64_t* arg_values, unsigned int flags) { |
158 return AddTraceEvent(phase, category_enabled_flag, name, id, bind_id, | |
159 num_args, arg_names, arg_types, arg_values, flags); | |
160 } | |
161 | |
162 /** | |
163 * This method will soon be depreacted in favor of the version with the 'const | |
164 * char* scope' parameter. If you do not already override this method, please | |
165 * implement the other version instead. | |
166 */ | |
167 // TODO(fmeawad): Remove once all embedders implement the scope version. | |
168 virtual uint64_t AddTraceEvent( | |
169 char phase, const uint8_t* category_enabled_flag, const char* name, | |
170 uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names, | |
171 const uint8_t* arg_types, const uint64_t* arg_values, | |
172 unsigned int flags) { | |
173 return 0; | 158 return 0; |
174 } | 159 } |
175 | 160 |
176 /** | 161 /** |
177 * Sets the duration field of a COMPLETE trace event. It must be called with | 162 * Sets the duration field of a COMPLETE trace event. It must be called with |
178 * the handle returned from AddTraceEvent(). | 163 * the handle returned from AddTraceEvent(). |
179 **/ | 164 **/ |
180 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, | 165 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, |
181 const char* name, uint64_t handle) {} | 166 const char* name, uint64_t handle) {} |
182 }; | 167 }; |
183 | 168 |
184 } // namespace v8 | 169 } // namespace v8 |
185 | 170 |
186 #endif // V8_V8_PLATFORM_H_ | 171 #endif // V8_V8_PLATFORM_H_ |
OLD | NEW |