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

Side by Side Diff: include/v8-platform.h

Issue 1704253002: Reland: Add Scoped Context Info (Isolate) to V8 Traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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 | « no previous file | src/api.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 #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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 /** 145 /**
146 * Adds a trace event to the platform tracing system. This function call is 146 * Adds a trace event to the platform tracing system. This function call is
147 * usually the result of a TRACE_* macro from trace_event_common.h when 147 * usually the result of a TRACE_* macro from trace_event_common.h when
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,
156 const char** arg_names, const uint8_t* arg_types,
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,
155 uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names, 170 uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names,
156 const uint8_t* arg_types, const uint64_t* arg_values, 171 const uint8_t* arg_types, const uint64_t* arg_values,
157 unsigned int flags) { 172 unsigned int flags) {
158 return 0; 173 return 0;
159 } 174 }
160 175
161 /** 176 /**
162 * Sets the duration field of a COMPLETE trace event. It must be called with 177 * Sets the duration field of a COMPLETE trace event. It must be called with
163 * the handle returned from AddTraceEvent(). 178 * the handle returned from AddTraceEvent().
164 **/ 179 **/
165 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, 180 virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
166 const char* name, uint64_t handle) {} 181 const char* name, uint64_t handle) {}
167 }; 182 };
168 183
169 } // namespace v8 184 } // namespace v8
170 185
171 #endif // V8_V8_PLATFORM_H_ 186 #endif // V8_V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698