-
Bug
-
Resolution: Fixed
-
P3
-
jvm11, 1.1.1, 1.1.3
-
b01
-
other, x86
-
solaris_2.5.1, solaris_9
-
Verified
) System.out.print("MPAT_GetField4_fi_0");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
i3 = MPAT_GetField4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[9][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[9][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_GetField4_fi_1");
t0 = System.currentTimeMillis();
try {
for (int icount=0; icount<ITERS; icount++) {
obj3 = MPAT_GetField4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[10][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[10][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_PutField4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_fi_0(10);
}
t1 = System.currentTimeMillis();
myTimes[11][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_fi_1("String1");
}
t1 = System.currentTimeMillis();
myTimes[12][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4Const4_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4Const4_fi();
}
t1 = System.currentTimeMillis();
myTimes[13][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_fi();
}
t1 = System.currentTimeMillis();
myTimes[14][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_Handle_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj3 = MPAT_Handle_fi();
}
t1 = System.currentTimeMillis();
myTimes[15][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_SuperHandle_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj4 = MPAT_SuperHandle_fi();
}
t1 = System.currentTimeMillis();
myTimes[16][1] = t1 - t0;
}
public static void result(
long myTimes[][],long ovhdTime,long storeTime,String label[]){
for (int icount=0; icount<17; icount++) {
double d0,d1,d2,d3,d4;
long j2,j3,j4;
d0 = myTimes[icount][0];
d1 = myTimes[icount][1];
switch (icount) {
case 4:
case 11:
case 12:
case 13:
case 14:
d2 = (myTimes[icount][0] - ovhdTime)
*1.0E+06/((double)ITERS);
d3 = (myTimes[icount][1] - ovhdTime)
*1.0E+06/((double)ITERS);
break;
default:
d2 = (myTimes[icount][0] - ovhdTime - storeTime)
*1.0E+06/((double)ITERS);
d3 = (myTimes[icount][1] - ovhdTime - storeTime)
*1.0E+06/((double)ITERS);
break;
}
j2 = (long)d2;
j3 = (long)d3;
if (j3 < 0L) j3 = 0L;
System.out.print(label[icount] + " ");
System.out.print(j2 + " ");
if (Math.abs(j2) < 1000) System.out.print(" ");
if (Math.abs(j2) < 100) System.out.print(" ");
if (Math.abs(j2) < 10) System.out.print(" ");
System.out.print(j3 + " ");
if (Math.abs(j3) < 1000) System.out.print(" ");
if (Math.abs(j3) < 100) System.out.print(" ");
if (Math.abs(j3) < 10) System.out.print(" ");
// d4 = 100.0*(d3/d2 - 1.0);
// j4 = (long)d4;
// System.out.println(j4);
System.out.println(" ");
}
}
public static void main( String args[] ) {
pFlag = (args.length > 0 && args[0].equals("print"));
long t0,t1;
if (pFlag) System.out.println("inline0003");
long ovhdTime = 0L;
long storeTime = 0L;
long[][] myTimes = new long[17][2];
inline0003 myInline_n = new inline0003();
inline0003 myInline_f = new inline0003();
String[] label = new String[17];
label[0] = new String("Const4 class method (int) ");
label[1] = new String("Const4 class method (ref) ");
label[2] = new String("GetStatic4 class method (int) ");
label[3] = new String("GetStatic4 class method (ref) ");
label[4] = new String("NullMethod class method ");
label[5] = new String("Const4 instance method (int) ");
label[6] = new String("Const4 instance method (ref) ");
label[7] = new String("GetStatic4 instance method (int)");
label[8] = new String("GetStatic4 instance method (ref)");
label[9] = new String("GetField4 instance method (int) ");
label[10] = new String("GetField4 instance method (ref) ");
label[11] = new String("PutField4 instance method (int) ");
label[12] = new String("PutField4 instance method (ref) ");
label[13] = new String("PutField4Const4 instance method ");
label[14] = new String("NullMethod instance method ");
label[15] = new String("Handle instance method (int) ");
label[16] = new String("Handle instance method (ref) ");
/* Give the JIT an initial look at all the methods */
if (pFlag) System.out.println("Static initialization");
if (pFlag) System.out.println("MPAT_Const4_ns_0");
int locI1 = MPAT_Const4_ns_0();
if (pFlag) System.out.println("MPAT_Const4_ns_1");
Object locObj1 = MPAT_Const4_ns_1();
if (pFlag) System.out.println("MPAT_GetStatic4_ns_0");
int locI2 = MPAT_GetStatic4_ns_0();
if (pFlag) System.out.println("MPAT_GetStatic4_ns_1");
Object locObj2 = MPAT_GetStatic4_ns_1();
if (pFlag) System.out.println("MPAT_NullMethod_ns");
MPAT_NullMethod_ns();
if (pFlag) System.out.print("MPAT_Const4_fs_0");
try{
locI1 = MPAT_Const4_fs_0();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_Const4_fs_1");
try {
locObj1 = MPAT_Const4_fs_1();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_GetStatic4_fs_0");
locI2 = MPAT_GetStatic4_fs_0();
if (pFlag) System.out.println("MPAT_GetStatic4_fs_1");
locObj2 = MPAT_GetStatic4_fs_1();
if (pFlag) System.out.print("MPAT_NullMethod_fs");
try {
MPAT_NullMethod_fs();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("Overhead timing");
/* Two estimates of overhead time are made. */
/* With one, inconsistent results were obtained. */
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
}
t1 = System.currentTimeMillis();
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
}
t1 = System.currentTimeMillis();
ovhdTime = t1 - t0;
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI1 = locI2;
}
t1 = System.currentTimeMillis();
storeTime = t1 - t0 - ovhdTime;
myInline_n.runNonfinals( myTimes );
myInline_f.runFinals( myTimes );
if (pFlag)
inline0003.result(myTimes,ovhdTime,storeTime,label);
}
}
allan.jacobs@Eng 1997-04-17
Compile and run the test code on an x86. The result contains error messages
that are generated at times when it is expected that a routine is being
inlined. First, the results:
x86-pine% inline0003
Static initialization
MPAT_Const4_ns_0
MPAT_Const4_ns_1
MPAT_GetStatic4_ns_0
MPAT_GetStatic4_ns_1
MPAT_NullMethod_ns
MPAT_Const4_fs_0
MPAT_Const4_fs_1
MPAT_GetStatic4_fs_0
MPAT_GetStatic4_fs_1
MPAT_NullMethod_fs: java.lang.NullPointerException
Overhead timing
runNonfinals initialization
MPAT_Const4_ni_0
MPAT_Const4_ni_1
MPAT_GetStatic4_ni_0
MPAT_GetStatic4_ni_1
MPAT_GetField4_ni_0
MPAT_GetField4_ni_1
MPAT_PutField4_ni_0
MPAT_PutField4_ni_1
MPAT_PutField4Const4_ni
MPAT_NullMethod_ni
MPAT_Handle_ni
MPAT_SuperHandle_ni
runNonfinals execution
MPAT_Const4_ns_0
MPAT_Const4_ns_1
MPAT_GetStatic4_ns_0
MPAT_GetStatic4_ns_1
MPAT_NullMethod_ns
MPAT_Const4_ni_0
MPAT_Const4_ni_1
MPAT_GetStatic4_ni_0
MPAT_GetStatic4_ni_1
MPAT_GetField4_ni_0
MPAT_GetField4_ni_1
MPAT_PutField4_ni_0
MPAT_PutField4_ni_1
MPAT_PutField4Const4_ni
MPAT_NullMethod_ni
MPAT_Handle_ni
MPAT_SuperHandle_ni
runFinals initialization
MPAT_Const4_fi_0
MPAT_Const4_fi_1
MPAT_GetStatic4_fi_0
MPAT_GetStatic4_fi_1
MPAT_GetField4_fi_0: java.lang.NullPointerException
MPAT_GetField4_fi_1: java.lang.NullPointerException
MPAT_PutField4_fi_0
MPAT_PutField4_fi_1
MPAT_PutField4Const4_fi
MPAT_NullMethod_fi
MPAT_Handle_fi
MPAT_SuperHandle_fi
runFinals execution
MPAT_Const4_fs_0: iteration=1: java.lang.NullPointerException
MPAT_Const4_fs_1: iteration=1: java.lang.NullPointerException
MPAT_GetStatic4_fs_0
MPAT_GetStatic4_fs_1
MPAT_NullMethod_fs: iteration=1: java.lang.NullPointerException
MPAT_Const4_fi_0
MPAT_Const4_fi_1
MPAT_GetStatic4_fi_0
MPAT_GetStatic4_fi_1
MPAT_GetField4_fi_0: iteration=1: java.lang.NullPointerException
MPAT_GetField4_fi_1: iteration=1: java.lang.NullPointerException
MPAT_PutField4_fi_0
MPAT_PutField4_fi_1
MPAT_PutField4Const4_fi
MPAT_NullMethod_fi
MPAT_Handle_fi
MPAT_SuperHandle_fi
Const4 class method (int) 56 0
Const4 class method (ref) 50 0
GetStatic4 class method (int) 51 0
GetStatic4 class method (ref) 56 0
NullMethod class method 10 0
Const4 instance method (int) 68 25
Const4 instance method (ref) 64 25
GetStatic4 instance method (int) 66 19
GetStatic4 instance method (ref) 61 19
GetField4 instance method (int) 76 0
GetField4 instance method (ref) 81 0
PutField4 instance method (int) 65 8
PutField4 instance method (ref) 65 8
PutField4Const4 instance method 61 6
NullMethod instance method 15 0
Handle instance method (int) 46 2
Handle instance method (ref) 53 51
x86-pine% cat inline0003.java
import java.util.Calendar;
class inline0003_1 {
final protected static int[] inlineObj = { 1, 2 };
protected static int inlineInt = 3; /* Not final */
protected final Object MPAT_Super() {
return this;
}
}
class inline0003 extends inline0003_1 {
static boolean pFlag = false;
final static int ITERS=5000000;
// final static int ITERS=250;
int i1 = 0;
int i2 = 0;
int i3 = 0;
Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
private final static int MPAT_Const4_fs_0() {
return 1;
}
private final static Object MPAT_Const4_fs_1() {
return null;
}
private final static void MPAT_NullMethod_fs() {
return;
}
private final static int MPAT_GetStatic4_fs_0() {
return inlineInt;
}
private final static Object MPAT_GetStatic4_fs_1() {
return inlineObj;
}
private final int MPAT_Const4_fi_0() {
return 1;
}
private final Object MPAT_Const4_fi_1() {
return null;
}
private final void MPAT_NullMethod_fi() {
return;
}
private final int MPAT_GetField4_fi_0() {
return i1;
}
private final Object MPAT_GetField4_fi_1() {
return obj1;
}
private final void MPAT_PutField4_fi_0(int ival) {
i1 = ival;
return;
}
private final void MPAT_PutField4_fi_1(Object oval) {
obj1 = oval;
return;
}
private final void MPAT_PutField4Const4_fi() {
i2 = -1;
return;
}
private final int MPAT_GetStatic4_fi_0() {
return inlineInt;
}
private final Object MPAT_GetStatic4_fi_1() {
return inlineObj;
}
private final Object MPAT_Handle_fi() {
return this;
}
private final Object MPAT_SuperHandle_fi() {
return super.MPAT_Super();
}
private static int MPAT_Const4_ns_0() {
return 1;
}
private static Object MPAT_Const4_ns_1() {
return null;
}
private static void MPAT_NullMethod_ns() {
return;
}
private static int MPAT_GetStatic4_ns_0() {
return inlineInt;
}
private static Object MPAT_GetStatic4_ns_1() {
return inlineObj;
}
private int MPAT_Const4_ni_0() {
return 1;
}
private Object MPAT_Const4_ni_1() {
return null;
}
private void MPAT_NullMethod_ni() {
return;
}
private int MPAT_GetField4_ni_0() {
return i1;
}
private Object MPAT_GetField4_ni_1() {
return obj1;
}
private void MPAT_PutField4_ni_0(int ival) {
i1 = ival;
return;
}
private void MPAT_PutField4_ni_1(Object oval) {
obj1 = oval;
return;
}
private void MPAT_PutField4Const4_ni() {
i2 = -1;
return;
}
private int MPAT_GetStatic4_ni_0() {
return inlineInt;
}
private Object MPAT_GetStatic4_ni_1() {
return inlineObj;
}
private Object MPAT_Handle_ni() {
return this;
}
private Object MPAT_SuperHandle_ni() {
return super.MPAT_Super();
}
private void runNonfinals ( long[][] myTimes ) {
long t0,t1;
int locI1,locI2;
Object locObj1,locObj2,locObj3,locObj4;
if (pFlag) System.out.println("runNonfinals initialization");
if (pFlag) System.out.println("MPAT_Const4_ni_0");
i1 = MPAT_Const4_ni_0();
if (pFlag) System.out.println("MPAT_Const4_ni_1");
obj1 = MPAT_Const4_ni_1();
if (pFlag) System.out.println("MPAT_GetStatic4_ni_0");
i2 = MPAT_GetStatic4_ni_0();
if (pFlag) System.out.println("MPAT_GetStatic4_ni_1");
obj2 = MPAT_GetStatic4_ni_1();
if (pFlag) System.out.println("MPAT_GetField4_ni_0");
i3 = MPAT_GetField4_ni_0();
if (pFlag) System.out.println("MPAT_GetField4_ni_1");
obj3 = MPAT_GetField4_ni_1();
if (pFlag) System.out.println("MPAT_PutField4_ni_0");
MPAT_PutField4_ni_0(10);
if (pFlag) System.out.println("MPAT_PutField4_ni_1");
MPAT_PutField4_ni_1("String1");
if (pFlag) System.out.println("MPAT_PutField4Const4_ni");
MPAT_PutField4Const4_ni();
if (pFlag) System.out.println("MPAT_NullMethod_ni");
MPAT_NullMethod_ni();
if (pFlag) System.out.println("MPAT_Handle_ni");
locObj3 = MPAT_Handle_ni();
if (pFlag) System.out.println("MPAT_SuperHandle_ni");
locObj4 = MPAT_SuperHandle_ni();
if (pFlag) System.out.println("runNonfinals execution");
if (pFlag) System.out.println("MPAT_Const4_ns_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI1 = MPAT_Const4_ns_0();
}
t1 = System.currentTimeMillis();
myTimes[0][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ns_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj1 = MPAT_Const4_ns_1();
}
t1 = System.currentTimeMillis();
myTimes[1][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ns_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI2 = MPAT_GetStatic4_ns_0();
}
t1 = System.currentTimeMillis();
myTimes[2][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ns_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj2 = MPAT_GetStatic4_ns_1();
}
t1 = System.currentTimeMillis();
myTimes[3][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_ns");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_ns();
}
t1 = System.currentTimeMillis();
myTimes[4][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i1 = MPAT_Const4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[5][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj1 = MPAT_Const4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[6][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i2 = MPAT_GetStatic4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[7][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj2 = MPAT_GetStatic4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[8][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetField4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i3 = MPAT_GetField4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[9][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetField4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj3 = MPAT_GetField4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[10][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_ni_0(10);
}
t1 = System.currentTimeMillis();
myTimes[11][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_ni_1("String1");
}
t1 = System.currentTimeMillis();
myTimes[12][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4Const4_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4Const4_ni();
}
t1 = System.currentTimeMillis();
myTimes[13][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_ni();
}
t1 = System.currentTimeMillis();
myTimes[14][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Handle_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj3 = MPAT_Handle_ni();
}
t1 = System.currentTimeMillis();
myTimes[15][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_SuperHandle_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj4 = MPAT_SuperHandle_ni();
}
t1 = System.currentTimeMillis();
myTimes[16][0] = t1 - t0;
}
private void runFinals ( long[][] myTimes ) {
long t0,t1;
int locI1,locI2;
Object locObj1,locObj2,locObj3,locObj4;
int jcount = 0;
if (pFlag) System.out.println("runFinals initialization");
if (pFlag) System.out.println("MPAT_Const4_fi_0");
i1 = MPAT_Const4_fi_0();
if (pFlag) System.out.println("MPAT_Const4_fi_1");
obj1 = MPAT_Const4_fi_1();
if (pFlag) System.out.println("MPAT_GetStatic4_fi_0");
i2 = MPAT_GetStatic4_fi_0();
if (pFlag) System.out.println("MPAT_GetStatic4_fi_1");
obj2 = MPAT_GetStatic4_fi_1();
if (pFlag) System.out.print("MPAT_GetField4_fi_0");
try {
i3 = MPAT_GetField4_fi_0();
} catch ( Exception e ) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_GetField4_fi_1");
try {
obj3 = MPAT_GetField4_fi_1();
} catch ( Exception e ) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_PutField4_fi_0");
MPAT_PutField4_fi_0(10);
if (pFlag) System.out.println("MPAT_PutField4_fi_1");
MPAT_PutField4_fi_1("String1");
if (pFlag) System.out.println("MPAT_PutField4Const4_fi");
MPAT_PutField4Const4_fi();
if (pFlag) System.out.println("MPAT_NullMethod_fi");
MPAT_NullMethod_fi();
if (pFlag) System.out.println("MPAT_Handle_fi");
locObj3 = MPAT_Handle_fi();
if (pFlag) System.out.println("MPAT_SuperHandle_fi");
locObj4 = MPAT_SuperHandle_fi();
if (pFlag) System.out.println("runFinals execution");
if (pFlag) System.out.print("MPAT_Const4_fs_0");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
locI1 = MPAT_Const4_fs_0();
}
t1 = System.currentTimeMillis();
myTimes[0][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[0][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_Const4_fs_1");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
locObj1 = MPAT_Const4_fs_1();
}
t1 = System.currentTimeMillis();
myTimes[1][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[1][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_GetStatic4_fs_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI2 = MPAT_GetStatic4_fs_0();
}
t1 = System.currentTimeMillis();
myTimes[2][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fs_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj2 = MPAT_GetStatic4_fs_1();
}
t1 = System.currentTimeMillis();
myTimes[3][1] = t1 - t0;
if (pFlag) System.out.print("MPAT_NullMethod_fs");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
MPAT_NullMethod_fs();
}
t1 = System.currentTimeMillis();
myTimes[4][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[4][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
/* Check inlining of instance methods */
if (pFlag) System.out.println("MPAT_Const4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i1 = MPAT_Const4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[5][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj1 = MPAT_Const4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[6][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i2 = MPAT_GetStatic4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[7][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj2 = MPAT_GetStatic4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[8][1] = t1 - t0;
if (pFlag
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
i3 = MPAT_GetField4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[9][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[9][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_GetField4_fi_1");
t0 = System.currentTimeMillis();
try {
for (int icount=0; icount<ITERS; icount++) {
obj3 = MPAT_GetField4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[10][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[10][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_PutField4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_fi_0(10);
}
t1 = System.currentTimeMillis();
myTimes[11][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_fi_1("String1");
}
t1 = System.currentTimeMillis();
myTimes[12][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4Const4_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4Const4_fi();
}
t1 = System.currentTimeMillis();
myTimes[13][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_fi();
}
t1 = System.currentTimeMillis();
myTimes[14][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_Handle_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj3 = MPAT_Handle_fi();
}
t1 = System.currentTimeMillis();
myTimes[15][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_SuperHandle_fi");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj4 = MPAT_SuperHandle_fi();
}
t1 = System.currentTimeMillis();
myTimes[16][1] = t1 - t0;
}
public static void result(
long myTimes[][],long ovhdTime,long storeTime,String label[]){
for (int icount=0; icount<17; icount++) {
double d0,d1,d2,d3,d4;
long j2,j3,j4;
d0 = myTimes[icount][0];
d1 = myTimes[icount][1];
switch (icount) {
case 4:
case 11:
case 12:
case 13:
case 14:
d2 = (myTimes[icount][0] - ovhdTime)
*1.0E+06/((double)ITERS);
d3 = (myTimes[icount][1] - ovhdTime)
*1.0E+06/((double)ITERS);
break;
default:
d2 = (myTimes[icount][0] - ovhdTime - storeTime)
*1.0E+06/((double)ITERS);
d3 = (myTimes[icount][1] - ovhdTime - storeTime)
*1.0E+06/((double)ITERS);
break;
}
j2 = (long)d2;
j3 = (long)d3;
if (j3 < 0L) j3 = 0L;
System.out.print(label[icount] + " ");
System.out.print(j2 + " ");
if (Math.abs(j2) < 1000) System.out.print(" ");
if (Math.abs(j2) < 100) System.out.print(" ");
if (Math.abs(j2) < 10) System.out.print(" ");
System.out.print(j3 + " ");
if (Math.abs(j3) < 1000) System.out.print(" ");
if (Math.abs(j3) < 100) System.out.print(" ");
if (Math.abs(j3) < 10) System.out.print(" ");
// d4 = 100.0*(d3/d2 - 1.0);
// j4 = (long)d4;
// System.out.println(j4);
System.out.println(" ");
}
}
public static void main( String args[] ) {
pFlag = (args.length > 0 && args[0].equals("print"));
long t0,t1;
if (pFlag) System.out.println("inline0003");
long ovhdTime = 0L;
long storeTime = 0L;
long[][] myTimes = new long[17][2];
inline0003 myInline_n = new inline0003();
inline0003 myInline_f = new inline0003();
String[] label = new String[17];
label[0] = new String("Const4 class method (int) ");
label[1] = new String("Const4 class method (ref) ");
label[2] = new String("GetStatic4 class method (int) ");
label[3] = new String("GetStatic4 class method (ref) ");
label[4] = new String("NullMethod class method ");
label[5] = new String("Const4 instance method (int) ");
label[6] = new String("Const4 instance method (ref) ");
label[7] = new String("GetStatic4 instance method (int)");
label[8] = new String("GetStatic4 instance method (ref)");
label[9] = new String("GetField4 instance method (int) ");
label[10] = new String("GetField4 instance method (ref) ");
label[11] = new String("PutField4 instance method (int) ");
label[12] = new String("PutField4 instance method (ref) ");
label[13] = new String("PutField4Const4 instance method ");
label[14] = new String("NullMethod instance method ");
label[15] = new String("Handle instance method (int) ");
label[16] = new String("Handle instance method (ref) ");
/* Give the JIT an initial look at all the methods */
if (pFlag) System.out.println("Static initialization");
if (pFlag) System.out.println("MPAT_Const4_ns_0");
int locI1 = MPAT_Const4_ns_0();
if (pFlag) System.out.println("MPAT_Const4_ns_1");
Object locObj1 = MPAT_Const4_ns_1();
if (pFlag) System.out.println("MPAT_GetStatic4_ns_0");
int locI2 = MPAT_GetStatic4_ns_0();
if (pFlag) System.out.println("MPAT_GetStatic4_ns_1");
Object locObj2 = MPAT_GetStatic4_ns_1();
if (pFlag) System.out.println("MPAT_NullMethod_ns");
MPAT_NullMethod_ns();
if (pFlag) System.out.print("MPAT_Const4_fs_0");
try{
locI1 = MPAT_Const4_fs_0();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_Const4_fs_1");
try {
locObj1 = MPAT_Const4_fs_1();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_GetStatic4_fs_0");
locI2 = MPAT_GetStatic4_fs_0();
if (pFlag) System.out.println("MPAT_GetStatic4_fs_1");
locObj2 = MPAT_GetStatic4_fs_1();
if (pFlag) System.out.print("MPAT_NullMethod_fs");
try {
MPAT_NullMethod_fs();
} catch (Exception e) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("Overhead timing");
/* Two estimates of overhead time are made. */
/* With one, inconsistent results were obtained. */
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
}
t1 = System.currentTimeMillis();
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
}
t1 = System.currentTimeMillis();
ovhdTime = t1 - t0;
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI1 = locI2;
}
t1 = System.currentTimeMillis();
storeTime = t1 - t0 - ovhdTime;
myInline_n.runNonfinals( myTimes );
myInline_f.runFinals( myTimes );
if (pFlag)
inline0003.result(myTimes,ovhdTime,storeTime,label);
}
}
allan.jacobs@Eng 1997-04-17
Compile and run the test code on an x86. The result contains error messages
that are generated at times when it is expected that a routine is being
inlined. First, the results:
x86-pine% inline0003
Static initialization
MPAT_Const4_ns_0
MPAT_Const4_ns_1
MPAT_GetStatic4_ns_0
MPAT_GetStatic4_ns_1
MPAT_NullMethod_ns
MPAT_Const4_fs_0
MPAT_Const4_fs_1
MPAT_GetStatic4_fs_0
MPAT_GetStatic4_fs_1
MPAT_NullMethod_fs: java.lang.NullPointerException
Overhead timing
runNonfinals initialization
MPAT_Const4_ni_0
MPAT_Const4_ni_1
MPAT_GetStatic4_ni_0
MPAT_GetStatic4_ni_1
MPAT_GetField4_ni_0
MPAT_GetField4_ni_1
MPAT_PutField4_ni_0
MPAT_PutField4_ni_1
MPAT_PutField4Const4_ni
MPAT_NullMethod_ni
MPAT_Handle_ni
MPAT_SuperHandle_ni
runNonfinals execution
MPAT_Const4_ns_0
MPAT_Const4_ns_1
MPAT_GetStatic4_ns_0
MPAT_GetStatic4_ns_1
MPAT_NullMethod_ns
MPAT_Const4_ni_0
MPAT_Const4_ni_1
MPAT_GetStatic4_ni_0
MPAT_GetStatic4_ni_1
MPAT_GetField4_ni_0
MPAT_GetField4_ni_1
MPAT_PutField4_ni_0
MPAT_PutField4_ni_1
MPAT_PutField4Const4_ni
MPAT_NullMethod_ni
MPAT_Handle_ni
MPAT_SuperHandle_ni
runFinals initialization
MPAT_Const4_fi_0
MPAT_Const4_fi_1
MPAT_GetStatic4_fi_0
MPAT_GetStatic4_fi_1
MPAT_GetField4_fi_0: java.lang.NullPointerException
MPAT_GetField4_fi_1: java.lang.NullPointerException
MPAT_PutField4_fi_0
MPAT_PutField4_fi_1
MPAT_PutField4Const4_fi
MPAT_NullMethod_fi
MPAT_Handle_fi
MPAT_SuperHandle_fi
runFinals execution
MPAT_Const4_fs_0: iteration=1: java.lang.NullPointerException
MPAT_Const4_fs_1: iteration=1: java.lang.NullPointerException
MPAT_GetStatic4_fs_0
MPAT_GetStatic4_fs_1
MPAT_NullMethod_fs: iteration=1: java.lang.NullPointerException
MPAT_Const4_fi_0
MPAT_Const4_fi_1
MPAT_GetStatic4_fi_0
MPAT_GetStatic4_fi_1
MPAT_GetField4_fi_0: iteration=1: java.lang.NullPointerException
MPAT_GetField4_fi_1: iteration=1: java.lang.NullPointerException
MPAT_PutField4_fi_0
MPAT_PutField4_fi_1
MPAT_PutField4Const4_fi
MPAT_NullMethod_fi
MPAT_Handle_fi
MPAT_SuperHandle_fi
Const4 class method (int) 56 0
Const4 class method (ref) 50 0
GetStatic4 class method (int) 51 0
GetStatic4 class method (ref) 56 0
NullMethod class method 10 0
Const4 instance method (int) 68 25
Const4 instance method (ref) 64 25
GetStatic4 instance method (int) 66 19
GetStatic4 instance method (ref) 61 19
GetField4 instance method (int) 76 0
GetField4 instance method (ref) 81 0
PutField4 instance method (int) 65 8
PutField4 instance method (ref) 65 8
PutField4Const4 instance method 61 6
NullMethod instance method 15 0
Handle instance method (int) 46 2
Handle instance method (ref) 53 51
x86-pine% cat inline0003.java
import java.util.Calendar;
class inline0003_1 {
final protected static int[] inlineObj = { 1, 2 };
protected static int inlineInt = 3; /* Not final */
protected final Object MPAT_Super() {
return this;
}
}
class inline0003 extends inline0003_1 {
static boolean pFlag = false;
final static int ITERS=5000000;
// final static int ITERS=250;
int i1 = 0;
int i2 = 0;
int i3 = 0;
Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
private final static int MPAT_Const4_fs_0() {
return 1;
}
private final static Object MPAT_Const4_fs_1() {
return null;
}
private final static void MPAT_NullMethod_fs() {
return;
}
private final static int MPAT_GetStatic4_fs_0() {
return inlineInt;
}
private final static Object MPAT_GetStatic4_fs_1() {
return inlineObj;
}
private final int MPAT_Const4_fi_0() {
return 1;
}
private final Object MPAT_Const4_fi_1() {
return null;
}
private final void MPAT_NullMethod_fi() {
return;
}
private final int MPAT_GetField4_fi_0() {
return i1;
}
private final Object MPAT_GetField4_fi_1() {
return obj1;
}
private final void MPAT_PutField4_fi_0(int ival) {
i1 = ival;
return;
}
private final void MPAT_PutField4_fi_1(Object oval) {
obj1 = oval;
return;
}
private final void MPAT_PutField4Const4_fi() {
i2 = -1;
return;
}
private final int MPAT_GetStatic4_fi_0() {
return inlineInt;
}
private final Object MPAT_GetStatic4_fi_1() {
return inlineObj;
}
private final Object MPAT_Handle_fi() {
return this;
}
private final Object MPAT_SuperHandle_fi() {
return super.MPAT_Super();
}
private static int MPAT_Const4_ns_0() {
return 1;
}
private static Object MPAT_Const4_ns_1() {
return null;
}
private static void MPAT_NullMethod_ns() {
return;
}
private static int MPAT_GetStatic4_ns_0() {
return inlineInt;
}
private static Object MPAT_GetStatic4_ns_1() {
return inlineObj;
}
private int MPAT_Const4_ni_0() {
return 1;
}
private Object MPAT_Const4_ni_1() {
return null;
}
private void MPAT_NullMethod_ni() {
return;
}
private int MPAT_GetField4_ni_0() {
return i1;
}
private Object MPAT_GetField4_ni_1() {
return obj1;
}
private void MPAT_PutField4_ni_0(int ival) {
i1 = ival;
return;
}
private void MPAT_PutField4_ni_1(Object oval) {
obj1 = oval;
return;
}
private void MPAT_PutField4Const4_ni() {
i2 = -1;
return;
}
private int MPAT_GetStatic4_ni_0() {
return inlineInt;
}
private Object MPAT_GetStatic4_ni_1() {
return inlineObj;
}
private Object MPAT_Handle_ni() {
return this;
}
private Object MPAT_SuperHandle_ni() {
return super.MPAT_Super();
}
private void runNonfinals ( long[][] myTimes ) {
long t0,t1;
int locI1,locI2;
Object locObj1,locObj2,locObj3,locObj4;
if (pFlag) System.out.println("runNonfinals initialization");
if (pFlag) System.out.println("MPAT_Const4_ni_0");
i1 = MPAT_Const4_ni_0();
if (pFlag) System.out.println("MPAT_Const4_ni_1");
obj1 = MPAT_Const4_ni_1();
if (pFlag) System.out.println("MPAT_GetStatic4_ni_0");
i2 = MPAT_GetStatic4_ni_0();
if (pFlag) System.out.println("MPAT_GetStatic4_ni_1");
obj2 = MPAT_GetStatic4_ni_1();
if (pFlag) System.out.println("MPAT_GetField4_ni_0");
i3 = MPAT_GetField4_ni_0();
if (pFlag) System.out.println("MPAT_GetField4_ni_1");
obj3 = MPAT_GetField4_ni_1();
if (pFlag) System.out.println("MPAT_PutField4_ni_0");
MPAT_PutField4_ni_0(10);
if (pFlag) System.out.println("MPAT_PutField4_ni_1");
MPAT_PutField4_ni_1("String1");
if (pFlag) System.out.println("MPAT_PutField4Const4_ni");
MPAT_PutField4Const4_ni();
if (pFlag) System.out.println("MPAT_NullMethod_ni");
MPAT_NullMethod_ni();
if (pFlag) System.out.println("MPAT_Handle_ni");
locObj3 = MPAT_Handle_ni();
if (pFlag) System.out.println("MPAT_SuperHandle_ni");
locObj4 = MPAT_SuperHandle_ni();
if (pFlag) System.out.println("runNonfinals execution");
if (pFlag) System.out.println("MPAT_Const4_ns_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI1 = MPAT_Const4_ns_0();
}
t1 = System.currentTimeMillis();
myTimes[0][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ns_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj1 = MPAT_Const4_ns_1();
}
t1 = System.currentTimeMillis();
myTimes[1][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ns_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI2 = MPAT_GetStatic4_ns_0();
}
t1 = System.currentTimeMillis();
myTimes[2][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ns_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj2 = MPAT_GetStatic4_ns_1();
}
t1 = System.currentTimeMillis();
myTimes[3][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_ns");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_ns();
}
t1 = System.currentTimeMillis();
myTimes[4][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i1 = MPAT_Const4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[5][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj1 = MPAT_Const4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[6][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i2 = MPAT_GetStatic4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[7][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj2 = MPAT_GetStatic4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[8][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetField4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i3 = MPAT_GetField4_ni_0();
}
t1 = System.currentTimeMillis();
myTimes[9][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetField4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj3 = MPAT_GetField4_ni_1();
}
t1 = System.currentTimeMillis();
myTimes[10][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_ni_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_ni_0(10);
}
t1 = System.currentTimeMillis();
myTimes[11][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4_ni_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4_ni_1("String1");
}
t1 = System.currentTimeMillis();
myTimes[12][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_PutField4Const4_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_PutField4Const4_ni();
}
t1 = System.currentTimeMillis();
myTimes[13][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_NullMethod_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
MPAT_NullMethod_ni();
}
t1 = System.currentTimeMillis();
myTimes[14][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_Handle_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj3 = MPAT_Handle_ni();
}
t1 = System.currentTimeMillis();
myTimes[15][0] = t1 - t0;
if (pFlag) System.out.println("MPAT_SuperHandle_ni");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj4 = MPAT_SuperHandle_ni();
}
t1 = System.currentTimeMillis();
myTimes[16][0] = t1 - t0;
}
private void runFinals ( long[][] myTimes ) {
long t0,t1;
int locI1,locI2;
Object locObj1,locObj2,locObj3,locObj4;
int jcount = 0;
if (pFlag) System.out.println("runFinals initialization");
if (pFlag) System.out.println("MPAT_Const4_fi_0");
i1 = MPAT_Const4_fi_0();
if (pFlag) System.out.println("MPAT_Const4_fi_1");
obj1 = MPAT_Const4_fi_1();
if (pFlag) System.out.println("MPAT_GetStatic4_fi_0");
i2 = MPAT_GetStatic4_fi_0();
if (pFlag) System.out.println("MPAT_GetStatic4_fi_1");
obj2 = MPAT_GetStatic4_fi_1();
if (pFlag) System.out.print("MPAT_GetField4_fi_0");
try {
i3 = MPAT_GetField4_fi_0();
} catch ( Exception e ) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_GetField4_fi_1");
try {
obj3 = MPAT_GetField4_fi_1();
} catch ( Exception e ) {
System.out.print(": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_PutField4_fi_0");
MPAT_PutField4_fi_0(10);
if (pFlag) System.out.println("MPAT_PutField4_fi_1");
MPAT_PutField4_fi_1("String1");
if (pFlag) System.out.println("MPAT_PutField4Const4_fi");
MPAT_PutField4Const4_fi();
if (pFlag) System.out.println("MPAT_NullMethod_fi");
MPAT_NullMethod_fi();
if (pFlag) System.out.println("MPAT_Handle_fi");
locObj3 = MPAT_Handle_fi();
if (pFlag) System.out.println("MPAT_SuperHandle_fi");
locObj4 = MPAT_SuperHandle_fi();
if (pFlag) System.out.println("runFinals execution");
if (pFlag) System.out.print("MPAT_Const4_fs_0");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
locI1 = MPAT_Const4_fs_0();
}
t1 = System.currentTimeMillis();
myTimes[0][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[0][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.print("MPAT_Const4_fs_1");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
locObj1 = MPAT_Const4_fs_1();
}
t1 = System.currentTimeMillis();
myTimes[1][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[1][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
if (pFlag) System.out.println("MPAT_GetStatic4_fs_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locI2 = MPAT_GetStatic4_fs_0();
}
t1 = System.currentTimeMillis();
myTimes[2][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fs_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
locObj2 = MPAT_GetStatic4_fs_1();
}
t1 = System.currentTimeMillis();
myTimes[3][1] = t1 - t0;
if (pFlag) System.out.print("MPAT_NullMethod_fs");
t0 = System.currentTimeMillis();
try {
for (jcount=0; jcount<ITERS; jcount++) {
MPAT_NullMethod_fs();
}
t1 = System.currentTimeMillis();
myTimes[4][1] = t1 - t0;
} catch (Exception e) {
t1 = System.currentTimeMillis();
myTimes[4][1] = t1 - t0;
System.out.print(": iteration="+(jcount+1)+": "+e);
} finally {
System.out.println("");
}
/* Check inlining of instance methods */
if (pFlag) System.out.println("MPAT_Const4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i1 = MPAT_Const4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[5][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_Const4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj1 = MPAT_Const4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[6][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fi_0");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
i2 = MPAT_GetStatic4_fi_0();
}
t1 = System.currentTimeMillis();
myTimes[7][1] = t1 - t0;
if (pFlag) System.out.println("MPAT_GetStatic4_fi_1");
t0 = System.currentTimeMillis();
for (int icount=0; icount<ITERS; icount++) {
obj2 = MPAT_GetStatic4_fi_1();
}
t1 = System.currentTimeMillis();
myTimes[8][1] = t1 - t0;
if (pFlag
- duplicates
-
JDK-4046148 JVM/JIT x86 segfaults running the javatest harness gui
- Closed