#include <vppinfra/bitmap.h>
#include <vppinfra/fifo.h>
#include <vppinfra/time.h>
-#include <vppinfra/mheap.h>
#include <vppinfra/heap.h>
#include <vppinfra/pool.h>
#include <vppinfra/format.h>
int vm_index;
u64 significant_errors = 0;
- /* *INDENT-OFF* */
- clib_bitmap_foreach (code, gm->sig_error_bitmap,
- ({
+ clib_bitmap_foreach (code, gm->sig_error_bitmap)
+ {
for (vm_index = 0; vm_index < vec_len (gm->my_vlib_mains); vm_index++)
{
this_vlib_main = gm->my_vlib_mains[vm_index];
((vec_len(em->counters_last_clear) > code) ?
em->counters_last_clear[code] : 0);
}
- }));
- /* *INDENT-ON* */
+ }
return (significant_errors);
}
/* Initial wait for the world to settle down */
vlib_process_suspend (vm, 5.0);
- if (vec_len (vlib_mains) == 0)
- vec_add1 (gm->my_vlib_mains, &vlib_global_main);
- else
- {
- for (i = 0; i < vec_len (vlib_mains); i++)
- vec_add1 (gm->my_vlib_mains, vlib_mains[i]);
- }
+ for (i = 0; i < vlib_get_n_threads (); i++)
+ vec_add1 (gm->my_vlib_mains, vlib_mains[i]);
while (1)
{
return 0; /* not so much */
}
-/* *INDENT-OFF* */
VLIB_REGISTER_NODE (gmon_process_node,static) = {
.function = gmon_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "gmon-process",
};
-/* *INDENT-ON* */
static clib_error_t *
gmon_init (vlib_main_t * vm)
{
gmon_main_t *gm = &gmon_main;
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
pid_t *swp = 0;
f64 *v = 0;
clib_error_t *error;
gm->vlib_main = vm;
- memset (ma, 0, sizeof (*ma));
+ clib_memset (ma, 0, sizeof (*ma));
ma->root_path = am->root_path;
ma->uid = am->api_uid;
ma->gid = am->api_gid;
return 0;
}
-/* *INDENT-OFF* */
VLIB_CLI_COMMAND (set_significant_error_command, static) = {
.path = "set significant error",
.short_help = "set significant error <counter-index-nnn> [disable]",
.function = set_significant_error_command_fn,
};
-/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON