@@ -73,6 +73,36 @@ index ad3fe3e168882dcd8dce22cbaaeb81a626efb182..6ad1b95d5340c3f0f439388edde652d0
7373 tracing::EnvironmentArgs traced_value(args, exec_args);
7474 TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(TRACING_CATEGORY_NODE1(environment),
7575 "Environment",
76+ diff --git a/src/node.cc b/src/node.cc
77+ index dcb0ee4dece17406be5afc7313a35c921fd0d6ef..5f7103dffef71955f728256352105a5ac3761e88 100644
78+ --- a/src/node.cc
79+ +++ b/src/node.cc
80+ @@ -47,6 +47,10 @@
81+ #include "node_v8_platform-inl.h"
82+ #include "node_version.h"
83+
84+ + #if defined(V8_USE_PERFETTO)
85+ + #include "tracing/trace_event_perfetto.h"
86+ + #endif
87+ +
88+ #if HAVE_OPENSSL
89+ #include "ncrypto.h"
90+ #include "node_crypto.h"
91+ @@ -1136,6 +1140,14 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,
92+ }
93+ }
94+
95+ + #if defined(V8_USE_PERFETTO)
96+ + // Register Node's TrackEvent data source when tracing is provided by the
97+ + // embedder. The standalone tracing agent initializes and registers it later.
98+ + if (perfetto::Tracing::IsInitialized()) {
99+ + tracing::RegisterPerfettoTrackEvent();
100+ + }
101+ + #endif
102+ +
103+ if (!(flags & ProcessInitializationFlags::kNoUseLargePages) &&
104+ (per_process::cli_options->use_largepages == "on" ||
105+ per_process::cli_options->use_largepages == "silent")) {
76106diff --git a/src/node_contextify.cc b/src/node_contextify.cc
77107index 900bf7a3d67245dbbdbe9198671bc4de5093dd52..1c37d60329af852a53f352bfc8c53a37acf34ae1 100644
78108--- a/src/node_contextify.cc
0 commit comments