Skip to content

Commit bb52ea6

Browse files
committed
8286263: compiler/c1/TestPinnedIntrinsics.java failed with "RuntimeException: testCurrentTimeMillis failed with -3"
Reviewed-by: thartmann, kvn
1 parent 5a1d8f7 commit bb52ea6

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

test/hotspot/jtreg/compiler/c1/TestPinnedIntrinsics.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
/*
2525
* @test
2626
* @bug 8184271
27-
* @summary Test correct scheduling of System.nanoTime and System.currentTimeMillis C1 intrinsics.
27+
* @summary Test correct scheduling of System.nanoTime C1 intrinsic.
2828
* @run main/othervm -XX:TieredStopAtLevel=1 -Xbatch
2929
* -XX:CompileCommand=dontinline,compiler.c1.TestPinnedIntrinsics::checkNanoTime
30-
* -XX:CompileCommand=dontinline,compiler.c1.TestPinnedIntrinsics::checkCurrentTimeMillis
3130
* compiler.c1.TestPinnedIntrinsics
3231
*/
3332

@@ -47,22 +46,9 @@ private static void checkNanoTime(long diff) {
4746
}
4847
}
4948

50-
private static void testCurrentTimeMillis() {
51-
long start = System.currentTimeMillis();
52-
long end = System.currentTimeMillis();
53-
checkCurrentTimeMillis(end - start);
54-
}
55-
56-
private static void checkCurrentTimeMillis(long diff) {
57-
if (diff < 0) {
58-
throw new RuntimeException("testCurrentTimeMillis failed with " + diff);
59-
}
60-
}
61-
6249
public static void main(String[] args) {
6350
for (int i = 0; i < 100_000; ++i) {
6451
testNanoTime();
65-
testCurrentTimeMillis();
6652
}
6753
}
6854
}

0 commit comments

Comments
 (0)