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

Remove check of counters in VirtualSpaceNode::inc_container_count

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b109

      VirtualSpaceNode::inc_container_count()
      function defined in src/share/vm/memory/metaspace.cpp. This function was
      initially added by JDK-8011268 "NPG: Free unused VirtualSpaceNodes"
      <https://bugs.openjdk.java.net/browse/JDK-8011268> and now looks like
      this:
      void VirtualSpaceNode::inc_container_count() {
         assert_lock_strong(SpaceManager::expand_lock());
         _container_count++;
         DEBUG_ONLY(verify_container_count();)
      }

      This implementation contains code which executed only in debug
      build(call of verify_container_count()).
      It was noticed that some tests spent a lot time is a
      "DEBUG_ONLY(verify_container_count();)" code in inc_container_count().

      Similar checks are exists in VirtualSpaceNode::retire(), so probably, check in inc_container_count can be removed from inc_container_count().

            jmasa Jon Masamitsu (Inactive)
            ddmitriev Dmitry Dmitriev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: