OpenSDN source code
|
#include <trace.h>
Public Member Functions | |
TraceBuffer (const std::string &buf_name, size_t size, bool trace_enable) | |
~TraceBuffer () | |
std::string | Name () |
void | TraceOn () |
void | TraceOff () |
bool | IsTraceOn () |
size_t | TraceBufSizeGet () |
size_t | TraceBufCapacityGet () |
void | TraceBufCapacityReset (size_t size) |
void | TraceWrite (TraceEntryT *trace_entry) |
uint32_t | GetNextSeqNum () |
void | TraceRead (const std::string &context, const int count, boost::function< void(TraceEntryT *, bool)> cb) |
void | TraceReadDone (const std::string &context) |
Private Types | |
typedef boost::ptr_circular_buffer < TraceEntryT > | ContainerType |
typedef std::map< const std::string, boost::shared_ptr < size_t > > | ReadContextMap |
Private Member Functions | |
DISALLOW_COPY_AND_ASSIGN (TraceBuffer) | |
Private Attributes | |
std::string | trace_buf_name_ |
size_t | trace_buf_size_ |
ContainerType | trace_buf_ |
tbb::atomic< bool > | trace_enable_ |
size_t | write_index_ |
size_t | read_index_ |
bool | wrap_ |
ReadContextMap | read_context_map_ |
tbb::atomic< uint32_t > | seqno_ |
tbb::mutex | mutex_ |
Static Private Attributes | |
static const uint32_t | kMaxSeqno = ((2 ^ 32) - 1) - 1 |
static const uint32_t | kMinSeqno = 1 |
|
private |
|
private |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |