diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp index 72330190b53..9aae3b5c143 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp @@ -931,10 +931,6 @@ void os::_exit(int num) { ALLOW_C_FUNCTION(::_exit, ::_exit(num);) } -bool os::dont_yield() { - return DontYieldALot; -} - void os::naked_yield() { sched_yield(); } diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index 9d514e584a4..fd857c2cd95 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -4856,12 +4856,6 @@ int os::loadavg(double loadavg[], int nelem) { return -1; } - -// DontYieldALot=false by default: dutifully perform all yields as requested by JVM_Yield() -bool os::dont_yield() { - return DontYieldALot; -} - int os::open(const char *path, int oflag, int mode) { errno_t err; wchar_t* wide_path = wide_abs_unc_path(path, err); diff --git a/src/hotspot/os_cpu/aix_ppc/globals_aix_ppc.hpp b/src/hotspot/os_cpu/aix_ppc/globals_aix_ppc.hpp index b946ce15fa0..e8b04add19d 100644 --- a/src/hotspot/os_cpu/aix_ppc/globals_aix_ppc.hpp +++ b/src/hotspot/os_cpu/aix_ppc/globals_aix_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,7 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default define_pd_global(intx, VMThreadStackSize, 2048); diff --git a/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp b/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp index c18c4506ac9..4a10e7af091 100644 --- a/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp +++ b/src/hotspot/os_cpu/bsd_aarch64/globals_bsd_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * Copyright (c) 2021, Azul Systems, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +31,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default define_pd_global(intx, VMThreadStackSize, 2048); diff --git a/src/hotspot/os_cpu/bsd_x86/globals_bsd_x86.hpp b/src/hotspot/os_cpu/bsd_x86/globals_bsd_x86.hpp index a434e329a8b..f67bb15c69e 100644 --- a/src/hotspot/os_cpu/bsd_x86/globals_bsd_x86.hpp +++ b/src/hotspot/os_cpu/bsd_x86/globals_bsd_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, 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 @@ -29,7 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) // -define_pd_global(bool, DontYieldALot, false); #ifdef AMD64 define_pd_global(intx, CompilerThreadStackSize, 1024); define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default diff --git a/src/hotspot/os_cpu/bsd_zero/globals_bsd_zero.hpp b/src/hotspot/os_cpu/bsd_zero/globals_bsd_zero.hpp index 71aa9043e9e..daf2fd8f2a6 100644 --- a/src/hotspot/os_cpu/bsd_zero/globals_bsd_zero.hpp +++ b/src/hotspot/os_cpu/bsd_zero/globals_bsd_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -31,7 +31,6 @@ // runtime system. See globals.hpp for details of what they do. // -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 1536); #ifdef _LP64 define_pd_global(intx, VMThreadStackSize, 1024); diff --git a/src/hotspot/os_cpu/linux_aarch64/globals_linux_aarch64.hpp b/src/hotspot/os_cpu/linux_aarch64/globals_linux_aarch64.hpp index c4219c2bac3..955a0ae9dcd 100644 --- a/src/hotspot/os_cpu/linux_aarch64/globals_linux_aarch64.hpp +++ b/src/hotspot/os_cpu/linux_aarch64/globals_linux_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,8 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); - // Set default stack sizes < 2MB so as to prevent stacks from getting // large-page aligned and backed by THPs on systems where 2MB is the // default huge page size. For non-JavaThreads, glibc may add an additional diff --git a/src/hotspot/os_cpu/linux_arm/globals_linux_arm.hpp b/src/hotspot/os_cpu/linux_arm/globals_linux_arm.hpp index 4f2d3918a4d..c4ffdf2c02e 100644 --- a/src/hotspot/os_cpu/linux_arm/globals_linux_arm.hpp +++ b/src/hotspot/os_cpu/linux_arm/globals_linux_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024, 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 @@ -29,7 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) // -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, CompilerThreadStackSize, 512); // System default ThreadStackSize appears to be 512 which is too big. define_pd_global(intx, ThreadStackSize, 320); diff --git a/src/hotspot/os_cpu/linux_ppc/globals_linux_ppc.hpp b/src/hotspot/os_cpu/linux_ppc/globals_linux_ppc.hpp index 182c55b9f96..96dcf0a8c0e 100644 --- a/src/hotspot/os_cpu/linux_ppc/globals_linux_ppc.hpp +++ b/src/hotspot/os_cpu/linux_ppc/globals_linux_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,7 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default define_pd_global(intx, VMThreadStackSize, 2048); diff --git a/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp b/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp index 297414bfcd5..16e4b205547 100644 --- a/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp +++ b/src/hotspot/os_cpu/linux_riscv/globals_linux_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,7 +29,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default define_pd_global(intx, VMThreadStackSize, 2048); diff --git a/src/hotspot/os_cpu/linux_s390/globals_linux_s390.hpp b/src/hotspot/os_cpu/linux_s390/globals_linux_s390.hpp index 295dd665d2d..49607e24d15 100644 --- a/src/hotspot/os_cpu/linux_s390/globals_linux_s390.hpp +++ b/src/hotspot/os_cpu/linux_s390/globals_linux_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -31,7 +31,6 @@ // Sets the default values for platform dependent flags used by the // runtime system (see globals.hpp). -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 1024); // 0 => Use system default. define_pd_global(intx, VMThreadStackSize, 1024); // Some jck tests in lang/fp/fpl038 run out of compile thread stack. diff --git a/src/hotspot/os_cpu/linux_x86/globals_linux_x86.hpp b/src/hotspot/os_cpu/linux_x86/globals_linux_x86.hpp index 8f1f64c2d9e..97a5732d00a 100644 --- a/src/hotspot/os_cpu/linux_x86/globals_linux_x86.hpp +++ b/src/hotspot/os_cpu/linux_x86/globals_linux_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, 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 @@ -28,7 +28,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); #ifdef AMD64 define_pd_global(intx, CompilerThreadStackSize, 1024); define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default diff --git a/src/hotspot/os_cpu/linux_zero/globals_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/globals_linux_zero.hpp index 957c5c4a12a..ed09bf8372e 100644 --- a/src/hotspot/os_cpu/linux_zero/globals_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/globals_linux_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -31,7 +31,6 @@ // runtime system. See globals.hpp for details of what they do. // -define_pd_global(bool, DontYieldALot, false); define_pd_global(intx, ThreadStackSize, 1536); #ifdef _LP64 define_pd_global(intx, VMThreadStackSize, 1024); diff --git a/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp index 836fb463206..a438e438cdb 100644 --- a/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp +++ b/src/hotspot/os_cpu/windows_aarch64/globals_windows_aarch64.hpp @@ -28,8 +28,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); - // Default stack size on Windows is determined by the executable (java.exe // has a default value of 320K/1MB [32bit/64bit]). Depending on Windows version, changing // ThreadStackSize to non-zero may have significant impact on memory usage. diff --git a/src/hotspot/os_cpu/windows_x86/globals_windows_x86.hpp b/src/hotspot/os_cpu/windows_x86/globals_windows_x86.hpp index c94796b097a..811fa2e07e9 100644 --- a/src/hotspot/os_cpu/windows_x86/globals_windows_x86.hpp +++ b/src/hotspot/os_cpu/windows_x86/globals_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2024, 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 @@ -28,8 +28,6 @@ // Sets the default values for platform dependent flags used by the runtime system. // (see globals.hpp) -define_pd_global(bool, DontYieldALot, false); - // Default stack size on Windows is determined by the executable (java.exe // has a default value of 320K/1MB [32bit/64bit]). Depending on Windows version, changing // ThreadStackSize to non-zero may have significant impact on memory usage. diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp index e91cee86c50..12ed10630fc 100644 --- a/src/hotspot/share/prims/jvm.cpp +++ b/src/hotspot/share/prims/jvm.cpp @@ -2951,7 +2951,6 @@ JVM_END JVM_LEAF(void, JVM_Yield(JNIEnv *env, jclass threadClass)) - if (os::dont_yield()) return; HOTSPOT_THREAD_YIELD(); os::naked_yield(); JVM_END diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 70b537bf2d7..11c13fe3c9e 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -697,9 +697,6 @@ const int ObjectAlignmentInBytes = 8; "Allow parallel defineClass requests for class loaders " \ "registering as parallel capable") \ \ - product_pd(bool, DontYieldALot, \ - "(Deprecated) Throw away obvious excess yield calls") \ - \ product(bool, DisablePrimordialThreadGuardPages, false, EXPERIMENTAL, \ "Disable the use of stack guard pages if the JVM is loaded " \ "on the primordial process thread") \ diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp index 2f665df5bba..54771f622e9 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -1042,8 +1042,6 @@ class os: AllStatic { // debugging support (mostly used by debug.cpp but also fatal error handler) static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address - static bool dont_yield(); // when true, JVM_Yield() is nop - // Thread priority helpers (implemented in OS-specific part) static OSReturn set_native_priority(Thread* thread, int native_prio); static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr);