Commit 82f52d07 authored by lpy's avatar lpy Committed by Commit bot

[Tracing] Use TracingCategoryObserver in runtime statistics

This patch is a follow-up patch to enable runtime statistics to use
TracingCategoryObserver.

BUG=v8:5590

Review-Url: https://codereview.chromium.org/2460973003
Cr-Commit-Position: refs/heads/master@{#40745}
parent d7f82c11
...@@ -96,8 +96,7 @@ double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); ...@@ -96,8 +96,7 @@ double ClobberDoubleRegisters(double x1, double x2, double x3, double x4);
Type Name(int args_length, Object** args_object, Isolate* isolate) { \ Type Name(int args_length, Object** args_object, Isolate* isolate) { \
DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \ DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \
CLOBBER_DOUBLE_REGISTERS(); \ CLOBBER_DOUBLE_REGISTERS(); \
if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || \ if (V8_UNLIKELY(FLAG_runtime_stats)) { \
FLAG_runtime_call_stats)) { \
return Stats_##Name(args_length, args_object, isolate); \ return Stats_##Name(args_length, args_object, isolate); \
} \ } \
Arguments args(args_length, args_object); \ Arguments args(args_length, args_object); \
......
...@@ -91,8 +91,7 @@ class BuiltinArguments : public Arguments { ...@@ -91,8 +91,7 @@ class BuiltinArguments : public Arguments {
MUST_USE_RESULT Object* Builtin_##name( \ MUST_USE_RESULT Object* Builtin_##name( \
int args_length, Object** args_object, Isolate* isolate) { \ int args_length, Object** args_object, Isolate* isolate) { \
DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \ DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \
if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || \ if (V8_UNLIKELY(FLAG_runtime_stats)) { \
FLAG_runtime_call_stats)) { \
return Builtin_Impl_Stats_##name(args_length, args_object, isolate); \ return Builtin_Impl_Stats_##name(args_length, args_object, isolate); \
} \ } \
BuiltinArguments args(args_length, args_object); \ BuiltinArguments args(args_length, args_object); \
......
...@@ -23,8 +23,7 @@ CompilerDispatcherTracer::Scope::Scope(CompilerDispatcherTracer* tracer, ...@@ -23,8 +23,7 @@ CompilerDispatcherTracer::Scope::Scope(CompilerDispatcherTracer* tracer,
: tracer_(tracer), scope_id_(scope_id), num_(num) { : tracer_(tracer), scope_id_(scope_id), num_(num) {
start_time_ = MonotonicallyIncreasingTimeInMs(); start_time_ = MonotonicallyIncreasingTimeInMs();
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Enter(tracer_->runtime_call_stats_, &timer_, RuntimeCallStats::Enter(tracer_->runtime_call_stats_, &timer_,
&RuntimeCallStats::CompilerDispatcher); &RuntimeCallStats::CompilerDispatcher);
} }
...@@ -53,8 +52,7 @@ CompilerDispatcherTracer::Scope::~Scope() { ...@@ -53,8 +52,7 @@ CompilerDispatcherTracer::Scope::~Scope() {
break; break;
} }
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Leave(tracer_->runtime_call_stats_, &timer_); RuntimeCallStats::Leave(tracer_->runtime_call_stats_, &timer_);
} }
} }
......
...@@ -12,16 +12,14 @@ namespace internal { ...@@ -12,16 +12,14 @@ namespace internal {
RuntimeCallTimerScope::RuntimeCallTimerScope( RuntimeCallTimerScope::RuntimeCallTimerScope(
Isolate* isolate, RuntimeCallStats::CounterId counter_id) { Isolate* isolate, RuntimeCallStats::CounterId counter_id) {
if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats)) {
Initialize(isolate, counter_id); Initialize(isolate, counter_id);
} }
} }
RuntimeCallTimerScope::RuntimeCallTimerScope( RuntimeCallTimerScope::RuntimeCallTimerScope(
HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) { HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) {
if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats)) {
Initialize(heap_object->GetIsolate(), counter_id); Initialize(heap_object->GetIsolate(), counter_id);
} }
} }
......
...@@ -344,9 +344,8 @@ void RuntimeCallStats::Print(std::ostream& os) { ...@@ -344,9 +344,8 @@ void RuntimeCallStats::Print(std::ostream& os) {
} }
void RuntimeCallStats::Reset() { void RuntimeCallStats::Reset() {
if (!FLAG_runtime_call_stats && if (V8_LIKELY(FLAG_runtime_stats == 0)) return;
!TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED())
return;
#define RESET_COUNTER(name) this->name.Reset(); #define RESET_COUNTER(name) this->name.Reset();
FOR_EACH_MANUAL_COUNTER(RESET_COUNTER) FOR_EACH_MANUAL_COUNTER(RESET_COUNTER)
#undef RESET_COUNTER #undef RESET_COUNTER
......
...@@ -853,14 +853,13 @@ class RuntimeCallStats { ...@@ -853,14 +853,13 @@ class RuntimeCallStats {
bool in_use_; bool in_use_;
}; };
#define TRACE_RUNTIME_CALL_STATS(isolate, counter_name) \ #define TRACE_RUNTIME_CALL_STATS(isolate, counter_name) \
do { \ do { \
if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || \ if (V8_UNLIKELY(FLAG_runtime_stats)) { \
FLAG_runtime_call_stats)) { \ RuntimeCallStats::CorrectCurrentCounterId( \
RuntimeCallStats::CorrectCurrentCounterId( \ isolate->counters()->runtime_call_stats(), \
isolate->counters()->runtime_call_stats(), \ &RuntimeCallStats::counter_name); \
&RuntimeCallStats::counter_name); \ } \
} \
} while (false) } while (false)
#define TRACE_HANDLER_STATS(isolate, counter_name) \ #define TRACE_HANDLER_STATS(isolate, counter_name) \
......
...@@ -8893,7 +8893,7 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( ...@@ -8893,7 +8893,7 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
bool HOptimizedGraphBuilder::TryInlineApiFunctionCall(Call* expr, bool HOptimizedGraphBuilder::TryInlineApiFunctionCall(Call* expr,
HValue* receiver) { HValue* receiver) {
if (FLAG_runtime_call_stats) return false; if (V8_UNLIKELY(FLAG_runtime_stats)) return false;
Handle<JSFunction> function = expr->target(); Handle<JSFunction> function = expr->target();
int argc = expr->arguments()->length(); int argc = expr->arguments()->length();
SmallMapList receiver_maps; SmallMapList receiver_maps;
...@@ -8906,7 +8906,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall( ...@@ -8906,7 +8906,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall(
Call* expr, Call* expr,
HValue* receiver, HValue* receiver,
SmallMapList* receiver_maps) { SmallMapList* receiver_maps) {
if (FLAG_runtime_call_stats) return false; if (V8_UNLIKELY(FLAG_runtime_stats)) return false;
Handle<JSFunction> function = expr->target(); Handle<JSFunction> function = expr->target();
int argc = expr->arguments()->length(); int argc = expr->arguments()->length();
return TryInlineApiCall(function, receiver, receiver_maps, argc, expr->id(), return TryInlineApiCall(function, receiver, receiver_maps, argc, expr->id(),
...@@ -8916,7 +8916,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall( ...@@ -8916,7 +8916,7 @@ bool HOptimizedGraphBuilder::TryInlineApiMethodCall(
bool HOptimizedGraphBuilder::TryInlineApiGetter(Handle<Object> function, bool HOptimizedGraphBuilder::TryInlineApiGetter(Handle<Object> function,
Handle<Map> receiver_map, Handle<Map> receiver_map,
BailoutId ast_id) { BailoutId ast_id) {
if (FLAG_runtime_call_stats) return false; if (V8_UNLIKELY(FLAG_runtime_stats)) return false;
SmallMapList receiver_maps(1, zone()); SmallMapList receiver_maps(1, zone());
receiver_maps.Add(receiver_map, zone()); receiver_maps.Add(receiver_map, zone());
return TryInlineApiCall(function, return TryInlineApiCall(function,
...@@ -8940,7 +8940,7 @@ bool HOptimizedGraphBuilder::TryInlineApiCall( ...@@ -8940,7 +8940,7 @@ bool HOptimizedGraphBuilder::TryInlineApiCall(
Handle<Object> function, HValue* receiver, SmallMapList* receiver_maps, Handle<Object> function, HValue* receiver, SmallMapList* receiver_maps,
int argc, BailoutId ast_id, ApiCallType call_type, int argc, BailoutId ast_id, ApiCallType call_type,
TailCallMode syntactic_tail_call_mode) { TailCallMode syntactic_tail_call_mode) {
if (FLAG_runtime_call_stats) return false; if (V8_UNLIKELY(FLAG_runtime_stats)) return false;
if (function->IsJSFunction() && if (function->IsJSFunction() &&
Handle<JSFunction>::cast(function)->context()->native_context() != Handle<JSFunction>::cast(function)->context()->native_context() !=
top_info()->closure()->context()->native_context()) { top_info()->closure()->context()->native_context()) {
......
...@@ -2831,8 +2831,7 @@ int Shell::Main(int argc, char* argv[]) { ...@@ -2831,8 +2831,7 @@ int Shell::Main(int argc, char* argv[]) {
platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file)); platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file));
tracing_controller->Initialize(trace_buffer); tracing_controller->Initialize(trace_buffer);
if (!i::FLAG_verify_predictable) { if (!i::FLAG_verify_predictable) {
platform::SetTracingController(g_platform, tracing_controller.get()); platform::SetTracingController(g_platform, tracing_controller.release());
tracing_controller.release();
} }
} }
......
...@@ -31,8 +31,7 @@ GCTracer::Scope::Scope(GCTracer* tracer, ScopeId scope) ...@@ -31,8 +31,7 @@ GCTracer::Scope::Scope(GCTracer* tracer, ScopeId scope)
STATIC_ASSERT(FIRST_INCREMENTAL_SCOPE == 0); STATIC_ASSERT(FIRST_INCREMENTAL_SCOPE == 0);
start_time_ = tracer_->heap_->MonotonicallyIncreasingTimeInMs(); start_time_ = tracer_->heap_->MonotonicallyIncreasingTimeInMs();
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Enter( RuntimeCallStats::Enter(
tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_, tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_,
&RuntimeCallStats::GC); &RuntimeCallStats::GC);
...@@ -43,8 +42,7 @@ GCTracer::Scope::~Scope() { ...@@ -43,8 +42,7 @@ GCTracer::Scope::~Scope() {
tracer_->AddScopeSample( tracer_->AddScopeSample(
scope_, tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_); scope_, tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_);
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Leave( RuntimeCallStats::Leave(
tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_); tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_);
} }
...@@ -205,8 +203,7 @@ void GCTracer::Start(GarbageCollector collector, ...@@ -205,8 +203,7 @@ void GCTracer::Start(GarbageCollector collector,
committed_memory); committed_memory);
counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory); counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory);
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(), RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(),
&timer_, &RuntimeCallStats::GC); &timer_, &RuntimeCallStats::GC);
} }
...@@ -296,8 +293,7 @@ void GCTracer::Stop(GarbageCollector collector) { ...@@ -296,8 +293,7 @@ void GCTracer::Stop(GarbageCollector collector) {
} }
// TODO(cbruni): remove once we fully moved to a trace-based system. // TODO(cbruni): remove once we fully moved to a trace-based system.
if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || if (V8_UNLIKELY(FLAG_runtime_stats)) {
FLAG_runtime_call_stats) {
RuntimeCallStats::Leave(heap_->isolate()->counters()->runtime_call_stats(), RuntimeCallStats::Leave(heap_->isolate()->counters()->runtime_call_stats(),
&timer_); &timer_);
} }
......
...@@ -212,7 +212,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( ...@@ -212,7 +212,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) { Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) {
if (FLAG_runtime_call_stats) { if (V8_UNLIKELY(FLAG_runtime_stats)) {
GenerateTailCall(masm(), slow_stub); GenerateTailCall(masm(), slow_stub);
} }
Register reg = Frontend(name); Register reg = Frontend(name);
...@@ -224,7 +224,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( ...@@ -224,7 +224,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
Handle<Name> name, const CallOptimization& call_optimization, Handle<Name> name, const CallOptimization& call_optimization,
int accessor_index, Handle<Code> slow_stub) { int accessor_index, Handle<Code> slow_stub) {
DCHECK(call_optimization.is_simple_api_call()); DCHECK(call_optimization.is_simple_api_call());
if (FLAG_runtime_call_stats) { if (V8_UNLIKELY(FLAG_runtime_stats)) {
GenerateTailCall(masm(), slow_stub); GenerateTailCall(masm(), slow_stub);
} }
Register holder = Frontend(name); Register holder = Frontend(name);
...@@ -578,7 +578,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( ...@@ -578,7 +578,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
Handle<JSObject> object, Handle<Name> name, Handle<JSObject> object, Handle<Name> name,
const CallOptimization& call_optimization, int accessor_index, const CallOptimization& call_optimization, int accessor_index,
Handle<Code> slow_stub) { Handle<Code> slow_stub) {
if (FLAG_runtime_call_stats) { if (V8_UNLIKELY(FLAG_runtime_stats)) {
GenerateTailCall(masm(), slow_stub); GenerateTailCall(masm(), slow_stub);
} }
Register holder = Frontend(name); Register holder = Frontend(name);
......
...@@ -2986,7 +2986,7 @@ RUNTIME_FUNCTION(Runtime_StoreCallbackProperty) { ...@@ -2986,7 +2986,7 @@ RUNTIME_FUNCTION(Runtime_StoreCallbackProperty) {
CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 5); CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 5);
HandleScope scope(isolate); HandleScope scope(isolate);
if (FLAG_runtime_call_stats) { if (V8_UNLIKELY(FLAG_runtime_stats)) {
RETURN_RESULT_OR_FAILURE( RETURN_RESULT_OR_FAILURE(
isolate, Runtime::SetObjectProperty(isolate, receiver, name, value, isolate, Runtime::SetObjectProperty(isolate, receiver, name, value,
language_mode)); language_mode));
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "src/runtime-profiler.h" #include "src/runtime-profiler.h"
#include "src/simulator.h" #include "src/simulator.h"
#include "src/snapshot/deserializer.h" #include "src/snapshot/deserializer.h"
#include "src/tracing/tracing-category-observer.h"
#include "src/v8.h" #include "src/v8.h"
#include "src/version.h" #include "src/version.h"
#include "src/vm-state-inl.h" #include "src/vm-state-inl.h"
...@@ -2737,8 +2738,8 @@ void Isolate::DumpAndResetCompilationStats() { ...@@ -2737,8 +2738,8 @@ void Isolate::DumpAndResetCompilationStats() {
turbo_statistics_ = nullptr; turbo_statistics_ = nullptr;
delete hstatistics_; delete hstatistics_;
hstatistics_ = nullptr; hstatistics_ = nullptr;
if (FLAG_runtime_call_stats && if (V8_UNLIKELY(FLAG_runtime_stats ==
!TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED()) { v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) {
OFStream os(stdout); OFStream os(stdout);
counters()->runtime_call_stats()->Print(os); counters()->runtime_call_stats()->Print(os);
counters()->runtime_call_stats()->Reset(); counters()->runtime_call_stats()->Reset();
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "src/runtime-profiler.h" #include "src/runtime-profiler.h"
#include "src/source-position-table.h" #include "src/source-position-table.h"
#include "src/string-stream.h" #include "src/string-stream.h"
#include "src/tracing/tracing-category-observer.h"
#include "src/vm-state-inl.h" #include "src/vm-state-inl.h"
namespace v8 { namespace v8 {
...@@ -1283,7 +1284,8 @@ void Logger::RuntimeCallTimerEvent() { ...@@ -1283,7 +1284,8 @@ void Logger::RuntimeCallTimerEvent() {
void Logger::TickEvent(v8::TickSample* sample, bool overflow) { void Logger::TickEvent(v8::TickSample* sample, bool overflow) {
if (!log_->IsEnabled() || !FLAG_prof_cpp) return; if (!log_->IsEnabled() || !FLAG_prof_cpp) return;
if (FLAG_runtime_call_stats) { if (V8_UNLIKELY(FLAG_runtime_stats ==
v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) {
RuntimeCallTimerEvent(); RuntimeCallTimerEvent();
} }
Log::MessageBuilder msg(log_); Log::MessageBuilder msg(log_);
......
...@@ -15,10 +15,6 @@ namespace v8 { ...@@ -15,10 +15,6 @@ namespace v8 {
namespace internal { namespace internal {
namespace tracing { namespace tracing {
// A global flag used as a shortcut to check for the
// v8.runtime-call-stats category due to its high frequency use.
base::Atomic32 kRuntimeCallStatsTracingEnabled = false;
v8::Platform* TraceEventHelper::GetCurrentPlatform() { v8::Platform* TraceEventHelper::GetCurrentPlatform() {
return v8::internal::V8::GetCurrentPlatform(); return v8::internal::V8::GetCurrentPlatform();
} }
......
...@@ -249,20 +249,10 @@ enum CategoryGroupEnabledFlags { ...@@ -249,20 +249,10 @@ enum CategoryGroupEnabledFlags {
INTERNAL_TRACE_EVENT_UID(ScopedContext) \ INTERNAL_TRACE_EVENT_UID(ScopedContext) \
INTERNAL_TRACE_EVENT_UID(scoped_context)(context); INTERNAL_TRACE_EVENT_UID(scoped_context)(context);
#define TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() \
base::NoBarrier_Load(&v8::internal::tracing::kRuntimeCallStatsTracingEnabled)
#define TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \ #define TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \
INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name)
#define INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \ #define INTERNAL_TRACE_EVENT_CALL_STATS_SCOPED(isolate, category_group, name) \
{ \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO( \
TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats")); \
base::NoBarrier_Store( \
&v8::internal::tracing::kRuntimeCallStatsTracingEnabled, \
INTERNAL_TRACE_EVENT_CATEGORY_GROUP_ENABLED_FOR_RECORDING_MODE()); \
} \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category_group); \
v8::internal::tracing::CallStatsScopedTracer INTERNAL_TRACE_EVENT_UID( \ v8::internal::tracing::CallStatsScopedTracer INTERNAL_TRACE_EVENT_UID( \
tracer); \ tracer); \
......
...@@ -17,6 +17,7 @@ void TracingCategoryObserver::SetUp() { ...@@ -17,6 +17,7 @@ void TracingCategoryObserver::SetUp() {
TracingCategoryObserver::instance_ = new TracingCategoryObserver(); TracingCategoryObserver::instance_ = new TracingCategoryObserver();
v8::internal::V8::GetCurrentPlatform()->AddTraceStateObserver( v8::internal::V8::GetCurrentPlatform()->AddTraceStateObserver(
TracingCategoryObserver::instance_); TracingCategoryObserver::instance_);
TRACE_EVENT_WARMUP_CATEGORY(TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats"));
} }
void TracingCategoryObserver::TearDown() { void TracingCategoryObserver::TearDown() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment