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

resolveHelper: unnecessary nmethod lookup in CodeCache

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P5
    • None
    • None
    • hotspot
    • None
    • generic
    • generic

    Description

      The code snippet in question was introduced by the PermGen removal commit (JDK-6964458).

      src/share/vm/runtime/sharedRuntime.cpp:
      1349 if (is_virtual) {
      1350 nmethod* nm = callee_nm;
      1351 if (nm == NULL) CodeCache::find_blob(caller_frame.pc());
      1352 CompiledIC* inline_cache = CompiledIC_before(caller_nm, caller_frame.pc());
      1353 if (inline_cache->is_clean()) {
      1354 inline_cache->set_to_monomorphic(virtual_call_info);
      1355 }
      1356 }

      Line 1351 has no side-effects and result is not used (it shouldn't be NULL anyway). Proposed fix: Lookup can be turned into an assert that checks if it is indeed the right callee nmethod.

      Attachments

        Issue Links

          Activity

            People

              burban Bernhard Urban-Forster
              burban Bernhard Urban-Forster
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: