webrtc/rtc_base/trace_categories.h
Evan Shrubsole cd09858f4a Convert decoder TRACE_EVENT to flows
This is the first new style trace event so this CL adds and updates
WebRTCs Perfetto configuration.

* Changes all #includes to target "third_party/perfetto". Added this
to DEPS.
* Expose the Perfetto public config in the "tracing" group using
an all_dependent_configs statement. This means the config is included
in all parts that include the "//:tracing" group. However, direct
perfetto includes are banned per DEPS.
* In order to expose Perfetto types (ie Flow/TerminatingFlow) the
perfetto headers are a dependancy on all targets. This should not
affect binary size as these are not used when perfetto is not enabled
and will not be linked.

Bug: b/42226290
Change-Id: I5711d81dae95ee907cbcd41bf1ee9b55d2ec595c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349161
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42197}
2024-04-30 08:47:29 +00:00

33 lines
1.3 KiB
C

/*
* Copyright (c) 2024 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_TRACE_CATEGORIES_H_
#define RTC_BASE_TRACE_CATEGORIES_H_
#define PERFETTO_ENABLE_LEGACY_TRACE_EVENTS 1
#include "rtc_base/system/rtc_export.h"
#include "third_party/perfetto/include/perfetto/tracing/track_event.h" // IWYU pragma: export
#include "third_party/perfetto/include/perfetto/tracing/track_event_category_registry.h"
#include "third_party/perfetto/include/perfetto/tracing/track_event_legacy.h" // IWYU pragma: export
PERFETTO_DEFINE_TEST_CATEGORY_PREFIXES("webrtc-test");
PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
webrtc,
RTC_EXPORT,
perfetto::Category("webrtc"),
perfetto::Category("webrtc_stats"),
perfetto::Category(TRACE_DISABLED_BY_DEFAULT("webrtc")),
perfetto::Category(TRACE_DISABLED_BY_DEFAULT("webrtc_stats")));
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE(webrtc);
#endif // RTC_BASE_TRACE_CATEGORIES_H_