summaryrefslogtreecommitdiff
path: root/deps/v8/src/libplatform
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2018-01-16 16:49:14 -0800
committerAli Ijaz Sheikh <ofrobots@google.com>2018-01-24 17:15:48 -0800
commitb06440356daec134963c90ac79e408760eb02c00 (patch)
tree5b591f4444c41e22b8f8aad5d28fede3dc904af6 /deps/v8/src/libplatform
parenta1c5dddbb2a2d6373adf31ab6fe0dfab40b871fb (diff)
downloadnode-new-b06440356daec134963c90ac79e408760eb02c00.tar.gz
deps: cherry-pick c3bb73f from upstream V8
Original commit message: [tracing] implement TRACE_EVENT_ADD_WITH_TIMESTAMP Bug: Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Icb3cf7b7f96704e1eaa4c5fbf773b94b70cddc85 Reviewed-on: https://chromium-review.googlesource.com/861302 Reviewed-by: Fadi Meawad <fmeawad@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{#50549} Refs: https://github.com/v8/v8/commit/c3bb73f6b95c280cee3a4d6b03c87fce93d617c7 Refs: https://github.com/nodejs/node/issues/17349 PR-URL: https://github.com/nodejs/node/pull/18196 Refs: https://github.com/nodejs/node/pull/18360 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Diffstat (limited to 'deps/v8/src/libplatform')
-rw-r--r--deps/v8/src/libplatform/tracing/tracing-controller.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/deps/v8/src/libplatform/tracing/tracing-controller.cc b/deps/v8/src/libplatform/tracing/tracing-controller.cc
index bdc2d5d4a3..647306d627 100644
--- a/deps/v8/src/libplatform/tracing/tracing-controller.cc
+++ b/deps/v8/src/libplatform/tracing/tracing-controller.cc
@@ -75,6 +75,24 @@ uint64_t TracingController::AddTraceEvent(
return handle;
}
+uint64_t TracingController::AddTraceEventWithTimestamp(
+ char phase, const uint8_t* category_enabled_flag, const char* name,
+ const char* scope, uint64_t id, uint64_t bind_id, int num_args,
+ const char** arg_names, const uint8_t* arg_types,
+ const uint64_t* arg_values,
+ std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
+ unsigned int flags, int64_t timestamp) {
+ uint64_t handle;
+ TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
+ if (trace_object) {
+ trace_object->Initialize(phase, category_enabled_flag, name, scope, id,
+ bind_id, num_args, arg_names, arg_types,
+ arg_values, arg_convertables, flags, timestamp,
+ CurrentCpuTimestampMicroseconds());
+ }
+ return handle;
+}
+
void TracingController::UpdateTraceEventDuration(
const uint8_t* category_enabled_flag, const char* name, uint64_t handle) {
TraceObject* trace_object = trace_buffer_->GetEventByHandle(handle);