--- old/test/jdk/jdk/jfr/event/runtime/TestBiasedLockRevocationEvents.java 2019-07-06 01:49:06.432659712 -0400 +++ new/test/jdk/jdk/jfr/event/runtime/TestBiasedLockRevocationEvents.java 2019-07-06 01:49:06.298647283 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -264,7 +264,6 @@ Recording recording = new Recording(); - recording.enable(EventNames.BiasedLockRevocation); recording.enable(EventNames.BiasedLockClassRevocation); recording.enable(EventNames.ExecuteVMOperation); recording.start(); @@ -274,8 +273,7 @@ recording.stop(); List events = Events.fromRecording(recording); - // Determine which safepoints included single and bulk revocation VM operations - Set vmOperationsSingle = new HashSet<>(); + // Determine which safepoints included bulk revocation VM operations Set vmOperationsBulk = new HashSet<>(); for (RecordedEvent event : events) { @@ -283,27 +281,17 @@ String operation = event.getValue("operation"); Long safepointId = event.getValue("safepointId"); - if (operation.equals("RevokeBias")) { - vmOperationsSingle.add(safepointId); - } else if (operation.equals("BulkRevokeBias")) { + if (operation.equals("BulkRevokeBias")) { vmOperationsBulk.add(safepointId); } } } - int revokeCount = 0; int bulkRevokeCount = 0; // Match all revoke events to a corresponding VMOperation event for (RecordedEvent event : events) { - if (event.getEventType().getName().equals(EventNames.BiasedLockRevocation)) { - Long safepointId = event.getValue("safepointId"); - String lockClass = ((RecordedClass)event.getValue("lockClass")).getName(); - if (lockClass.equals(MyLock.class.getName())) { - Asserts.assertTrue(vmOperationsSingle.contains(safepointId)); - revokeCount++; - } - } else if (event.getEventType().getName().equals(EventNames.BiasedLockClassRevocation)) { + if (event.getEventType().getName().equals(EventNames.BiasedLockClassRevocation)) { Long safepointId = event.getValue("safepointId"); String lockClass = ((RecordedClass)event.getValue("revokedClass")).getName(); if (lockClass.toString().equals(MyLock.class.getName())) { @@ -314,6 +302,5 @@ } Asserts.assertGT(bulkRevokeCount, 0); - Asserts.assertGT(revokeCount, bulkRevokeCount); } }