Skip to content

Commit f8fa220

Browse files
alexanderschulzeV8 LUCI CQ
authored andcommitted
Reland "[tracing] Remove base/trace_event/common dependency"
This reland additionally removes `base` from `generate-header-include-checks.py`, as the root directory got removed. See https://crrev.com/c/5529240/1..3. Original change's description: > Revert "[tracing] Remove `base/trace_event/common` dependency" > > This reverts commit 993b79e. > > Reason for revert: > https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20-%20debug%20-%20header%20includes%20-%20builder/15361/overview > > And this, but not consistent it seems. Maybe an incremental > build problem: > https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20builder/73951/overview > > Original change's description: > > [tracing] Remove `base/trace_event/common` dependency > > > > Currently, V8 depends on base/trace_event/common which includes a single > > file being shared. It contains two tracing macro implementations: one > > which is based on perfetto, and a second legacy one. > > > > V8 is the only client of the legacy version, which got removed in > > https://crrev.com/c/5505657 and causes a failure of our roll (e.g. > > https://crrev.com/c/5512234). > > > > This change moves the legacy code into V8, removes the obsolete > > dependency, and refactors the build configurations. > > > > Bug: 338608342 > > Change-Id: I9254592b5c581d64807fe25c92ac931356569453 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5522493 > > Commit-Queue: Alexander Schulze <[email protected]> > > Reviewed-by: Toon Verwaest <[email protected]> > > Reviewed-by: Michael Achenbach <[email protected]> > > Cr-Commit-Position: refs/heads/main@{#93823} > > Bug: 338608342 > Change-Id: Iefbd2c7e9a8c0af0f437a60faa345db72879d50d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5529239 > Bot-Commit: Rubber Stamper <[email protected]> > Commit-Queue: Alexander Schulze <[email protected]> > Owners-Override: Michael Achenbach <[email protected]> > Auto-Submit: Michael Achenbach <[email protected]> > Cr-Commit-Position: refs/heads/main@{#93825} Bug: 338608342 Change-Id: I90b8def2f3bf0142b3bc545b95cb3ebb689ec46c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5529240 Reviewed-by: Michael Achenbach <[email protected]> Commit-Queue: Alexander Schulze <[email protected]> Cr-Commit-Position: refs/heads/main@{#93832}
1 parent 850eb54 commit f8fa220

16 files changed

Lines changed: 887 additions & 39 deletions

File tree

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2408,6 +2408,7 @@ filegroup(
24082408
"src/torque/runtime-macro-shims.h",
24092409
"src/tracing/trace-event.cc",
24102410
"src/tracing/trace-event.h",
2411+
"src/tracing/trace-event-no-perfetto.h",
24112412
"src/tracing/traced-value.cc",
24122413
"src/tracing/traced-value.h",
24132414
"src/tracing/tracing-category-observer.cc",
@@ -4198,7 +4199,6 @@ v8_library(
41984199
deps = [
41994200
":lib_fp16",
42004201
":v8_libbase",
4201-
"//external:base_trace_event_common",
42024202
"//external:absl_btree",
42034203
"//external:absl_flat_hash_map",
42044204
"//external:absl_flat_hash_set",

BUILD.gn

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3202,7 +3202,6 @@ v8_header_set("v8_internal_headers") {
32023202
sources = [
32033203
### gcmole(all) ###
32043204
"$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
3205-
"//base/trace_event/common/trace_event_common.h",
32063205
"include/cppgc/common.h",
32073206
"include/v8-inspector-protocol.h",
32083207
"include/v8-inspector.h",
@@ -4145,6 +4144,7 @@ v8_header_set("v8_internal_headers") {
41454144
"src/third_party/utf8-decoder/utf8-decoder.h",
41464145
"src/torque/runtime-macro-shims.h",
41474146
"src/tracing/trace-event.h",
4147+
"src/tracing/trace-event-no-perfetto.h",
41484148
"src/tracing/traced-value.h",
41494149
"src/tracing/tracing-category-observer.h",
41504150
"src/utils/address-map.h",
@@ -4186,7 +4186,7 @@ v8_header_set("v8_internal_headers") {
41864186
}
41874187

41884188
if (v8_use_perfetto) {
4189-
sources -= [ "//base/trace_event/common/trace_event_common.h" ]
4189+
sources -= [ "src/tracing/trace-event-no-perfetto.h" ]
41904190
sources += [
41914191
"src/tracing/code-data-source.h",
41924192
"src/tracing/code-trace-context.h",
@@ -6639,7 +6639,6 @@ if (v8_use_libm_trig_functions) {
66396639

66406640
v8_component("v8_libplatform") {
66416641
sources = [
6642-
"//base/trace_event/common/trace_event_common.h",
66436642
"include/libplatform/libplatform-export.h",
66446643
"include/libplatform/libplatform.h",
66456644
"include/libplatform/v8-tracing.h",
@@ -6666,6 +6665,7 @@ v8_component("v8_libplatform") {
66666665
"src/libplatform/tracing/tracing-controller.cc",
66676666
"src/libplatform/worker-thread.cc",
66686667
"src/libplatform/worker-thread.h",
6668+
"src/tracing/trace-event-no-perfetto.h",
66696669
]
66706670

66716671
configs = [ ":internal_config_base" ]
@@ -6686,12 +6686,12 @@ v8_component("v8_libplatform") {
66866686

66876687
if (v8_use_perfetto) {
66886688
sources -= [
6689-
"//base/trace_event/common/trace_event_common.h",
66906689
"src/libplatform/tracing/trace-buffer.cc",
66916690
"src/libplatform/tracing/trace-buffer.h",
66926691
"src/libplatform/tracing/trace-object.cc",
66936692
"src/libplatform/tracing/trace-writer.cc",
66946693
"src/libplatform/tracing/trace-writer.h",
6694+
"src/tracing/trace-event-no-perfetto.h",
66956695
]
66966696
sources += [ "src/libplatform/tracing/trace-event-listener.h" ]
66976697
}
@@ -7014,7 +7014,7 @@ v8_source_set("cppgc_base") {
70147014
]
70157015

70167016
if (cppgc_is_standalone && !v8_use_perfetto) {
7017-
sources += [ "//base/trace_event/common/trace_event_common.h" ]
7017+
sources += [ "src/tracing/trace-event-no-perfetto.h" ]
70187018
} else {
70197019
public_deps += [ ":v8_tracing" ]
70207020
}

DEPS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ vars = {
125125
}
126126

127127
deps = {
128-
'base/trace_event/common':
129-
Var('chromium_url') + '/chromium/src/base/trace_event/common.git' + '@' + '29ac73db520575590c3aceb0a6f1f58dda8934f6',
130128
'build':
131129
Var('chromium_url') + '/chromium/src/build.git' + '@' + '7796c50af5b192c01d7c92f930de2093a8507097',
132130
'buildtools':

WORKSPACE

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,6 @@ bind(
7070
actual = "@com_googlesource_chromium_icu//:icu",
7171
)
7272

73-
new_local_repository(
74-
name = "com_googlesource_chromium_base_trace_event_common",
75-
build_file = "//:bazel/BUILD.trace_event_common",
76-
path = "base/trace_event/common",
77-
)
78-
79-
bind(
80-
name = "base_trace_event_common",
81-
actual = "@com_googlesource_chromium_base_trace_event_common//:trace_event_common",
82-
)
83-
8473
http_archive(
8574
name = "intel_ittapi",
8675
add_prefix = "third_party/ittapi",

bazel/BUILD.trace_event_common

Lines changed: 0 additions & 10 deletions
This file was deleted.

include/v8-platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class TracingController {
395395

396396
/**
397397
* Adds a trace event to the platform tracing system. These function calls are
398-
* usually the result of a TRACE_* macro from trace_event_common.h when
398+
* usually the result of a TRACE_* macro from trace-event-no-perfetto.h when
399399
* tracing and the category of the particular trace are enabled. It is not
400400
* advisable to call these functions on their own; they are really only meant
401401
* to be used by the trace macros. The returned handle can be used by

src/DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include_rules = [
2-
"+base/trace_event/common/trace_event_common.h",
32
"+src",
43
"-src/asmjs",
54
"+src/asmjs/asm-js.h",
@@ -70,6 +69,7 @@ include_rules = [
7069
"+src/regexp/regexp-flags.h",
7170
"+src/regexp/regexp-stack.h",
7271
"+src/regexp/regexp-utils.h",
72+
"+src/tracing/trace-event-no-perfetto.h",
7373
"-src/trap-handler",
7474
"+src/trap-handler/handler-inside-posix.h",
7575
"+src/trap-handler/handler-inside-win.h",

src/heap/cppgc/DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ include_rules = [
55
"+src/heap/base",
66
"+src/heap/cppgc",
77
"+src/tracing/trace-event.h",
8+
"+src/tracing/trace-event-no-perfetto.h",
89
]

src/heap/cppgc/trace-event.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ using ConvertableToTraceFormat = v8::ConvertableToTraceFormat;
1212
// This is a subset of stc/tracing/trace-event.h required to support
1313
// tracing in the cppgc standalone library using TracingController.
1414

15-
#include "base/trace_event/common/trace_event_common.h"
1615
#include "include/cppgc/platform.h"
1716
#include "src/base/atomicops.h"
1817
#include "src/base/macros.h"
18+
#include "src/tracing/trace-event-no-perfetto.h"
1919

2020
// This header file defines implementation details of how the trace macros in
21-
// trace_event_common.h collect and store trace events. Anything not
21+
// trace-event-no-erfetto.h collect and store trace events. Anything not
2222
// implementation-specific should go in trace_macros_common.h instead of here.
2323

2424
// The pointer returned from GetCategoryGroupEnabled() points to a

src/libplatform/DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ include_rules = [
55
"-src",
66
"+src/base",
77
"+src/libplatform",
8+
"+src/tracing/trace-event-no-perfetto.h",
89
]

0 commit comments

Comments
 (0)