FD.io VPP  v16.06
Vector Packet Processing
elog.h File Reference
+ Include dependency graph for elog.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  elog_event_t
 
struct  elog_event_type_t
 
struct  elog_track_t
 
struct  elog_time_stamp_t
 
struct  elog_main_t
 

Macros

#define ELOG_TYPE_DECLARE(f)   static elog_event_type_t __ELOG_TYPE_VAR(f)
 
#define ELOG_TYPE_INIT_FORMAT_AND_FUNCTION(fmt, func)   { .format = fmt, .function = func, }
 
#define ELOG_TYPE_INIT(fmt)   ELOG_TYPE_INIT_FORMAT_AND_FUNCTION(fmt,(char *) __FUNCTION__)
 
#define ELOG_TYPE_DECLARE_HELPER(f, fmt, func)
 
#define ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION(f, fmt)   ELOG_TYPE_DECLARE_HELPER (f, fmt, (char *) __FUNCTION__)
 
#define ELOG_TYPE_DECLARE_FORMAT(f, fmt)   ELOG_TYPE_DECLARE_HELPER (f, fmt, 0)
 
#define ELOG_TYPE(f, fmt)   ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION(f,fmt)
 
#define ELOG_TYPE_D(f)   ELOG_TYPE_DECLARE_FORMAT (f, #f " %d")
 
#define ELOG_TYPE_X(f)   ELOG_TYPE_DECLARE_FORMAT (f, #f " 0x%x")
 
#define ELOG_TYPE_DF(f)   ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " %d")
 
#define ELOG_TYPE_XF(f)   ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " 0x%x")
 
#define ELOG_TYPE_FD(f)   ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " %d")
 
#define ELOG_TYPE_FX(f)   ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " 0x%x")
 
#define ELOG_TRACK_DECLARE(f)   static elog_track_t __ELOG_TRACK_VAR(f)
 
#define ELOG_TRACK(f)   ELOG_TRACK_DECLARE(f) = { .name = #f, }
 
#define ELOG(em, f, data)   elog ((em), &__ELOG_TYPE_VAR(f), data)
 
#define ELOG_INLINE(em, f, data)   elog_inline ((em), &__ELOG_TYPE_VAR(f), data)
 
#define ELOG_TRACK_DATA(em, f, track)   elog_data ((em), &__ELOG_TYPE_VAR(f), &__ELOG_TRACK_VAR(track))
 
#define ELOG_TRACK_DATA_INLINE(em, f, track)   elog_data_inline ((em), &__ELOG_TYPE_VAR(f), &__ELOG_TRACK_VAR(track))
 
#define ELOG_DATA(em, f)   elog_data ((em), &__ELOG_TYPE_VAR (f), &(em)->default_track)
 
#define ELOG_DATA_INLINE(em, f)   elog_data_inline ((em), &__ELOG_TYPE_VAR (f), &(em)->default_track)
 

Functions

always_inline uword elog_n_events_in_buffer (elog_main_t *em)
 
always_inline uword elog_buffer_capacity (elog_main_t *em)
 
always_inline void elog_reset_buffer (elog_main_t *em)
 
always_inline void elog_enable_disable (elog_main_t *em, int is_enabled)
 
always_inline void elog_disable_after_events (elog_main_t *em, uword n)
 
always_inline void elog_disable_trigger (elog_main_t *em)
 
word elog_event_type_register (elog_main_t *em, elog_event_type_t *t)
 
word elog_track_register (elog_main_t *em, elog_track_t *t)
 
always_inline uword elog_is_enabled (elog_main_t *em)
 
always_inline voidelog_event_data_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
voidelog_event_data (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
always_inline voidelog_event_data_not_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
always_inline void elog (elog_main_t *em, elog_event_type_t *type, u32 data)
 
always_inline void elog_inline (elog_main_t *em, elog_event_type_t *type, u32 data)
 
always_inline void elog_track (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
 
always_inline void elog_track_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
 
always_inline voidelog_data (elog_main_t *em, elog_event_type_t *type, elog_track_t *track)
 
always_inline voidelog_data_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track)
 
u32 elog_string (elog_main_t *em, char *format,...)
 
void elog_time_now (elog_time_stamp_t *et)
 
elog_event_telog_get_events (elog_main_t *em)
 
elog_event_telog_peek_events (elog_main_t *em)
 
void elog_merge (elog_main_t *dst, u8 *dst_tag, elog_main_t *src, u8 *src_tag)
 
u8format_elog_event (u8 *s, va_list *va)
 
u8format_elog_track (u8 *s, va_list *va)
 
void serialize_elog_main (serialize_main_t *m, va_list *va)
 
void unserialize_elog_main (serialize_main_t *m, va_list *va)
 
void elog_init (elog_main_t *em, u32 n_events)
 
void elog_alloc (elog_main_t *em, u32 n_events)
 
always_inline clib_error_telog_write_file (elog_main_t *em, char *unix_file)
 
always_inline clib_error_telog_read_file (elog_main_t *em, char *unix_file)
 

Macro Definition Documentation

#define ELOG (   em,
  f,
  data 
)    elog ((em), &__ELOG_TYPE_VAR(f), data)

Definition at line 376 of file elog.h.

#define ELOG_DATA (   em,
 
)    elog_data ((em), &__ELOG_TYPE_VAR (f), &(em)->default_track)

Definition at line 386 of file elog.h.

#define ELOG_DATA_INLINE (   em,
 
)    elog_data_inline ((em), &__ELOG_TYPE_VAR (f), &(em)->default_track)

Definition at line 387 of file elog.h.

#define ELOG_INLINE (   em,
  f,
  data 
)    elog_inline ((em), &__ELOG_TYPE_VAR(f), data)

Definition at line 377 of file elog.h.

#define ELOG_TRACK (   f)    ELOG_TRACK_DECLARE(f) = { .name = #f, }

Definition at line 373 of file elog.h.

#define ELOG_TRACK_DATA (   em,
  f,
  track 
)    elog_data ((em), &__ELOG_TYPE_VAR(f), &__ELOG_TRACK_VAR(track))

Definition at line 380 of file elog.h.

#define ELOG_TRACK_DATA_INLINE (   em,
  f,
  track 
)    elog_data_inline ((em), &__ELOG_TYPE_VAR(f), &__ELOG_TRACK_VAR(track))

Definition at line 382 of file elog.h.

#define ELOG_TRACK_DECLARE (   f)    static elog_track_t __ELOG_TRACK_VAR(f)

Definition at line 372 of file elog.h.

#define ELOG_TYPE (   f,
  fmt 
)    ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION(f,fmt)

Definition at line 364 of file elog.h.

#define ELOG_TYPE_D (   f)    ELOG_TYPE_DECLARE_FORMAT (f, #f " %d")

Definition at line 365 of file elog.h.

#define ELOG_TYPE_DECLARE (   f)    static elog_event_type_t __ELOG_TYPE_VAR(f)

Definition at line 344 of file elog.h.

#define ELOG_TYPE_DECLARE_FORMAT (   f,
  fmt 
)    ELOG_TYPE_DECLARE_HELPER (f, fmt, 0)

Definition at line 359 of file elog.h.

#define ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (   f,
  fmt 
)    ELOG_TYPE_DECLARE_HELPER (f, fmt, (char *) __FUNCTION__)

Definition at line 356 of file elog.h.

#define ELOG_TYPE_DECLARE_HELPER (   f,
  fmt,
  func 
)
Value:
static elog_event_type_t __ELOG_TYPE_VAR(f) = \
#define ELOG_TYPE_INIT_FORMAT_AND_FUNCTION(fmt, func)
Definition: elog.h:346

Definition at line 352 of file elog.h.

#define ELOG_TYPE_DF (   f)    ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " %d")

Definition at line 367 of file elog.h.

#define ELOG_TYPE_FD (   f)    ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " %d")

Definition at line 369 of file elog.h.

#define ELOG_TYPE_FX (   f)    ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " 0x%x")

Definition at line 370 of file elog.h.

#define ELOG_TYPE_INIT (   fmt)    ELOG_TYPE_INIT_FORMAT_AND_FUNCTION(fmt,(char *) __FUNCTION__)

Definition at line 349 of file elog.h.

#define ELOG_TYPE_INIT_FORMAT_AND_FUNCTION (   fmt,
  func 
)    { .format = fmt, .function = func, }

Definition at line 346 of file elog.h.

#define ELOG_TYPE_X (   f)    ELOG_TYPE_DECLARE_FORMAT (f, #f " 0x%x")

Definition at line 366 of file elog.h.

#define ELOG_TYPE_XF (   f)    ELOG_TYPE_DECLARE_FORMAT_AND_FUNCTION (f, #f " 0x%x")

Definition at line 368 of file elog.h.

Function Documentation

always_inline void elog ( elog_main_t em,
elog_event_type_t type,
u32  data 
)

Definition at line 278 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void elog_alloc ( elog_main_t em,
u32  n_events 
)

Definition at line 422 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword elog_buffer_capacity ( elog_main_t em)

Definition at line 171 of file elog.h.

+ Here is the caller graph for this function:

always_inline void* elog_data ( elog_main_t em,
elog_event_type_t type,
elog_track_t track 
)

Definition at line 325 of file elog.h.

+ Here is the call graph for this function:

always_inline void* elog_data_inline ( elog_main_t em,
elog_event_type_t type,
elog_track_t track 
)

Definition at line 333 of file elog.h.

+ Here is the call graph for this function:

always_inline void elog_disable_after_events ( elog_main_t em,
uword  n 
)

Definition at line 193 of file elog.h.

always_inline void elog_disable_trigger ( elog_main_t em)

Definition at line 199 of file elog.h.

+ Here is the call graph for this function:

always_inline void elog_enable_disable ( elog_main_t em,
int  is_enabled 
)

Definition at line 182 of file elog.h.

+ Here is the caller graph for this function:

void* elog_event_data ( elog_main_t em,
elog_event_type_t type,
elog_track_t track,
u64  cpu_time 
)

Definition at line 63 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void* elog_event_data_inline ( elog_main_t em,
elog_event_type_t type,
elog_track_t track,
u64  cpu_time 
)

Definition at line 213 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void* elog_event_data_not_inline ( elog_main_t em,
elog_event_type_t type,
elog_track_t track,
u64  cpu_time 
)

Definition at line 265 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

word elog_event_type_register ( elog_main_t em,
elog_event_type_t t 
)

Definition at line 98 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

elog_event_t* elog_get_events ( elog_main_t em)

Definition at line 513 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void elog_init ( elog_main_t em,
u32  n_events 
)

Definition at line 435 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void elog_inline ( elog_main_t em,
elog_event_type_t type,
u32  data 
)

Definition at line 290 of file elog.h.

+ Here is the call graph for this function:

always_inline uword elog_is_enabled ( elog_main_t em)

Definition at line 207 of file elog.h.

+ Here is the caller graph for this function:

void elog_merge ( elog_main_t dst,
u8 dst_tag,
elog_main_t src,
u8 src_tag 
)

Definition at line 575 of file elog.c.

+ Here is the call graph for this function:

always_inline uword elog_n_events_in_buffer ( elog_main_t em)

Definition at line 167 of file elog.h.

+ Here is the caller graph for this function:

elog_event_t* elog_peek_events ( elog_main_t em)

Definition at line 474 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline clib_error_t* elog_read_file ( elog_main_t em,
char *  unix_file 
)

Definition at line 430 of file elog.h.

+ Here is the call graph for this function:

always_inline void elog_reset_buffer ( elog_main_t em)

Definition at line 175 of file elog.h.

+ Here is the caller graph for this function:

u32 elog_string ( elog_main_t em,
char *  format,
  ... 
)

Definition at line 496 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void elog_time_now ( elog_time_stamp_t et)

Definition at line 382 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void elog_track ( elog_main_t em,
elog_event_type_t type,
elog_track_t track,
u32  data 
)

Definition at line 301 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void elog_track_inline ( elog_main_t em,
elog_event_type_t type,
elog_track_t track,
u32  data 
)

Definition at line 313 of file elog.h.

+ Here is the call graph for this function:

word elog_track_register ( elog_main_t em,
elog_track_t t 
)

Definition at line 179 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline clib_error_t* elog_write_file ( elog_main_t em,
char *  unix_file 
)

Definition at line 415 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_elog_event ( u8 s,
va_list *  va 
)

Definition at line 274 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_elog_track ( u8 s,
va_list *  va 
)

Definition at line 374 of file elog.c.

+ Here is the call graph for this function:

void serialize_elog_main ( serialize_main_t m,
va_list *  va 
)

Definition at line 949 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unserialize_elog_main ( serialize_main_t m,
va_list *  va 
)

Definition at line 980 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: