RFR: 8278020: ~13% variation in Renaissance-Scrabble

Ioi Lam iklam at openjdk.java.net
Wed Dec 15 04:27:04 UTC 2021


On Wed, 15 Dec 2021 01:35:42 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I would have kept the two fields together after the switch so that you can add a comment. Seems totally bizarre that two such separated fields would have such an affect.
> 
> Isn't this needed in 18 though?

David, if my theory is correct, the contention does not happen between the two fields. It happens between the `_vtable_len` field, and the object that immediately precedes the Klass. I have not found out what that other object is. Eric is writing a simplified version of the benchmark and I hope to use that to narrow down the problem.

I have added comments near _vtable_len to explain why it's placed there inside the Klass.

I swapped it with `_modifier_flags` because they are the same size, and `_modifier_flags` doesn't seem to be accessed nearly as often as `_vtable_len`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6838


More information about the hotspot-dev mailing list