|
#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) |
|
|
static uword | elog_n_events_in_buffer (elog_main_t *em) |
| Return number of events in the event-log buffer. More...
|
|
static uword | elog_buffer_capacity (elog_main_t *em) |
| Return number of events which can fit in the event buffer. More...
|
|
static void | elog_reset_buffer (elog_main_t *em) |
| Reset the event buffer. More...
|
|
static void | elog_enable_disable (elog_main_t *em, int is_enabled) |
| Enable or disable event logging. More...
|
|
static void | elog_disable_after_events (elog_main_t *em, uword n) |
| disable logging after specified number of ievents have been logged. More...
|
|
static void | elog_disable_trigger (elog_main_t *em) |
|
word | elog_event_type_register (elog_main_t *em, elog_event_type_t *t) |
| register an event type More...
|
|
word | elog_track_register (elog_main_t *em, elog_track_t *t) |
| register an event track More...
|
|
static uword | elog_is_enabled (elog_main_t *em) |
| event logging enabled predicate More...
|
|
static void * | elog_event_data_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u64 cpu_time) |
| Allocate an event to be filled in by the caller. More...
|
|
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) |
| Allocate an event to be filled in by the caller, non-inline. More...
|
|
static void | elog (elog_main_t *em, elog_event_type_t *type, u32 data) |
| Log a single-datum event. More...
|
|
static void | elog_inline (elog_main_t *em, elog_event_type_t *type, u32 data) |
| Log a single-datum event, inline version. More...
|
|
static void | elog_track (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data) |
| Log a single-datum event to a specific track, non-inline version. More...
|
|
static void | elog_track_inline (elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data) |
| Log a single-datum event to a specific track. More...
|
|
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,...) |
| add a string to the event-log string table More...
|
|
void | elog_time_now (elog_time_stamp_t *et) |
|
elog_event_t * | elog_get_events (elog_main_t *em) |
| convert event ring events to events, and return them as a vector. More...
|
|
elog_event_t * | elog_peek_events (elog_main_t *em) |
| convert event ring events to events, and return them as a vector. More...
|
|
void | elog_merge (elog_main_t *dst, u8 *dst_tag, elog_main_t *src, u8 *src_tag, f64 align_tweak) |
|
u8 * | format_elog_event (u8 *s, va_list *va) |
|
u8 * | format_elog_track_name (u8 *s, va_list *va) |
|
u8 * | format_elog_track (u8 *s, va_list *args) |
|
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) |
|
void | elog_resize (elog_main_t *em, u32 n_events) |
|
static clib_error_t * | elog_write_file (elog_main_t *em, char *clib_file, int flush_ring) |
|
clib_error_t * | elog_write_file_not_inline (elog_main_t *em, char *clib_file, int flush_ring) |
|
static clib_error_t * | elog_read_file (elog_main_t *em, char *clib_file) |
|
clib_error_t * | elog_read_file_not_inline (elog_main_t *em, char *clib_file) |
|
char * | format_one_elog_event (void *em_arg, void *ep_arg) |
|
The fine-grained event logger allows lightweight, thread-safe event logging at minimum cost. In typical operation, logging a single event costs around 80ns on x86_64. It's appropriate for at-least per-frame event-logging in vector packet processing.
See https://wiki.fd.io/view/VPP/elog for more information.
Definition in file elog.h.