Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348547

[lworld] Investigate false adapter sharing due to inherited fields in the calling convention

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2 P2
    • repo-valhalla
    • repo-valhalla
    • hotspot

      Attached Test.java used to fail with -XX:+VerifyAdapterSharing due to false sharing of the adapters for MyValue1::test and MyValue2:test. The problem is that both methods have a byte "receiver" but with different offsets. I added code to InlineKlass::collect_fields to detect this situation and add some "garbage" to the signature to distinguish it from a "local" field with a different offset. I'm not 100% convinced though that this is correct, so we should investigate in more detail. Do we need different "garbage"? Could an empty inline type produce the same signature?

      See https://github.com/openjdk/valhalla/blob/714930ee3b79eea215a475a770bcf0544ca4780f/src/hotspot/share/oops/inlineKlass.cpp#L421-L424

      Update: Attached Test2.java which currently fails.

        1. Test.java
          1 kB
          Tobias Hartmann
        2. Test2.java
          0.8 kB
          Quan Anh Mai

            qamai Quan Anh Mai
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: