# HG changeset patch # User Doug Simon # Date 1381150038 -7200 # Node ID b7ce25d81ef3c3ecb8acaea11e27e065ba6d103a # Parent 43bf803203c0f659f1b83fb1ee515e6a93d7f693 fixed WriteBarrier tests diff -r 43bf803203c0 -r b7ce25d81ef3 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java Mon Oct 07 11:36:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierAdditionTest.java Mon Oct 07 14:47:18 2013 +0200 @@ -258,9 +258,10 @@ int barriers = 0; if (useG1GC()) { - barriers = graph.getNodes(G1ReferentFieldReadBarrier.class).count() + graph.getNodes(G1PreWriteBarrier.class).count() + graph.getNodes(G1PostWriteBarrier.class).count(); + barriers = graph.getNodes().filter(G1ReferentFieldReadBarrier.class).count() + graph.getNodes().filter(G1PreWriteBarrier.class).count() + + graph.getNodes().filter(G1PostWriteBarrier.class).count(); } else { - barriers = graph.getNodes(SerialWriteBarrier.class).count(); + barriers = graph.getNodes().filter(SerialWriteBarrier.class).count(); } Assert.assertEquals(expectedBarriers, barriers); for (WriteNode write : graph.getNodes().filter(WriteNode.class)) { diff -r 43bf803203c0 -r b7ce25d81ef3 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java Mon Oct 07 11:36:49 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/WriteBarrierVerificationTest.java Mon Oct 07 14:47:18 2013 +0200 @@ -647,11 +647,11 @@ int barriers = 0; // First, the total number of expected barriers is checked. if (((HotSpotRuntime) runtime()).config.useG1GC) { - barriers = graph.getNodes(G1PreWriteBarrier.class).count() + graph.getNodes(G1PostWriteBarrier.class).count() + graph.getNodes(G1ArrayRangePreWriteBarrier.class).count() + - graph.getNodes(G1ArrayRangePostWriteBarrier.class).count(); + barriers = graph.getNodes().filter(G1PreWriteBarrier.class).count() + graph.getNodes().filter(G1PostWriteBarrier.class).count() + + graph.getNodes().filter(G1ArrayRangePreWriteBarrier.class).count() + graph.getNodes().filter(G1ArrayRangePostWriteBarrier.class).count(); Assert.assertTrue(expectedBarriers * 2 == barriers); } else { - barriers = graph.getNodes(SerialWriteBarrier.class).count() + graph.getNodes(SerialArrayRangeWriteBarrier.class).count(); + barriers = graph.getNodes().filter(SerialWriteBarrier.class).count() + graph.getNodes().filter(SerialArrayRangeWriteBarrier.class).count(); Assert.assertTrue(expectedBarriers == barriers); } // Iterate over all write nodes and remove barriers according to input indices.