Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:49

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file corecel/sys/detail/TrackEvent.perfetto.hh
0007 //! \brief Define perfetto track event categories
0008 //---------------------------------------------------------------------------//
0009 #pragma once
0010 
0011 #include <perfetto.h>
0012 
0013 namespace celeritas
0014 {
0015 namespace detail
0016 {
0017 //---------------------------------------------------------------------------//
0018 //! Global category name for celeritas
0019 //! TODO: add more categories for fine-grained control of events to record
0020 inline constexpr auto* perfetto_track_event_category{"Celeritas"};
0021 
0022 //---------------------------------------------------------------------------//
0023 }  // namespace detail
0024 }  // namespace celeritas
0025 
0026 // This declaration needs to be available when calling perfetto's
0027 // TRACE_EVENT_BEGIN (i.e. ScopedProfiling TU) and when initializing a tracing
0028 // session (i.e. TracingSession TU). Adding this in a public header would
0029 // propagate perfetto dependency to downstream so hide it in a header to be
0030 // included by corecel TU only.
0031 PERFETTO_DEFINE_CATEGORIES(
0032     perfetto::Category(celeritas::detail::perfetto_track_event_category)
0033         .SetDescription("Events from the celeritas "
0034                         "library"));