public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] check hash table counts
@ 2022-12-23 5:26 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-12-23 5:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:34dc1fc7981c62fb55f5e9844308194925c09b61
commit 34dc1fc7981c62fb55f5e9844308194925c09b61
Author: Alexandre Oliva <oliva@gnu.org>
Date: Thu Dec 22 21:28:45 2022 -0300
check hash table counts
Diff:
---
gcc/hash-table.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 53507daae26..7dbeea05373 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -1035,6 +1035,23 @@ hash_table<Descriptor, Lazy, Allocator>
&& Descriptor::equal (*entry, comparable))
hashtab_chk_error ();
}
+
+ if (m_size < 2048)
+ {
+ size_t elmts = m_n_elements, dels = m_n_deleted;
+ for (size_t i = 0; i < m_size; i++)
+ {
+ value_type *entry = &m_entries[i];
+ if (!is_empty (*entry))
+ {
+ elmts--;
+ if (is_deleted (*entry))
+ dels--;
+ }
+ }
+ if (elmts || dels)
+ hashtab_chk_error ();
+ }
}
/* This function deletes an element with the given COMPARABLE value
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] check hash table counts
@ 2022-12-23 7:30 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-12-23 7:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c09625cbca67cab516571ebc45162fd0ec0f4c6f
commit c09625cbca67cab516571ebc45162fd0ec0f4c6f
Author: Alexandre Oliva <oliva@gnu.org>
Date: Thu Dec 22 21:28:45 2022 -0300
check hash table counts
Diff:
---
gcc/hash-table.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 53507daae26..7dbeea05373 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -1035,6 +1035,23 @@ hash_table<Descriptor, Lazy, Allocator>
&& Descriptor::equal (*entry, comparable))
hashtab_chk_error ();
}
+
+ if (m_size < 2048)
+ {
+ size_t elmts = m_n_elements, dels = m_n_deleted;
+ for (size_t i = 0; i < m_size; i++)
+ {
+ value_type *entry = &m_entries[i];
+ if (!is_empty (*entry))
+ {
+ elmts--;
+ if (is_deleted (*entry))
+ dels--;
+ }
+ }
+ if (elmts || dels)
+ hashtab_chk_error ();
+ }
}
/* This function deletes an element with the given COMPARABLE value
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/aoliva/heads/testme)] check hash table counts
@ 2022-12-23 0:57 Alexandre Oliva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-12-23 0:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d49ded1934076cb2ec79679c96e848584d193a4d
commit d49ded1934076cb2ec79679c96e848584d193a4d
Author: Alexandre Oliva <oliva@gnu.org>
Date: Thu Dec 22 21:28:45 2022 -0300
check hash table counts
Diff:
---
gcc/hash-table.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gcc/hash-table.h b/gcc/hash-table.h
index 53507daae26..7dbeea05373 100644
--- a/gcc/hash-table.h
+++ b/gcc/hash-table.h
@@ -1035,6 +1035,23 @@ hash_table<Descriptor, Lazy, Allocator>
&& Descriptor::equal (*entry, comparable))
hashtab_chk_error ();
}
+
+ if (m_size < 2048)
+ {
+ size_t elmts = m_n_elements, dels = m_n_deleted;
+ for (size_t i = 0; i < m_size; i++)
+ {
+ value_type *entry = &m_entries[i];
+ if (!is_empty (*entry))
+ {
+ elmts--;
+ if (is_deleted (*entry))
+ dels--;
+ }
+ }
+ if (elmts || dels)
+ hashtab_chk_error ();
+ }
}
/* This function deletes an element with the given COMPARABLE value
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-23 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 5:26 [gcc(refs/users/aoliva/heads/testme)] check hash table counts Alexandre Oliva
-- strict thread matches above, loose matches on Subject: below --
2022-12-23 7:30 Alexandre Oliva
2022-12-23 0:57 Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).