Remove deprecated tracing methods from v8::Platform
Embedders should implement them via the v8::TracingController interface and return a pointer to an instance of that interface from v8::Platform::GetTracingController BUG=v8:6511 R=fmeawad@chromium.org Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: If17b013c7ce4cf540a186767fd6e1b5e00e0dab2 Reviewed-on: https://chromium-review.googlesource.com/554770 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#47549}
This commit is contained in:
parent
7d2c222e32
commit
03850446dc
@ -226,80 +226,6 @@ class Platform {
|
||||
* Returns an instance of a v8::TracingController. This must be non-nullptr.
|
||||
*/
|
||||
virtual TracingController* GetTracingController() = 0;
|
||||
|
||||
// DEPRECATED methods, use TracingController interface instead.
|
||||
|
||||
/**
|
||||
* Called by TRACE_EVENT* macros, don't call this directly.
|
||||
* The name parameter is a category group for example:
|
||||
* TRACE_EVENT0("v8,parse", "V8.Parse")
|
||||
* The pointer returned points to a value with zero or more of the bits
|
||||
* defined in CategoryGroupEnabledFlags.
|
||||
**/
|
||||
virtual const uint8_t* GetCategoryGroupEnabled(const char* name) {
|
||||
static uint8_t no = 0;
|
||||
return &no;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the category group name of the given category_enabled_flag pointer.
|
||||
* Usually used while serliazing TRACE_EVENTs.
|
||||
**/
|
||||
virtual const char* GetCategoryGroupName(
|
||||
const uint8_t* category_enabled_flag) {
|
||||
static const char dummy[] = "dummy";
|
||||
return dummy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a trace event to the platform tracing system. This function call is
|
||||
* usually the result of a TRACE_* macro from trace_event_common.h when
|
||||
* tracing and the category of the particular trace are enabled. It is not
|
||||
* advisable to call this function on its own; it is really only meant to be
|
||||
* used by the trace macros. The returned handle can be used by
|
||||
* UpdateTraceEventDuration to update the duration of COMPLETE events.
|
||||
*/
|
||||
virtual uint64_t AddTraceEvent(
|
||||
char phase, const uint8_t* category_enabled_flag, const char* name,
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values, unsigned int flags) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a trace event to the platform tracing system. This function call is
|
||||
* usually the result of a TRACE_* macro from trace_event_common.h when
|
||||
* tracing and the category of the particular trace are enabled. It is not
|
||||
* advisable to call this function on its own; it is really only meant to be
|
||||
* used by the trace macros. The returned handle can be used by
|
||||
* UpdateTraceEventDuration to update the duration of COMPLETE events.
|
||||
*/
|
||||
virtual uint64_t AddTraceEvent(
|
||||
char phase, const uint8_t* category_enabled_flag, const char* name,
|
||||
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
||||
const char** arg_names, const uint8_t* arg_types,
|
||||
const uint64_t* arg_values,
|
||||
std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
|
||||
unsigned int flags) {
|
||||
return AddTraceEvent(phase, category_enabled_flag, name, scope, id, bind_id,
|
||||
num_args, arg_names, arg_types, arg_values, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the duration field of a COMPLETE trace event. It must be called with
|
||||
* the handle returned from AddTraceEvent().
|
||||
**/
|
||||
virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
|
||||
const char* name, uint64_t handle) {}
|
||||
|
||||
typedef v8::TracingController::TraceStateObserver TraceStateObserver;
|
||||
|
||||
/** Adds tracing state change observer. */
|
||||
virtual void AddTraceStateObserver(TraceStateObserver*) {}
|
||||
|
||||
/** Removes tracing state change observer. */
|
||||
virtual void RemoveTraceStateObserver(TraceStateObserver*) {}
|
||||
};
|
||||
|
||||
} // namespace v8
|
||||
|
Loading…
Reference in New Issue
Block a user