-
Enhancement
-
Resolution: Unresolved
-
P4
-
22
Element insertion in CHT with G1 is typically structured as follows:
_table.insert(..., &grow_hint);
[...]
if (grow_hint) {
_table.grow();
}
The problem is that in the time between insertion and growing additional threads can queue up to grow the table.
E.g.
Thread A: insert(... , grow_hint = true);
Thread B: insert(... , grow_hint = true);
Thread A: grow()
Thread B: grow()
There is some simplistic mechanism to cancel table growing in CHT's grow() call, but it does not seem sufficient.
This is particularly apparent after use of a CHT with the same structure for code roots inJDK-8315503, but can also be seen with the card set to a lesser degree.
_table.insert(..., &grow_hint);
[...]
if (grow_hint) {
_table.grow();
}
The problem is that in the time between insertion and growing additional threads can queue up to grow the table.
E.g.
Thread A: insert(... , grow_hint = true);
Thread B: insert(... , grow_hint = true);
Thread A: grow()
Thread B: grow()
There is some simplistic mechanism to cancel table growing in CHT's grow() call, but it does not seem sufficient.
This is particularly apparent after use of a CHT with the same structure for code roots in