diff options
author | Hugo Landau <hlandau@openssl.org> | 2022-03-22 10:59:36 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-03-28 09:47:43 +0200 |
commit | 2d6f3e56fae9eca47b23ce7035bb2f0949777ead (patch) | |
tree | cb23c21b9dbc369f1b4913196a2e7a4d3ef04f64 /crypto/lhash/lh_stats.c | |
parent | a24462bd1e796722a903067ab247220a38b46dc5 (diff) |
Remove statistics tracking from LHASH
Fixes #17928. Supercedes #17931.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17935)
(cherry picked from commit 77d7b6eebb411fdb2c3d1390ac779300757aa9dc)
Diffstat (limited to 'crypto/lhash/lh_stats.c')
-rw-r--r-- | crypto/lhash/lh_stats.c | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/crypto/lhash/lh_stats.c b/crypto/lhash/lh_stats.c index 47c4e932e5..ba4d4ea897 100644 --- a/crypto/lhash/lh_stats.c +++ b/crypto/lhash/lh_stats.c @@ -61,37 +61,22 @@ void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp) void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out) { - int omit_tsan = 0; - -#ifdef TSAN_REQUIRES_LOCKING - if (!CRYPTO_THREAD_read_lock(lh->tsan_lock)) { - BIO_printf(out, "unable to lock table, omitting TSAN counters\n"); - omit_tsan = 1; - } -#endif BIO_printf(out, "num_items = %lu\n", lh->num_items); BIO_printf(out, "num_nodes = %u\n", lh->num_nodes); BIO_printf(out, "num_alloc_nodes = %u\n", lh->num_alloc_nodes); - BIO_printf(out, "num_expands = %lu\n", lh->num_expands); - BIO_printf(out, "num_expand_reallocs = %lu\n", lh->num_expand_reallocs); - BIO_printf(out, "num_contracts = %lu\n", lh->num_contracts); - BIO_printf(out, "num_contract_reallocs = %lu\n", lh->num_contract_reallocs); - if (!omit_tsan) { - BIO_printf(out, "num_hash_calls = %lu\n", lh->num_hash_calls); - BIO_printf(out, "num_comp_calls = %lu\n", lh->num_comp_calls); - } - BIO_printf(out, "num_insert = %lu\n", lh->num_insert); - BIO_printf(out, "num_replace = %lu\n", lh->num_replace); - BIO_printf(out, "num_delete = %lu\n", lh->num_delete); - BIO_printf(out, "num_no_delete = %lu\n", lh->num_no_delete); - if (!omit_tsan) { - BIO_printf(out, "num_retrieve = %lu\n", lh->num_retrieve); - BIO_printf(out, "num_retrieve_miss = %lu\n", lh->num_retrieve_miss); - BIO_printf(out, "num_hash_comps = %lu\n", lh->num_hash_comps); -#ifdef TSAN_REQUIRES_LOCKING - CRYPTO_THREAD_unlock(lh->tsan_lock); -#endif - } + BIO_printf(out, "num_expands = 0\n"); + BIO_printf(out, "num_expand_reallocs = 0\n"); + BIO_printf(out, "num_contracts = 0\n"); + BIO_printf(out, "num_contract_reallocs = 0\n"); + BIO_printf(out, "num_hash_calls = 0\n"); + BIO_printf(out, "num_comp_calls = 0\n"); + BIO_printf(out, "num_insert = 0\n"); + BIO_printf(out, "num_replace = 0\n"); + BIO_printf(out, "num_delete = 0\n"); + BIO_printf(out, "num_no_delete = 0\n"); + BIO_printf(out, "num_retrieve = 0\n"); + BIO_printf(out, "num_retrieve_miss = 0\n"); + BIO_printf(out, "num_hash_comps = 0\n"); } void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out) |