- shared_header->opaque[STAT_SEGMENT_OPAQUE_LOCK] = sm->stat_segment_lockp;
- shared_header->opaque[STAT_SEGMENT_OPAQUE_EPOCH] = (void *) 1;
-
- /* Set up a few scalar stats */
-
- scalar_data = clib_mem_alloc_aligned (CLIB_CACHE_LINE_BYTES,
- CLIB_CACHE_LINE_BYTES);
- sm->vector_rate_ptr = (scalar_data + 0);
- sm->input_rate_ptr = (scalar_data + 1);
- sm->last_runtime_ptr = (scalar_data + 2);
- sm->last_runtime_stats_clear_ptr = (scalar_data + 3);
- sm->heartbeat_ptr = (scalar_data + 4);
-
- name = format (0, "/sys/vector_rate%c", 0);
- ep = clib_mem_alloc (sizeof (*ep));
- ep->type = STAT_DIR_TYPE_SCALAR_POINTER;
- ep->value = sm->vector_rate_ptr;
-
- hash_set_mem (sm->counter_vector_by_name, name, ep);
-
- name = format (0, "/sys/input_rate%c", 0);
- ep = clib_mem_alloc (sizeof (*ep));
- ep->type = STAT_DIR_TYPE_SCALAR_POINTER;
- ep->value = sm->input_rate_ptr;
-
- hash_set_mem (sm->counter_vector_by_name, name, ep);