47 new_tail = __sync_add_and_fetch (&cjm->
tail, 1);
135 fprintf (stderr,
"[%d]: %10.6f T%02d %llx %llx\n",
137 (
long long unsigned int) r->
data[0],
138 (
long long unsigned int) r->
data[1]);
143 u8 filter1_enable,
u64 filter1)
151 fprintf (stderr,
"CJ not configured...\n");
157 fprintf (stderr,
"No data collected...\n");
170 if (filter0_enable && (r->
data[0] != filter0))
172 if (filter1_enable && (r->
data[1] != filter1))
181 for (i = 0; i <= cjm->
tail; i++)
183 if (filter0_enable && (r->
data[0] != filter0))
185 if (filter1_enable && (r->
data[1] != filter1))
234 else if (
unformat (line_input,
"disable")
237 else if (
unformat (line_input,
"dump"))
272 .short_help =
"cj <enable | disable | dump>",
void cj_dump_filter_data12(u64 filter0, u64 filter1)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static f64 vlib_time_now(vlib_main_t *vm)
static clib_error_t * cj_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void cj_dump_filter_data1(u64 filter1)
void cj_enable_disable(int is_enable)
memset(h->entries, 0, sizeof(h->entries[0])*entries)
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
void cj_log(u32 type, void *data0, void *data1)
#define VLIB_CONFIG_FUNCTION(x, n,...)
static void cj_dump_one_record(cj_record_t *r)
static_always_inline uword vlib_get_thread_index(void)
static uword max_pow2(uword x)
#define VLIB_CLI_COMMAND(x,...)
void cj_dump_filter_data0(u64 filter0)
clib_error_t * cj_init(vlib_main_t *vm)
static uword pointer_to_uword(const void *p)
static void cj_dump_internal(u8 filter0_enable, u64 filter0, u8 filter1_enable, u64 filter1)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * cj_config(vlib_main_t *vm, unformat_input_t *input)