test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh

Print this page




  85 mv RedefineSubclassWithTwoInterfacesImpl.class \
  86     RedefineSubclassWithTwoInterfacesImpl_1.class
  87 
  88 echo "INFO: launching RedefineSubclassWithTwoInterfacesApp"
  89 
  90 # TraceRedefineClasses options:
  91 #
  92 #    0x00000001 |          1 - name each target class before loading, after
  93 #                              loading and after redefinition is completed
  94 #    0x00000002 |          2 - print info if parsing, linking or
  95 #                              verification throws an exception
  96 #    0x00000004 |          4 - print timer info for the VM operation
  97 #    0x00001000 |       4096 - detect calls to obsolete methods
  98 #    0x00002000 |       8192 - fail a guarantee() in addition to detection
  99 #    0x00004000 |      16384 - detect old/obsolete methods in metadata
 100 #    0x00100000 |    1048576 - impl details: vtable updates
 101 #    0x00200000 |    2097152 - impl details: itable updates
 102 #
 103 #    1+2+4+4096+8192+16384+1048576+2097152 == 3174407
 104 
 105 "${JAVA}" ${TESTVMOPTS} \
 106     -XX:TraceRedefineClasses=3174407 \
 107     -javaagent:RedefineSubclassWithTwoInterfacesAgent.jar \
 108     -classpath "${TESTCLASSES}" \
 109     RedefineSubclassWithTwoInterfacesApp > output.log 2>&1
 110 status="$?"
 111 
 112 echo "INFO: <begin output.log>"
 113 cat output.log
 114 echo "INFO: <end output.log>"
 115 
 116 if [ "$status" != 0 ]; then
 117     echo "FAIL: RedefineSubclassWithTwoInterfacesApp failed."
 118     exit "$status"
 119 fi
 120 
 121 # When this bug manifests, RedefineClasses() will fail to update
 122 # one of the itable entries to refer to the new method. The log
 123 # will include the following line when the bug occurs:
 124 #
 125 #     guarantee(false) failed: OLD and/or OBSOLETE method(s) found




  85 mv RedefineSubclassWithTwoInterfacesImpl.class \
  86     RedefineSubclassWithTwoInterfacesImpl_1.class
  87 
  88 echo "INFO: launching RedefineSubclassWithTwoInterfacesApp"
  89 
  90 # TraceRedefineClasses options:
  91 #
  92 #    0x00000001 |          1 - name each target class before loading, after
  93 #                              loading and after redefinition is completed
  94 #    0x00000002 |          2 - print info if parsing, linking or
  95 #                              verification throws an exception
  96 #    0x00000004 |          4 - print timer info for the VM operation
  97 #    0x00001000 |       4096 - detect calls to obsolete methods
  98 #    0x00002000 |       8192 - fail a guarantee() in addition to detection
  99 #    0x00004000 |      16384 - detect old/obsolete methods in metadata
 100 #    0x00100000 |    1048576 - impl details: vtable updates
 101 #    0x00200000 |    2097152 - impl details: itable updates
 102 #
 103 #    1+2+4+4096+8192+16384+1048576+2097152 == 3174407
 104 
 105 "${JAVA}" ${TESTVMOPTS} ${TESTJAVAOPTS} \
 106     -XX:TraceRedefineClasses=3174407 \
 107     -javaagent:RedefineSubclassWithTwoInterfacesAgent.jar \
 108     -classpath "${TESTCLASSES}" \
 109     RedefineSubclassWithTwoInterfacesApp > output.log 2>&1
 110 status="$?"
 111 
 112 echo "INFO: <begin output.log>"
 113 cat output.log
 114 echo "INFO: <end output.log>"
 115 
 116 if [ "$status" != 0 ]; then
 117     echo "FAIL: RedefineSubclassWithTwoInterfacesApp failed."
 118     exit "$status"
 119 fi
 120 
 121 # When this bug manifests, RedefineClasses() will fail to update
 122 # one of the itable entries to refer to the new method. The log
 123 # will include the following line when the bug occurs:
 124 #
 125 #     guarantee(false) failed: OLD and/or OBSOLETE method(s) found