summaryrefslogtreecommitdiffstats
path: root/crypto/lhash/lh_stats.c
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2022-03-22 10:59:36 +0000
committerTomas Mraz <tomas@openssl.org>2022-03-28 09:45:39 +0200
commit77d7b6eebb411fdb2c3d1390ac779300757aa9dc (patch)
tree38d6f14de184f9c88c3d4ba6566b470bdbaec179 /crypto/lhash/lh_stats.c
parent2aa645bca435759fa01e4e5827b7d93ad4e06673 (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)
Diffstat (limited to 'crypto/lhash/lh_stats.c')
-rw-r--r--crypto/lhash/lh_stats.c41
1 files changed, 13 insertions, 28 deletions
diff --git a/crypto/lhash/lh_stats.c b/crypto/lhash/lh_stats.c
index 0d4bc72608..8a49bfab34 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)