Skip to content

Commit 4aede33

Browse files
committed
8288282: Zero-release build is broken after JDK-8279047 due to UseHeavyMonitors is read-only
Reviewed-by: dholmes, shade
1 parent 0207d76 commit 4aede33

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/hotspot/cpu/zero/vm_version_zero.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
33
* Copyright 2009 Red Hat, Inc.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -45,9 +45,10 @@ void VM_Version::initialize() {
4545
}
4646
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 0);
4747

48-
// If lock diagnostics is needed, always call to runtime
48+
// Disable lock diagnostics for Zero
4949
if (DiagnoseSyncOnValueBasedClasses != 0) {
50-
FLAG_SET_DEFAULT(UseHeavyMonitors, true);
50+
warning("Lock diagnostics is not available for a Zero VM");
51+
FLAG_SET_DEFAULT(DiagnoseSyncOnValueBasedClasses, 0);
5152
}
5253

5354
if (UseAESIntrinsics) {

test/hotspot/jtreg/runtime/Monitor/SyncOnValueBasedClassTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
3131
* @bug 8242263
3232
* @summary Exercise DiagnoseSyncOnValueBasedClasses diagnostic flag
3333
* @requires vm.flagless
34+
* @requires vm.flavor != "zero"
3435
* @library /test/lib
3536
* @run driver/timeout=180000 SyncOnValueBasedClassTest
3637
*/

0 commit comments

Comments
 (0)