*/
int need_vlib_worker_thread_node_runtime_update;
+ /* Dispatch loop time accounting */
+ u64 loops_this_reporting_interval;
+ f64 loop_interval_end;
+ f64 loop_interval_start;
+ f64 loops_per_second;
+ f64 seconds_per_loop;
+ f64 damping_constant;
+
/*
* Barrier epoch - Set to current time, each time barrier_sync or
* barrier_release is called with zero recursion.
uword *processing_rpc_requests;
clib_spinlock_t pending_rpc_lock;
+ /* buffer fault injector */
+ u32 buffer_alloc_success_seed;
+ f64 buffer_alloc_success_rate;
+
} vlib_main_t;
/* Global main structure. */
always_inline f64
vlib_time_now (vlib_main_t * vm)
{
+#if CLIB_DEBUG > 0
+ extern __thread uword __os_thread_index;
+#endif
+ /*
+ * Make sure folks don't pass &vlib_global_main from a worker thread.
+ */
+ ASSERT (vm->thread_index == __os_thread_index);
return clib_time_now (&vm->clib_time) + vm->time_offset;
}