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

missing call to make_not_entrant after deoptimizing for patching volatiles

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs14
    • Fix Version/s: hs14
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Build:
      b85
    • Introduced In Version:
      6
    • Resolved In Build:
      b09
    • CPU:
      sparc
    • OS:
      solaris_9

      Backports

        Description

        Hi Tom,

        One question regarding deoptimization and C1: the StoreField and
        LoadField code relies on deoptimization in case a load/store cannot be
        determined to be volatile at compile time.

        In the c1 runtime patch_code method, a VM_DeoptimizeFrame vm operation
        is executed. What is puzzling me, is that when I follow the code of this
        vm operation I don't find where the nmethod is made not entrant so that
        the method will eventually be recompiled.

        Indeed when I run this simple test:

        public class TestDeopt {
           static class A {
        volatile int i;
           }

           static void m() {
        A a = new A();
        a.i = 0;
           }

           static public void main(String[] args) {
        m();
        m();
        m();
           }
        }

        With:
        -client -Xcomp -XX:+PrintCompilation -XX:-Inline -XX:+TracePatching -XX:+TraceDeoptimization

        I see the m method being compiled once but I see 3 "Deoptimizing for
        patching volatile field reference" which proves that the compiled code
        is not dropped.

        Am I missing something?

        Thanks,
        Roland.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  never Tom Rodriguez
                  Reporter:
                  never Tom Rodriguez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: