blob: 2fbfe121465cc2fa7f136860ab14fa958a38abb0 [file] [log] [blame]
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TRACE_CATEGORIES_H
#define TRACE_CATEGORIES_H
// This source file can be built in two ways:
// 1. As part of the regular GN build, against standard includes.
// 2. To test that the amalgmated SDK works, against the perfetto.h source.
#ifdef PERFETTO_SDK_EXAMPLE_USE_INTERNAL_HEADERS
#include "perfetto/tracing/core/trace_config.h"
#include "perfetto/tracing/tracing.h"
#include "perfetto/tracing/track_event.h"
#include "protos/perfetto/trace/track_event/process_descriptor.gen.h"
#else
#include <perfetto.h>
#endif
// The set of track event categories that the example is using.
PERFETTO_DEFINE_CATEGORIES(
perfetto::Category("rendering")
.SetDescription("Rendering and graphics events"),
perfetto::Category("network.debug")
.SetTags("debug")
.SetDescription("Verbose network events"),
perfetto::Category("audio.latency")
.SetTags("verbose")
.SetDescription("Detailed audio latency metrics"));
#endif // TRACE_CATEGORIES_H