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

Code cleanup

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • 13
    • 6, 9, 10
    • hotspot
    • sparc
    • solaris_9

      During work on the 6353664 fix I found few places I wanted to fix
      but it was late for mustang release.

      Fixed Node::destruct() (broken after my 5082174 fix).
      Fix typo (use class's field _igvn instead of input parameter igvn).
      Let Value() calculate result for const1/const2, const1%const2 and const1*const2.
      Don't generate ideal graph for unreachable path in inline_arraycopy().
      Conver the method Node::verify_recur() to iterative version.
      The recursion causes compiler stack overflow when run CTW with
      -XX:+VerifyIterativeGVN on x86:

      fez% /java/re/jdk/1.6.0/latest/binaries/solaris-i586/fastdebug/bin/java -server -XX:+PrintCompilation -XX:+VerifyIterativeGVN -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1 -Xbootclasspath/p:/net/vmsqe.sfbay/export/backup/testbase/CompileTheWorld/jarfiles/ClassInfoLib.jar
      VM option '+PrintCompilation'
      VM option '+VerifyIterativeGVN'
      VM option '+CompileTheWorld'
      VM option 'CompileTheWorldStartAt=1'
      CompileTheWorld : Compiling all classes in /net/vmsqe.sfbay/export/backup/testbase/CompileTheWorld/jarfiles/ClassInfoLib.jar

      CompileTheWorld (1) : com/sun/classinfo/ClassFileEntry
      CompileTheWorld (2) : com/sun/classinfo/ClassPath
      CompileTheWorld (3) : com/sun/classinfo/Path
      CompileTheWorld (4) : com/sun/classinfo/PathFactory
        1 b com.sun.classinfo.PathFactory::<init> (5 bytes)
        2 b com.sun.classinfo.PathFactory::createClassFileEntry (7 bytes)
        3 b com.sun.classinfo.PathFactory::createClassPath (9 bytes)
        4 b com.sun.classinfo.PathFactory::createClassPath (10 bytes)
        5 b com.sun.classinfo.PathFactory::createClassPath (8 bytes)
        6 b com.sun.classinfo.PathFactory::createPath (5 bytes)
        7 b com.sun.classinfo.PathFactory::createWritePath (5 bytes)
        8 b com.sun.classinfo.PathFactory::isClassPath (5 bytes)
        9 b com.sun.classinfo.PathFactory::isPath (5 bytes)
       10 b com.sun.classinfo.PathFactory::isWriteablePath (5 bytes)
      CompileTheWorld (5) : com/sun/classinfo/resources/ClassLibRes
       11 b com.sun.classinfo.resources.ClassLibRes::<init> (5 bytes)
       12 b com.sun.classinfo.resources.ClassLibRes::<clinit> (6406 bytes)
      Segmentation Fault
      Fix Set::setstr() to delete temporary 'set' only if it is allocated on C_HEAP.
      Got the next assert with -XX:+TraceIterativeGVN :

      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # Internal Error (/net/jaberwocky/export/home2/work/6353664/src/share/vm/memory/allocation.cpp, 44), pid=7999, tid=10
      #
      # Java VM: Java HotSpot(TM) Server VM (1.6.0-internal-debug mixed mode)
      #
      # Error: assert(((ResourceObj *)p)->allocated_on_C_heap(),"delete only allowed for C_HEAP objects")
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #

      --------------- T H R E A D ---------------

      Current thread (0x081bb100): JavaThread "CompilerThread0" daemon [_thread_in_native, id=10]

      Stack: [0xd6497000,0xd64d7000), sp=0xd64d52a8, free space=248k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x911d67] void VMError::report_and_die() + 0x577
      V [libjvm.so+0x396749] void report_assertion_failure(const char*,int,const char*) + 0x79
      V [libjvm.so+0x1f02c0] void ResourceObj::operator delete(void*) + 0x50
      V [libjvm.so+0x948397] __SLIP.DELETER__B + 0x27
      V [libjvm.so+0x8144e9] char*Set::setstr()const + 0x279
      V [libjvm.so+0x814546] void Set::print()const + 0x16
      V [libjvm.so+0x79f923] void Unique_Node_List::print_set()const + 0x23
      V [libjvm.so+0x79c110] void PhaseIterGVN::optimize() + 0x100
      V [libjvm.so+0x69cb98] PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&,const PhaseIdealLoop*,bool) + 0x818
      V [libjvm.so+0x3360c8] void Compile::Optimize() + 0x1d8
      -----------

      Add PinchPointNode to compute registers antidependances
      and replace (n->Opcode() == Op_Node) with (n->is_PinchPoint())
      when checking for pinch point nodes.

      -----------
      Move the creation of old_space, new_space and node_stack inside
      iterative Node::verify_recur(). It speeds up the verification
      by 20%.

      -----------
      Convert the method Node::find_recur() to iterative version.
      --------------------------
      Don't set HT bit for Opteron cpu. It was not fixed since 6290711 was closed.
      ------------
      The usage of the flag VerifyGraphEdges since AllocateNode could set
      InitialTest input to NULL. Have to fix it.

      fez% /tmp/kvn/jdk1.6.0/fastdebug/bin/java -server -XX:+VerifyGraphEdges -Xcomp X
      VM option '+VerifyGraphEdges'
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/node.cpp:1259]
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # Internal Error (/export0/BUILD_AREA/jdk6.0/hotspot/src/share/vm/opto/node.cpp
      , 1259), pid=23437, tid=10
      #
      # Java VM: Java HotSpot(TM) Server VM (1.6.0-ea-fastdebug-b58-debug compiled mod
      e)
      #
      # Error: assert(i >= req() || i == 0 || is_Region() || is_Phi(),"only regions or
       phis have null data edges")
      # An error report file with more information is saved as hs_err_pid23437.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Current thread is 10
      Dumping core ...
      Abort
      ------------------------
      Merge PhaseGVN::transform() and PhaseGVN::transform_no_reclaim() since
      they have the same code.
      ------------
      Fix code for the flag VerifyLoopOptimizations:

      fez% /tmp/kvn/jdk1.6.0/fastdebug/bin/java -server -XX:+VerifyLoopOptimizations -Xcomp X
      VM option '+VerifyLoopOptimizations'
      Verify has that we do not: 742 If === 63 71 [[ 748 745 ]] P=0.999999,
      C=-1.000000
      Verify has that we do not: 745 IfFalse === 742 [[ 744 ]] #0
      Verify has that we do not: 748 IfTrue === 742 [[ 747 ]] #1
      Verify has that we do not: 743 If === 65 740 [[ 749 746 ]] P=0.999999,
       C=-1.000000
      Verify has that we do not: 746 IfFalse === 743 [[ 744 ]] #0
      Verify has that we do not: 749 IfTrue === 743 [[ 747 ]] #1
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/loopnode.cpp:1647]
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # Internal Error (/export0/BUILD_AREA/jdk6.0/hotspot/src/share/vm/opto/loopnode.cpp, 1647), pid=8241, tid=11
      #
      # Java VM: Java HotSpot(TM) Server VM (1.6.0-ea-fastdebug-b58-debug compiled mode)
      #
      # Error: assert(!fail,"loop body mismatch")
      # An error report file with more information is saved as hs_err_pid8241.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Current thread is 11
      Dumping core ...
      Abort
      fez%
      ---------------------------------------------
      PhaseIdealLoop::split_through_phi() should respect anti-dependances
      for Load node clones.
      ---------------------------------------
      Iterative version of PhaseIdealLoop::verify_compare().
      ----------------------------
      Convert the method Node::kill_dead_code() to iterative version.
      The recursion causes compiler stack overflow when run CTW with
       -XX:+VerifyGraphEdges -XX:+VerifyIterativeGVN on x86:

      /tmp/kvn/jdk1.6.0/bin/java -server -XX:+VerifyGraphEdges -XX:+VerifyIterativeGVN -Xss4m -verify -XX:-ShowMessageBoxOnError -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1 -Xbootclasspath/p:/net/vmsqe.sfbay/export/backup/testbase/CompileTheWorld/jarfiles/JavaWebServer1.1.3.jar
      ...
      CompileTheWorld (965) : mlsoft/mct/MlEKey
      CompileTheWorld (966) : mlsoft/mct/MlResource
      CompileTheWorld (967) : mlsoft/mct/MlGrid
      /tmp/kvn/test/workdir/run.JavaWebServer1.1.3.jar.1.ksh[67]: 15796 Segmentation Fault
      Exit Value 139

      [t@11 l@11]: where
      current thread: t@11
        [1] Unique_Node_List::remove(this = ???, n = ???) (optimized), at 0xfe25cead (line ~1531) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
      =>[2] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe259008 (line ~916) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
        [3] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
        [4] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
        [5] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
      -----------------------------------------------------------------
      AddP node should be put to correspondent loop body when
      we move it up in dominator tree in PhaseIdealLoop::has_local_phi_input().
      --------------------------------------------------------------------------------
      Relax anti-dependences checks for Load nodes in PhaseIdealLoop::get_late_ctrl().
      For example, when uncommon trap is the user of the memory input.

            kvn Vladimir Kozlov
            kvn Vladimir Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: