1 // Copyright 2020 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_TRACE_EVENT_BASE_TRACING_H_ 6 #define BASE_TRACE_EVENT_BASE_TRACING_H_ 7 8 // Proxy header that provides tracing instrumentation for //base code. When 9 // tracing support is disabled via the gn flag enable_base_tracing, this header 10 // provides a mock implementation of the relevant trace macros instead, which 11 // causes the instrumentation in //base to be compiled into no-ops. 12 13 #include "base/tracing_buildflags.h" 14 15 #if BUILDFLAG(ENABLE_BASE_TRACING) 16 // Update the check in //base/PRESUBMIT.py when adding new headers here. 17 // TODO(crbug.com/42050015): Switch to perfetto for trace event implementation. 18 #include "base/trace_event/heap_profiler.h" // IWYU pragma: export, nogncheck 19 #include "base/trace_event/interned_args_helper.h" // IWYU pragma: export, nogncheck 20 #include "base/trace_event/memory_allocator_dump_guid.h" // IWYU pragma: export, nogncheck 21 #include "base/trace_event/memory_dump_manager.h" // IWYU pragma: export, nogncheck 22 #include "base/trace_event/memory_dump_provider.h" // IWYU pragma: export, nogncheck 23 #include "base/trace_event/trace_event.h" // IWYU pragma: export, nogncheck 24 #include "base/trace_event/trace_id_helper.h" // IWYU pragma: export, nogncheck 25 #include "base/trace_event/traced_value.h" // IWYU pragma: export, nogncheck 26 #include "base/trace_event/typed_macros.h" // IWYU pragma: export, nogncheck 27 #include "third_party/perfetto/include/perfetto/tracing/traced_value.h" // IWYU pragma: export, nogncheck 28 #include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_process_descriptor.pbzero.h" // IWYU pragma: export, nogncheck 29 #include "third_party/perfetto/protos/perfetto/trace/track_event/log_message.pbzero.h" // IWYU pragma: export, nogncheck 30 #include "third_party/perfetto/protos/perfetto/trace/track_event/task_execution.pbzero.h" // IWYU pragma: export, nogncheck 31 #else // BUILDFLAG(ENABLE_BASE_TRACING) 32 #include "base/trace_event/trace_event_stub.h" // IWYU pragma: export 33 #endif // BUILDFLAG(ENABLE_BASE_TRACING) 34 35 #endif // BASE_TRACE_EVENT_BASE_TRACING_H_ 36