base_tracing.h 1.2 KB

12345678910111213141516171819202122232425262728
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_TRACE_EVENT_BASE_TRACING_H_
  5. #define BASE_TRACE_EVENT_BASE_TRACING_H_
  6. // Proxy header that provides tracing instrumentation for //base code. When
  7. // tracing support is disabled via the gn flag enable_base_tracing, this header
  8. // provides a mock implementation of the relevant trace macros instead, which
  9. // causes the instrumentation in //base to be compiled into no-ops.
  10. #include "base/tracing_buildflags.h"
  11. #if BUILDFLAG(ENABLE_BASE_TRACING)
  12. // Update the check in //base/PRESUBMIT.py when adding new headers here.
  13. // TODO(crbug/1006541): Switch to perfetto for trace event implementation.
  14. #include "base/trace_event/blame_context.h"
  15. #include "base/trace_event/memory_allocator_dump_guid.h"
  16. #include "base/trace_event/memory_dump_provider.h"
  17. #include "base/trace_event/trace_event.h"
  18. #include "base/trace_event/traced_value.h"
  19. #include "base/trace_event/typed_macros.h"
  20. #else // BUILDFLAG(ENABLE_BASE_TRACING)
  21. #include "base/trace_event/trace_event_stub.h"
  22. #endif // BUILDFLAG(ENABLE_BASE_TRACING)
  23. #endif // BASE_TRACE_EVENT_BASE_TRACING_H_