eclipse-openj9 / openj9-omr

Eclipse OpenJ9's clone of the Eclipse OMR (https://github.com/eclipse/omr) project. PRs should be opened against the upstream OMR project whenever possible.
Other
38 stars 134 forks source link

Improve the hashtable related code by checking the node count #211

Closed ChengJin01 closed 1 month ago

ChengJin01 commented 1 month ago

The issue was detected when adjusting the thunk heap related code via https://github.com/eclipse-openj9/openj9/pull/19852, in which we found that the code in hashTableForEachDo() still relies on the node count to determine whether to move forward to check the hashtable but there are still a bunch of code/assignments before returning null for a empty hashtable. Instead, we should check numberOfNodes early, which would be an improvement to hashTableStartDo(),hashTableForEachDo()`, and possibly other hash table functions.

FYI: @keithc-ca

keithc-ca commented 1 month ago

This should instead be proposed at https://github.com/eclipse/omr.

ChengJin01 commented 1 month ago

Created at https://github.com/eclipse/omr/issues/7408.