Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 967fbeb

Browse filesBrowse files
ofrobotstargos
authored andcommitted
deps: cherry-pick 2363cdf from upstream V8
Original commit message: [tracing] do not add traces when disabled #21038 Change-Id: Ic4c9f403b5e54a97d3170b2311dd5aab8c8357c8 Reviewed-on: https://chromium-review.googlesource.com/1217726 Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#55809} Refs: v8/v8@2363cdf PR-URL: #22812 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
1 parent 0c39fa4 commit 967fbeb
Copy full SHA for 967fbeb

File tree

Expand file treeCollapse file tree

2 files changed

+19
-15
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-15
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Reset this number to 0 on major V8 upgrades.
3131
# Increment by one for each non-official patch applied to deps/v8.
32-
'v8_embedder_string': '-node.25',
32+
'v8_embedder_string': '-node.26',
3333

3434
# Enable disassembler for `--print-code` v8 options
3535
'v8_enable_disassembler': 1,
Collapse file

‎deps/v8/src/libplatform/tracing/tracing-controller.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/libplatform/tracing/tracing-controller.cc
+18-14Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ uint64_t TracingController::AddTraceEvent(
6363
const uint64_t* arg_values,
6464
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
6565
unsigned int flags) {
66-
uint64_t handle;
67-
TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
68-
if (trace_object) {
69-
trace_object->Initialize(
70-
phase, category_enabled_flag, name, scope, id, bind_id, num_args,
71-
arg_names, arg_types, arg_values, arg_convertables, flags,
72-
CurrentTimestampMicroseconds(), CurrentCpuTimestampMicroseconds());
66+
uint64_t handle = 0;
67+
if (mode_ != DISABLED) {
68+
TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
69+
if (trace_object) {
70+
trace_object->Initialize(
71+
phase, category_enabled_flag, name, scope, id, bind_id, num_args,
72+
arg_names, arg_types, arg_values, arg_convertables, flags,
73+
CurrentTimestampMicroseconds(), CurrentCpuTimestampMicroseconds());
74+
}
7375
}
7476
return handle;
7577
}
@@ -81,13 +83,15 @@ uint64_t TracingController::AddTraceEventWithTimestamp(
8183
const uint64_t* arg_values,
8284
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
8385
unsigned int flags, int64_t timestamp) {
84-
uint64_t handle;
85-
TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
86-
if (trace_object) {
87-
trace_object->Initialize(phase, category_enabled_flag, name, scope, id,
88-
bind_id, num_args, arg_names, arg_types,
89-
arg_values, arg_convertables, flags, timestamp,
90-
CurrentCpuTimestampMicroseconds());
86+
uint64_t handle = 0;
87+
if (mode_ != DISABLED) {
88+
TraceObject* trace_object = trace_buffer_->AddTraceEvent(&handle);
89+
if (trace_object) {
90+
trace_object->Initialize(phase, category_enabled_flag, name, scope, id,
91+
bind_id, num_args, arg_names, arg_types,
92+
arg_values, arg_convertables, flags, timestamp,
93+
CurrentCpuTimestampMicroseconds());
94+
}
9195
}
9296
return handle;
9397
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.