aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/stats
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/stats')
-rw-r--r--src/vlib/stats/cli.c4
-rw-r--r--src/vlib/stats/shared.h2
-rw-r--r--src/vlib/stats/stats.c58
-rw-r--r--src/vlib/stats/stats.h4
4 files changed, 0 insertions, 68 deletions
diff --git a/src/vlib/stats/cli.c b/src/vlib/stats/cli.c
index 4d7026b5995..94a852ac751 100644
--- a/src/vlib/stats/cli.c
+++ b/src/vlib/stats/cli.c
@@ -34,10 +34,6 @@ format_stat_dir_entry (u8 *s, va_list *args)
type_name = "CMainPtr";
break;
- case STAT_DIR_TYPE_ERROR_INDEX:
- type_name = "ErrIndex";
- break;
-
case STAT_DIR_TYPE_NAME_VECTOR:
type_name = "NameVector";
break;
diff --git a/src/vlib/stats/shared.h b/src/vlib/stats/shared.h
index d2d5d49cc54..8e44ce3dc86 100644
--- a/src/vlib/stats/shared.h
+++ b/src/vlib/stats/shared.h
@@ -11,7 +11,6 @@ typedef enum
STAT_DIR_TYPE_SCALAR_INDEX,
STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE,
STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED,
- STAT_DIR_TYPE_ERROR_INDEX,
STAT_DIR_TYPE_NAME_VECTOR,
STAT_DIR_TYPE_EMPTY,
STAT_DIR_TYPE_SYMLINK,
@@ -46,7 +45,6 @@ typedef struct
volatile uint64_t epoch;
volatile uint64_t in_progress;
volatile vlib_stats_entry_t *directory_vector;
- volatile uint64_t **error_vector;
} vlib_stats_shared_header_t;
#endif /* included_stat_segment_shared_h */
diff --git a/src/vlib/stats/stats.c b/src/vlib/stats/stats.c
index 61f620469b1..9063fa375e6 100644
--- a/src/vlib/stats/stats.c
+++ b/src/vlib/stats/stats.c
@@ -244,64 +244,6 @@ vlib_stats_add_gauge (char *fmt, ...)
}
void
-vlib_stats_register_error_index (u64 *em_vec, u64 index, char *fmt, ...)
-{
- vlib_stats_segment_t *sm = vlib_stats_get_segment ();
- vlib_stats_shared_header_t *shared_header = sm->shared_header;
- vlib_stats_entry_t e = {};
- va_list va;
- u8 *name;
-
- va_start (va, fmt);
- name = va_format (0, fmt, &va);
- va_end (va);
-
- ASSERT (shared_header);
-
- vlib_stats_segment_lock ();
- u32 vector_index = vlib_stats_find_entry_index ("%v", name);
-
- if (vector_index == STAT_SEGMENT_INDEX_INVALID)
- {
- vec_add1 (name, 0);
- vlib_stats_set_entry_name (&e, (char *) name);
- e.type = STAT_DIR_TYPE_ERROR_INDEX;
- e.index = index;
- vector_index = vlib_stats_create_counter (&e);
-
- /* Warn clients to refresh any pointers they might be holding */
- shared_header->directory_vector = sm->directory_vector;
- }
-
- vlib_stats_segment_unlock ();
- vec_free (name);
-}
-
-void
-vlib_stats_update_error_vector (u64 *error_vector, u32 thread_index, int lock)
-{
- vlib_stats_segment_t *sm = vlib_stats_get_segment ();
- vlib_stats_shared_header_t *shared_header = sm->shared_header;
- void *oldheap = clib_mem_set_heap (sm->heap);
-
- ASSERT (shared_header);
-
- if (lock)
- vlib_stats_segment_lock ();
-
- /* Reset the client hash table pointer, since it WILL change! */
- vec_validate (sm->error_vector, thread_index);
- sm->error_vector[thread_index] = error_vector;
-
- shared_header->error_vector = sm->error_vector;
- shared_header->directory_vector = sm->directory_vector;
-
- if (lock)
- vlib_stats_segment_unlock ();
- clib_mem_set_heap (oldheap);
-}
-
-void
vlib_stats_set_gauge (u32 index, u64 value)
{
vlib_stats_segment_t *sm = vlib_stats_get_segment ();
diff --git a/src/vlib/stats/stats.h b/src/vlib/stats/stats.h
index 6db93719a0c..ef43510b255 100644
--- a/src/vlib/stats/stats.h
+++ b/src/vlib/stats/stats.h
@@ -75,7 +75,6 @@ typedef struct
/* statistics segment */
uword *directory_vector_by_name;
vlib_stats_entry_t *directory_vector;
- volatile u64 **error_vector;
u8 **nodes;
/* Update interval */
@@ -129,9 +128,6 @@ vlib_stats_get_entry_data_pointer (u32 entry_index)
clib_error_t *vlib_stats_init (vlib_main_t *vm);
void *vlib_stats_set_heap ();
-void vlib_stats_register_error_index (u64 *em_vec, u64 index, char *fmt, ...);
-void vlib_stats_update_error_vector (u64 *error_vector, u32 thread_index,
- int lock);
void vlib_stats_segment_lock (void);
void vlib_stats_segment_unlock (void);
void vlib_stats_register_mem_heap (clib_mem_heap_t *);