Reland "Reduce build size when building with Perfetto SDK"

This is a reland of commit 0d4200055b

gn complained about headers that are only included behind the
v8_use_perfetto build flag. Added "nogncheck" to suppress this
warning.

Original change's description:
> Reduce build size when building with Perfetto SDK
>
> Building Chromium with full Perfetto SDK included increases build time
> significantly. We can reduce this overhead by including only those
> parts that are required. See b/266913150 for context.
>
> Change-Id: I0cde5cb7df7b6151ec686e993488d8467c416fac
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212390
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
> Cr-Commit-Position: refs/heads/main@{#85603}

Change-Id: Ifdcc9983230b5e7bab5f66a37f193d2cee698400
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4221573
Commit-Queue: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85650}
This commit is contained in:
Mikhail Khokhlov 2023-02-03 13:56:48 +00:00 committed by V8 LUCI CQ
parent 79efc8f090
commit 051df31aec
5 changed files with 10 additions and 5 deletions

View File

@ -86,7 +86,8 @@ specific_include_rules = {
"d8\.cc": [
"+include/libplatform/libplatform.h",
"+include/libplatform/v8-tracing.h",
"+perfetto/tracing.h"
"+perfetto/tracing/track_event.h",
"+perfetto/tracing/track_event_legacy.h"
],
"d8-platforms\.cc": [
"+include/libplatform/libplatform.h",

View File

@ -79,7 +79,8 @@
#endif // V8_FUZZILLI
#ifdef V8_USE_PERFETTO
#include "perfetto/tracing.h"
#include "perfetto/tracing/track_event.h"
#include "perfetto/tracing/track_event_legacy.h"
#endif // V8_USE_PERFETTO
#ifdef V8_INTL_SUPPORT

View File

@ -1,4 +1,5 @@
include_rules = [
"+perfetto/tracing.h",
"+perfetto/tracing/track_event.h",
"+perfetto/tracing/track_event_legacy.h",
"+protos/perfetto"
]

View File

@ -19,7 +19,8 @@
// For now most of v8 uses legacy trace events.
#define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS 1
#include "perfetto/tracing.h"
#include "perfetto/tracing/track_event.h"
#include "perfetto/tracing/track_event_legacy.h"
// Trace category prefixes used in tests.
PERFETTO_DEFINE_TEST_CATEGORY_PREFIXES("v8-cat", "cat", "v8.Test2");

View File

@ -11,7 +11,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#ifdef V8_USE_PERFETTO
#include "perfetto/tracing.h"
#include "perfetto/tracing/track_event.h" // nogncheck
#include "perfetto/tracing/track_event_legacy.h" // nogncheck
#include "protos/perfetto/trace/trace.pb.h" // nogncheck
#include "src/libplatform/tracing/trace-event-listener.h"
#include "src/tracing/traced-value.h"