From 9c8ca8dd3197e40dfcb8bcecd95c10eeb56239ed Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 14 Jun 2019 12:02:38 -0400 Subject: vppinfra: optimize elog_string Add a string hash to make sure that strings in the string table are unique. This optimization has been coded piecemeal in multiple places, we should have made the underlying function do the work years ago. Type: fix Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498 Signed-off-by: Dave Barach --- src/vppinfra/elog.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vppinfra/elog.h') diff --git a/src/vppinfra/elog.h b/src/vppinfra/elog.h index 26352f7d608..3cd067ce707 100644 --- a/src/vppinfra/elog.h +++ b/src/vppinfra/elog.h @@ -53,6 +53,7 @@ #include /* for ASSERT */ #include #include /* for clib_cpu_time_now */ +#include #include typedef struct @@ -155,6 +156,8 @@ typedef struct /** Events may refer to strings in string table. */ char *string_table; + uword *string_table_hash; + u8 *string_table_tmp; /** Vector of tracks. */ elog_track_t *tracks; -- cgit 1.2.3-korg