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

Method::link_method is called twice for CDS methods

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • 17
    • 15
    • hotspot

    Description

      It's called once here:

      http://hg.openjdk.java.net/jdk/jdk/file/0702191777c9/src/hotspot/share/oops/method.cpp#l1255

      void Method::restore_unshareable_info(TRAPS) {
        assert(is_method() && is_valid_method(this), "ensure C++ vtable is restored");

        // Since restore_unshareable_info can be called more than once for a method, don't
        // redo any work.
        if (adapter() == NULL) {
          methodHandle mh(THREAD, this);
          link_method(mh, CHECK);
        }
      }

      and once here:

      http://hg.openjdk.java.net/jdk/jdk/file/0702191777c9/src/hotspot/share/oops/instanceKlass.cpp#l911

      InstanceKlass::link_class_impl() -> InstanceKlass::link_methods() -> Method::link_method()

      Attachments

        Issue Links

          Activity

            People

              jiangli Jiangli Zhou
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: