Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PerfettoTracingSingleton Class Reference
Collaboration diagram for PerfettoTracingSingleton:
Collaboration graph
[legend]

Public Member Functions

bool initialise (unsigned backends)
 
bool isTracing () const
 
bool startInProcessTracing (int fd, const std::string &categoryFilter)
 
void stopInProcessTracing ()
 

Static Public Member Functions

static PerfettoTracingSingletoninstance ()
 

Static Private Member Functions

static void cleanUp ()
 

Private Attributes

std::mutex mLock
 
bool mInitialised
 
unsigned mBackends
 
int mTraceFileFd
 
std::unique_ptr< perfetto::TracingSession > mInProcessSession
 

Static Private Attributes

static PerfettoTracingSingletonmInstance = nullptr
 
static pthread_rwlock_t mInstanceLock = PTHREAD_RWLOCK_INITIALIZER
 

Member Function Documentation

◆ initialise()

bool PerfettoTracingSingleton::initialise ( unsigned  backends)

Sets the tracing mode to either 'system' or 'in process'.

This is a one time operation, it is not possible to change the mode once set.

◆ instance()

PerfettoTracingSingleton * PerfettoTracingSingleton::instance ( )
static

Get the singleton instance of the Perfetto tracing interface.

◆ isTracing()

bool PerfettoTracingSingleton::isTracing ( ) const

Returns true if currently tracing.

For in process tracing, this will return true if startInProcessTracing() was called. For system tracing this will only return true if the system traced daemon has started the trace.

◆ startInProcessTracing()

bool PerfettoTracingSingleton::startInProcessTracing ( int  fd,
const std::string &  categoryFilter 
)

Starts an in process trace, writing the trace file to the given fd.

◆ stopInProcessTracing()

void PerfettoTracingSingleton::stopInProcessTracing ( )

Stops the 'in process' tracing.


The documentation for this class was generated from the following files: