Phosphor
phosphor::TraceContext Class Reference

#include <trace_context.h>

Public Types

using ThreadNamesMap = std::unordered_map< uint64_t, std::string >
 

Public Member Functions

 TraceContext (std::unique_ptr< TraceBuffer > &&buffer)
 
 TraceContext (std::unique_ptr< TraceBuffer > &&buffer, const ThreadNamesMap &_thread_names)
 
 TraceContext (TraceContext &&other)
 
TraceContextoperator= (TraceContext &&other)
 
const TraceBuffergetBuffer () const
 
TraceBuffergetBuffer ()
 
const ThreadNamesMap & getThreadNames () const
 

Protected Member Functions

void addThreadName (uint64_t id, const std::string &name)
 

Detailed Description

TraceContext is an object which encapsulates all information and metadata surrounding a trace that might be required to perform an export.

The TraceContext enforces movement semantics as it contains a std::unique_ptr

Member Function Documentation

void phosphor::TraceContext::addThreadName ( uint64_t  id,
const std::string &  name 
)
protected

Add an element to the thread name map.

TraceBuffer* phosphor::TraceContext::getBuffer ( )
inline

Return a pointer to the trace buffer for this context.

const ThreadNamesMap& phosphor::TraceContext::getThreadNames ( ) const
inline

Return the map of thread IDs -> names


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