8288282: Zero-release build is broken after JDK-8279047 due to UseHeavyMonitors is read-only

Reviewed-by: dholmes, shade
This commit is contained in:
Jie Fu 2022-06-13 14:36:57 +00:00
parent 0207d761f4
commit 4aede33fbf
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -45,9 +45,10 @@ void VM_Version::initialize() {
}
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 0);
// If lock diagnostics is needed, always call to runtime
// Disable lock diagnostics for Zero
if (DiagnoseSyncOnValueBasedClasses != 0) {
FLAG_SET_DEFAULT(UseHeavyMonitors, true);
warning("Lock diagnostics is not available for a Zero VM");
FLAG_SET_DEFAULT(DiagnoseSyncOnValueBasedClasses, 0);
}
if (UseAESIntrinsics) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022, 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
@ -31,6 +31,7 @@ import java.util.stream.*;
* @bug 8242263
* @summary Exercise DiagnoseSyncOnValueBasedClasses diagnostic flag
* @requires vm.flagless
* @requires vm.flavor != "zero"
* @library /test/lib
* @run driver/timeout=180000 SyncOnValueBasedClassTest
*/