summaryrefslogtreecommitdiff
path: root/src/tracing/trace_event.h
diff options
context:
space:
mode:
authorMatt Loring <mattloring@google.com>2017-06-29 10:55:38 +0200
committerAnna Henningsen <anna@addaleax.net>2017-08-17 20:26:49 +0200
commit5e5a52fc937d53b5bcf5c2c09c898d8311db2bca (patch)
tree9af454a4b67af717e84dfa57dab11db76cd1acd9 /src/tracing/trace_event.h
parentfabe1b4e19011b94b20572a40300161b1160f8fd (diff)
downloadandroid-node-v8-5e5a52fc937d53b5bcf5c2c09c898d8311db2bca.tar.gz
android-node-v8-5e5a52fc937d53b5bcf5c2c09c898d8311db2bca.tar.bz2
android-node-v8-5e5a52fc937d53b5bcf5c2c09c898d8311db2bca.zip
tracing: Update to use new Platform tracing apis
V8 modified the platform API to accept a tracing controller at platform creation time that is required to be present for the lifetime of the platform if tracing will every be enabled. This will simplify the implementation of a v8::Platform subclass for node. PR-URL: https://github.com/nodejs/node/pull/14001 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/tracing/trace_event.h')
-rw-r--r--src/tracing/trace_event.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h
index ac0c1f7578..24806d375f 100644
--- a/src/tracing/trace_event.h
+++ b/src/tracing/trace_event.h
@@ -70,7 +70,7 @@ enum CategoryGroupEnabledFlags {
// const uint8_t*
// TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(const char* category_group)
#define TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED \
- node::tracing::TraceEventHelper::GetCurrentPlatform() \
+ node::tracing::TraceEventHelper::GetTracingController() \
->GetCategoryGroupEnabled
// Get the number of times traces have been recorded. This is used to implement
@@ -99,7 +99,7 @@ enum CategoryGroupEnabledFlags {
// const char* name,
// uint64_t id)
#define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION \
- node::tracing::TraceEventHelper::GetCurrentPlatform() \
+ node::tracing::TraceEventHelper::GetTracingController() \
->UpdateTraceEventDuration
// Defines atomic operations used internally by the tracing system.
@@ -258,8 +258,8 @@ extern intptr_t kRuntimeCallStatsTracingEnabled;
class TraceEventHelper {
public:
- static v8::Platform* GetCurrentPlatform();
- static void SetCurrentPlatform(v8::Platform* platform);
+ static v8::TracingController* GetTracingController();
+ static void SetTracingController(v8::TracingController* controller);
};
// TraceID encapsulates an ID that can either be an integer or pointer. Pointers
@@ -406,11 +406,11 @@ static inline uint64_t AddTraceEventImpl(
static_cast<intptr_t>(arg_values[1])));
}
// DCHECK(num_args <= 2);
- v8::Platform* platform =
- node::tracing::TraceEventHelper::GetCurrentPlatform();
- return platform->AddTraceEvent(phase, category_group_enabled, name, scope, id,
- bind_id, num_args, arg_names, arg_types,
- arg_values, arg_convertibles, flags);
+ v8::TracingController* controller =
+ node::tracing::TraceEventHelper::GetTracingController();
+ return controller->AddTraceEvent(phase, category_group_enabled, name, scope, id,
+ bind_id, num_args, arg_names, arg_types,
+ arg_values, arg_convertibles, flags);
}
// Define SetTraceValue for each allowed type. It stores the type and