FD.io VPP  v16.12-rc0-308-g931be3a
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

static uword elog_n_events_in_buffer (elog_main_t *em)
 
static uword elog_buffer_capacity (elog_main_t *em)
 
static void elog_reset_buffer (elog_main_t *em)
 
static void elog_enable_disable (elog_main_t *em, int is_enabled)
 
static void elog_disable_after_events (elog_main_t *em, uword n)
 
static 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)
 
static uword elog_is_enabled (elog_main_t *em)
 
static void * elog_event_data_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
void * elog_event_data (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
static void * elog_event_data_not_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time)
 
static void elog (elog_main_t *em, elog_event_type_t *type, u32 data)
 
static void elog_inline (elog_main_t *em, elog_event_type_t *type, u32 data)
 
static void elog_track (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
 
static void elog_track_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
 
static void * elog_data (elog_main_t *em, elog_event_type_t *type, elog_track_t *track)
 
static void * elog_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)
 
static clib_error_telog_write_file (elog_main_t *em, char *unix_file)
 
static 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 382 of file elog.h.

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

Definition at line 392 of file elog.h.

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

Definition at line 393 of file elog.h.

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

Definition at line 383 of file elog.h.

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

Definition at line 379 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 386 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 388 of file elog.h.

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

Definition at line 378 of file elog.h.

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

Definition at line 370 of file elog.h.

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

Definition at line 371 of file elog.h.

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

Definition at line 350 of file elog.h.

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

Definition at line 365 of file elog.h.

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

Definition at line 362 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:352

Definition at line 358 of file elog.h.

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

Definition at line 373 of file elog.h.

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

Definition at line 375 of file elog.h.

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

Definition at line 376 of file elog.h.

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

Definition at line 355 of file elog.h.

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

Definition at line 352 of file elog.h.

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

Definition at line 372 of file elog.h.

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

Definition at line 374 of file elog.h.

Function Documentation

static void elog ( elog_main_t em,
elog_event_type_t type,
u32  data 
)
inlinestatic

Definition at line 291 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 443 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword elog_buffer_capacity ( elog_main_t em)
inlinestatic

Definition at line 179 of file elog.h.

+ Here is the caller graph for this function:

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

Definition at line 334 of file elog.h.

+ Here is the call graph for this function:

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

Definition at line 340 of file elog.h.

+ Here is the call graph for this function:

static void elog_disable_after_events ( elog_main_t em,
uword  n 
)
inlinestatic

Definition at line 203 of file elog.h.

static void elog_disable_trigger ( elog_main_t em)
inlinestatic

Definition at line 211 of file elog.h.

+ Here is the call graph for this function:

static void elog_enable_disable ( elog_main_t em,
int  is_enabled 
)
inlinestatic

Definition at line 192 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 65 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 230 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 279 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 103 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 543 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 457 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elog_inline ( elog_main_t em,
elog_event_type_t type,
u32  data 
)
inlinestatic

Definition at line 302 of file elog.h.

+ Here is the call graph for this function:

static uword elog_is_enabled ( elog_main_t em)
inlinestatic

Definition at line 222 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 607 of file elog.c.

+ Here is the call graph for this function:

static uword elog_n_events_in_buffer ( elog_main_t em)
inlinestatic

Definition at line 173 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 500 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* elog_read_file ( elog_main_t em,
char *  unix_file 
)
inlinestatic

Definition at line 436 of file elog.h.

+ Here is the call graph for this function:

static void elog_reset_buffer ( elog_main_t em)
inlinestatic

Definition at line 185 of file elog.h.

+ Here is the caller graph for this function:

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

Definition at line 525 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 400 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 312 of file elog.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 323 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 190 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* elog_write_file ( elog_main_t em,
char *  unix_file 
)
inlinestatic

Definition at line 421 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 288 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 391 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 990 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 1020 of file elog.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: