diff options
author | Dave Barach <dave@barachs.net> | 2019-06-14 12:02:38 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2019-06-14 12:15:28 -0400 |
commit | 9c8ca8dd3197e40dfcb8bcecd95c10eeb56239ed (patch) | |
tree | 68400772b8c35b5cd2443c42a23a02d45c333b9b /src/vppinfra/elog.h | |
parent | b63dbc537c02b1978345744ab34765b2d75011a6 (diff) |
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 <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/elog.h')
-rw-r--r-- | src/vppinfra/elog.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 <vppinfra/error.h> /* for ASSERT */ #include <vppinfra/serialize.h> #include <vppinfra/time.h> /* for clib_cpu_time_now */ +#include <vppinfra/hash.h> #include <vppinfra/mhash.h> 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; |