From bbceab4d91466f93c07937b417c6044e9691c1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Jul 2021 11:57:07 +0200 Subject: [PATCH] deps: V8: backport 1b1eda0876aa MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: tracing: Update proto library build rule and roll Perfetto This patch removes use of the deprecated sources_assignment_filter GN feature from gni/proto_library.gni, since the extra descriptor files are no longer being generated. We also roll Perfetto to match the version used in Chrome and update test expectations accordingly. Bug: v8:10995 Change-Id: I65cb3b79feb6e5a7e5c8d99fdb8bf999a6048539 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454079 Commit-Queue: Michael Achenbach Auto-Submit: Sami Kyöstilä Reviewed-by: Peter Marshall Reviewed-by: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#70381} Refs: https://github.com/v8/v8/commit/1b1eda0876aa20bc1dc71caa6baf3a52c0c1540d PR-URL: https://github.com/nodejs/node/pull/39245 Refs: https://github.com/nodejs/build/issues/2696 Reviewed-By: Richard Lau --- common.gypi | 2 +- deps/v8/DEPS | 2 +- deps/v8/gni/proto_library.gni | 11 ++++++----- deps/v8/test/cctest/libplatform/test-tracing.cc | 9 +++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/common.gypi b/common.gypi index 102a1facd41af6..f6d4f0a2860876 100644 --- a/common.gypi +++ b/common.gypi @@ -34,7 +34,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.47', + 'v8_embedder_string': '-node.48', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/DEPS b/deps/v8/DEPS index a7d4081edb856c..7eaa7fc5b57069 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -246,7 +246,7 @@ deps = { 'dep_type': 'cipd', }, 'v8/third_party/perfetto': - Var('android_url') + '/platform/external/perfetto.git' + '@' + '01615892494a9a8dc84414962d0a817bf97de2c2', + Var('android_url') + '/platform/external/perfetto.git' + '@' + '7cdc44f903d3bcfd1d0f67188bfa797a24756868', 'v8/third_party/protobuf': Var('chromium_url') + '/external/github.com/google/protobuf'+ '@' + 'b68a347f56137b4b1a746e8c7438495a6ac1bd91', } diff --git a/deps/v8/gni/proto_library.gni b/deps/v8/gni/proto_library.gni index b16d8f93bd8fcd..f921a15685dba1 100644 --- a/deps/v8/gni/proto_library.gni +++ b/deps/v8/gni/proto_library.gni @@ -11,8 +11,6 @@ template("proto_library") { assert(defined(invoker.sources)) proto_sources = invoker.sources - set_sources_assignment_filter([]) - if (host_os == "win") { host_executable_suffix = ".exe" } else { @@ -137,6 +135,12 @@ template("proto_library") { ] } + if (defined(invoker.import_dirs)) { + foreach(path, invoker.import_dirs) { + args += [ "--import-dir=" + rebase_path(path, root_build_dir) ] + } + } + if (generate_with_plugin) { plugin_path_rebased = rebase_path(plugin_path, root_build_dir) plugin_out_args = "" @@ -187,10 +191,7 @@ template("proto_library") { "visibility", ]) - # Exclude the config.descriptor file which is an output for some reason. - set_sources_assignment_filter([ "*.descriptor" ]) sources = get_target_outputs(":$action_name") - set_sources_assignment_filter(sources_assignment_filter) # configs -= [ "//gn/standalone:extra_warnings" ] if (defined(invoker.extra_configs)) { diff --git a/deps/v8/test/cctest/libplatform/test-tracing.cc b/deps/v8/test/cctest/libplatform/test-tracing.cc index a98445be978f27..6694f38d28af18 100644 --- a/deps/v8/test/cctest/libplatform/test-tracing.cc +++ b/deps/v8/test/cctest/libplatform/test-tracing.cc @@ -891,10 +891,11 @@ TEST(JsonIntegrationTest) { std::vector all_args; GetJSONStrings(&all_args, json, "\"args\"", "{", "}"); - CHECK_EQ("\"1\":1e+100", all_args[0]); - CHECK_EQ("\"2\":\"NaN\"", all_args[1]); - CHECK_EQ("\"3\":\"Infinity\"", all_args[2]); - CHECK_EQ("\"4\":\"-Infinity\"", all_args[3]); + // Ignore the first metadata event. + CHECK_EQ("\"1\":1e+100", all_args[1]); + CHECK_EQ("\"2\":\"NaN\"", all_args[2]); + CHECK_EQ("\"3\":\"Infinity\"", all_args[3]); + CHECK_EQ("\"4\":\"-Infinity\"", all_args[4]); } TEST(TracingPerfetto) {