Celeritas
0.5.0-57+aeecb15
|
RAII wrapper for a tracing session. More...
#include <TracingSession.hh>
Public Member Functions | |
TracingSession () noexcept | |
Start a system tracing session. | |
TracingSession (std::string_view filename) noexcept | |
Start an in-process tracing session. | |
~TracingSession () | |
Block until the current session is closed. | |
void | start () noexcept |
Start the profiling session. | |
CELER_DELETE_COPY_MOVE (TracingSession) | |
RAII wrapper for a tracing session.
Constructors will only configure and initialize the session. It needs to be started explicitly by calling TracingSession::start
Only a single tracing mode is supported. If you are only interested in application-level events (ScopedProfiling
and trace_counter
), then the in-process mode is sufficient and is enabled by providing the trace data filename to the constructor. When using in-process tracing, the buffer size can be configured by setting CELER_PERFETTO_BUFFER_SIZE_MB
.
If no filename is provided, start a system tracing session which records both application-level events and kernel events. Root privilege and Linux ftrace https://kernel.org/doc/Documentation/trace/ftrace.txt are required. To start the system daemons using the perfetto backend, see https://perfetto.dev/docs/quickstart/linux-tracing#capturing-a-trace
TODO: Support multiple tracing mode.