guanaqo 1.0.0-alpha.25
Utilities for scientific software
Loading...
Searching...
No Matches
Perfetto Tracing

Detailed Description

Perfetto track events, tracing sessions, and FLOP counting.

Collaboration diagram for Perfetto Tracing:

Files

file  trace.hpp
 Perfetto tracing macros and session helpers.

Classes

struct  guanaqo::trace::ScopedLinalgCounters

Macros

#define GUANAQO_TRACE_LINALG(name, gflops)
#define GUANAQO_TRACE_INSTANT(name, instance)
#define GUANAQO_TRACE_REGION(name, instance)
#define GUANAQO_TRACE(name, instance, ...)
#define GUANAQO_TRACE_STATIC_STR(s)

Functions

void guanaqo::trace::initialize_tracing ()
 Initialize Perfetto for in-process tracing and register guanaqo's track event categories.
std::unique_ptr<::perfetto::TracingSession > guanaqo::trace::start_tracing (uint32_t memory_kb=128 *1024)
 Start a new tracing session with the specified buffer size in KiB.
void guanaqo::trace::abort_tracing (std::unique_ptr<::perfetto::TracingSession > tracing_session)
 Stop the tracing session and discard the trace data.
void guanaqo::trace::stop_tracing (std::unique_ptr<::perfetto::TracingSession > tracing_session, const fs::path &output_path)
 Stop the tracing session and write the trace data to the specified output file.
uint64_t & guanaqo::trace::get_thread_gflop_count ()
 Get a reference to the thread-local GFLOP counter.

Macro Definition Documentation

◆ GUANAQO_TRACE_LINALG

#define GUANAQO_TRACE_LINALG ( name,
gflops )

#include <guanaqo/perfetto/trace.hpp>

Value:
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE_SCOPED(guanaqo::trace); \
GUANAQO_TRACE_LINALG_IMPL(name, gflops)

Definition at line 119 of file trace.hpp.

◆ GUANAQO_TRACE_INSTANT

#define GUANAQO_TRACE_INSTANT ( name,
instance )

#include <guanaqo/perfetto/trace.hpp>

Value:
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE_SCOPED(guanaqo::trace); \
GUANAQO_TRACE_INSTANT_IMPL(name, instance)

Definition at line 123 of file trace.hpp.

◆ GUANAQO_TRACE_REGION

#define GUANAQO_TRACE_REGION ( name,
instance )

#include <guanaqo/perfetto/trace.hpp>

Value:
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE_SCOPED(guanaqo::trace); \
GUANAQO_TRACE_REGION_IMPL(name, instance)

Definition at line 127 of file trace.hpp.

◆ GUANAQO_TRACE

#define GUANAQO_TRACE ( name,
instance,
... )

#include <guanaqo/perfetto/trace.hpp>

Value:
PERFETTO_USE_CATEGORIES_FROM_NAMESPACE_SCOPED(guanaqo::trace); \
GUANAQO_TRACE_REGION(name, instance)

Definition at line 132 of file trace.hpp.

◆ GUANAQO_TRACE_STATIC_STR

#define GUANAQO_TRACE_STATIC_STR ( s)

#include <guanaqo/perfetto/trace.hpp>

Value:
::perfetto::StaticString { s }

Definition at line 136 of file trace.hpp.

Function Documentation

◆ initialize_tracing()

void guanaqo::trace::initialize_tracing ( )

#include <guanaqo/perfetto/trace.hpp>

Initialize Perfetto for in-process tracing and register guanaqo's track event categories.

Definition at line 16 of file trace.cpp.

◆ start_tracing()

std::unique_ptr<::perfetto::TracingSession > guanaqo::trace::start_tracing ( uint32_t memory_kb = 128 * 1024)

#include <guanaqo/perfetto/trace.hpp>

Start a new tracing session with the specified buffer size in KiB.

Definition at line 24 of file trace.cpp.

◆ abort_tracing()

void guanaqo::trace::abort_tracing ( std::unique_ptr<::perfetto::TracingSession > tracing_session)

#include <guanaqo/perfetto/trace.hpp>

Stop the tracing session and discard the trace data.

Definition at line 38 of file trace.cpp.

◆ stop_tracing()

void guanaqo::trace::stop_tracing ( std::unique_ptr<::perfetto::TracingSession > tracing_session,
const fs::path & output_path )

#include <guanaqo/perfetto/trace.hpp>

Stop the tracing session and write the trace data to the specified output file.

Definition at line 43 of file trace.cpp.

◆ get_thread_gflop_count()

uint64_t & guanaqo::trace::get_thread_gflop_count ( )

#include <guanaqo/perfetto/trace.hpp>

Get a reference to the thread-local GFLOP counter.

Definition at line 11 of file trace.cpp.

Here is the caller graph for this function: