Zth (libzth)
zth::PerfEvent< Enable > Struct Template Reference

An event to be processed by perf_event(). More...

#include <perf.h>

Public Types

enum  Type {
  Nothing , FiberName , FiberState , Log ,
  Marker
}
 

Public Member Functions

constexpr PerfEvent () noexcept
 
 PerfEvent (UniqueID< Fiber > const &fiber)
 
 PerfEvent (UniqueID< Fiber > const &fiber, int state, Timestamp const &t=Timestamp::now()) noexcept
 
 PerfEvent (UniqueID< Fiber > const &fiber, string const &str, Timestamp const &t=Timestamp::now())
 
 PerfEvent (UniqueID< Fiber > const &fiber, char const *marker, Timestamp const &t=Timestamp::now()) noexcept
 
 PerfEvent (UniqueID< Fiber > const &fiber, Timestamp const &t, char const *fmt,...)
 
 PerfEvent (UniqueID< Fiber > const &fiber, Timestamp const &t, char const *fmt, va_list args)
 
void release () const
 

Public Attributes

Timestamp t
 
uint64_t fiber
 
Type type
 
union {
   void *   unused
 
   char *   str
 
   char const *   c_str
 
   int   fiberState
 
}; 
 

Detailed Description

template<bool Enable = Config::EnablePerfEvent>
struct zth::PerfEvent< Enable >

An event to be processed by perf_event().

Definition at line 106 of file perf.h.

Member Enumeration Documentation

◆ Type

template<bool Enable = Config::EnablePerfEvent>
enum zth::PerfEvent::Type
Enumerator
Nothing 
FiberName 
FiberState 
Log 
Marker 

Definition at line 107 of file perf.h.

Constructor & Destructor Documentation

◆ PerfEvent() [1/7]

template<bool Enable = Config::EnablePerfEvent>
constexpr zth::PerfEvent< Enable >::PerfEvent ( )
inlineconstexprnoexcept

Definition at line 109 of file perf.h.

◆ PerfEvent() [2/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber)
inlineexplicit

Definition at line 115 of file perf.h.

◆ PerfEvent() [3/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber,
int  state,
Timestamp const &  t = Timestamp::now() 
)
inlinenoexcept

Definition at line 121 of file perf.h.

◆ PerfEvent() [4/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber,
string const &  str,
Timestamp const &  t = Timestamp::now() 
)
inline

Definition at line 130 of file perf.h.

◆ PerfEvent() [5/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber,
char const *  marker,
Timestamp const &  t = Timestamp::now() 
)
inlinenoexcept

Definition at line 139 of file perf.h.

◆ PerfEvent() [6/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber,
Timestamp const &  t,
char const *  fmt,
  ... 
)
inline

Definition at line 149 of file perf.h.

◆ PerfEvent() [7/7]

template<bool Enable = Config::EnablePerfEvent>
zth::PerfEvent< Enable >::PerfEvent ( UniqueID< Fiber > const &  fiber,
Timestamp const &  t,
char const *  fmt,
va_list  args 
)
inline

Definition at line 162 of file perf.h.

Member Function Documentation

◆ release()

template<bool Enable = Config::EnablePerfEvent>
void zth::PerfEvent< Enable >::release ( ) const
inline

Definition at line 176 of file perf.h.

Member Data Documentation

◆ 

union { ... }

◆ c_str

template<bool Enable = Config::EnablePerfEvent>
char const* zth::PerfEvent< Enable >::c_str

Definition at line 194 of file perf.h.

◆ fiber

template<bool Enable = Config::EnablePerfEvent>
uint64_t zth::PerfEvent< Enable >::fiber

Definition at line 188 of file perf.h.

◆ fiberState

template<bool Enable = Config::EnablePerfEvent>
int zth::PerfEvent< Enable >::fiberState

Definition at line 195 of file perf.h.

◆ str

template<bool Enable = Config::EnablePerfEvent>
char* zth::PerfEvent< Enable >::str

Definition at line 193 of file perf.h.

◆ t

template<bool Enable = Config::EnablePerfEvent>
Timestamp zth::PerfEvent< Enable >::t

Definition at line 187 of file perf.h.

◆ type

template<bool Enable = Config::EnablePerfEvent>
Type zth::PerfEvent< Enable >::type

Definition at line 189 of file perf.h.

◆ unused

template<bool Enable = Config::EnablePerfEvent>
void* zth::PerfEvent< Enable >::unused

Definition at line 192 of file perf.h.


The documentation for this struct was generated from the following file: