--- old/src/hotspot/cpu/aarch64/globals_aarch64.hpp 2020-01-02 16:17:36.327895630 -0800 +++ new/src/hotspot/cpu/aarch64/globals_aarch64.hpp 2020-01-02 16:17:36.039884671 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2019, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -81,8 +81,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, NearCpool, true, \ "constant pool is close to instructions") \ --- old/src/hotspot/cpu/arm/globals_arm.hpp 2020-01-02 16:17:36.995921050 -0800 +++ new/src/hotspot/cpu/arm/globals_arm.hpp 2020-01-02 16:17:36.715910395 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2020, 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 @@ -76,6 +76,5 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) + constraint) #endif // CPU_ARM_GLOBALS_ARM_HPP --- old/src/hotspot/cpu/ppc/globals_ppc.hpp 2020-01-02 16:17:37.663946469 -0800 +++ new/src/hotspot/cpu/ppc/globals_ppc.hpp 2020-01-02 16:17:37.387935967 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -81,8 +81,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(uintx, PowerArchitecturePPC64, 0, \ "CPU Version: x for PowerX. Currently recognizes Power5 to " \ --- old/src/hotspot/cpu/s390/globals_s390.hpp 2020-01-02 16:17:38.331971889 -0800 +++ new/src/hotspot/cpu/s390/globals_s390.hpp 2020-01-02 16:17:38.047961082 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -82,8 +82,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ /* Reoptimize code-sequences of calls at runtime, e.g. replace an */ \ /* indirect call by a direct call. */ \ --- old/src/hotspot/cpu/sparc/globals_sparc.hpp 2020-01-02 16:17:38.995997156 -0800 +++ new/src/hotspot/cpu/sparc/globals_sparc.hpp 2020-01-02 16:17:38.715986501 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -86,8 +86,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(intx, UseVIS, 99, \ "Highest supported VIS instructions set on SPARC") \ --- old/src/hotspot/cpu/x86/globals_x86.hpp 2020-01-02 16:17:39.664022576 -0800 +++ new/src/hotspot/cpu/x86/globals_x86.hpp 2020-01-02 16:17:39.376011616 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -95,8 +95,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ develop(bool, IEEEPrecision, true, \ "Enables IEEE precision (for INTEL only)") \ --- old/src/hotspot/cpu/zero/globals_zero.hpp 2020-01-02 16:17:40.332047995 -0800 +++ new/src/hotspot/cpu/zero/globals_zero.hpp 2020-01-02 16:17:40.052037340 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -79,8 +79,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, UseFastEmptyMethods, true, \ "Use fast method entry code for empty methods") \ --- old/src/hotspot/os/aix/globals_aix.hpp 2020-01-02 16:17:41.000073415 -0800 +++ new/src/hotspot/os/aix/globals_aix.hpp 2020-01-02 16:17:40.720062760 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -38,8 +38,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ /* Whether to allow the VM to run if EXTSHM=ON. EXTSHM is an environment */ \ /* variable used on AIX to activate certain hacks which allow more shm segments */\ --- old/src/hotspot/os/bsd/globals_bsd.hpp 2020-01-02 16:17:41.668098834 -0800 +++ new/src/hotspot/os/bsd/globals_bsd.hpp 2020-01-02 16:17:41.384088027 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, 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 @@ -36,8 +36,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, UseOprofile, false, \ "enable support for Oprofile profiler") \ --- old/src/hotspot/os/linux/globals_linux.hpp 2020-01-02 16:17:42.340124406 -0800 +++ new/src/hotspot/os/linux/globals_linux.hpp 2020-01-02 16:17:42.056113599 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, 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 @@ -36,8 +36,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, UseOprofile, false, \ "enable support for Oprofile profiler") \ --- old/src/hotspot/os/solaris/globals_solaris.hpp 2020-01-02 16:17:43.008149825 -0800 +++ new/src/hotspot/os/solaris/globals_solaris.hpp 2020-01-02 16:17:42.728139170 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, 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 @@ -36,8 +36,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, UseExtendedFileIO, true, \ "Enable workaround for limitations of stdio FILE structure") --- old/src/hotspot/os/windows/globals_windows.hpp 2020-01-02 16:17:43.676175245 -0800 +++ new/src/hotspot/os/windows/globals_windows.hpp 2020-01-02 16:17:43.396164590 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2020, 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 @@ -36,8 +36,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) + constraint) // --- old/src/hotspot/share/c1/c1_globals.hpp 2020-01-02 16:17:44.340200512 -0800 +++ new/src/hotspot/share/c1/c1_globals.hpp 2020-01-02 16:17:44.060189857 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -42,8 +42,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ /* Printing */ \ notproduct(bool, PrintC1Statistics, false, \ --- old/src/hotspot/share/gc/epsilon/epsilon_globals.hpp 2020-01-02 16:17:45.004225780 -0800 +++ new/src/hotspot/share/gc/epsilon/epsilon_globals.hpp 2020-01-02 16:17:44.724215124 -0800 @@ -1,4 +1,5 @@ /* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -43,8 +44,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ experimental(size_t, EpsilonPrintHeapSteps, 20, \ "Print heap occupancy stats with this number of steps. " \ --- old/src/hotspot/share/gc/g1/g1_globals.hpp 2020-01-02 16:17:45.680251503 -0800 +++ new/src/hotspot/share/gc/g1/g1_globals.hpp 2020-01-02 16:17:45.396240696 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, 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 @@ -43,8 +43,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ product(bool, G1UseAdaptiveIHOP, true, \ "Adaptively adjust the initiating heap occupancy from the " \ --- old/src/hotspot/share/gc/parallel/parallel_globals.hpp 2020-01-02 16:17:46.348276922 -0800 +++ new/src/hotspot/share/gc/parallel/parallel_globals.hpp 2020-01-02 16:17:46.068266268 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -37,8 +37,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ product(uintx, HeapMaximumCompactionInterval, 20, \ "How often should we maximally compact the heap (not allowing " \ "any dead space)") \ --- old/src/hotspot/share/gc/serial/serial_globals.hpp 2020-01-02 16:17:47.016302342 -0800 +++ new/src/hotspot/share/gc/serial/serial_globals.hpp 2020-01-02 16:17:46.736291687 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020, 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 @@ -37,7 +37,6 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) + constraint) #endif // SHARE_GC_SERIAL_SERIAL_GLOBALS_HPP --- old/src/hotspot/share/gc/shared/gc_globals.hpp 2020-01-02 16:17:47.688327913 -0800 +++ new/src/hotspot/share/gc/shared/gc_globals.hpp 2020-01-02 16:17:47.404317106 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -58,8 +58,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ EPSILONGC_ONLY(GC_EPSILON_FLAGS( \ develop, \ @@ -74,8 +73,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ G1GC_ONLY(GC_G1_FLAGS( \ develop, \ @@ -90,8 +88,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ PARALLELGC_ONLY(GC_PARALLEL_FLAGS( \ develop, \ @@ -106,8 +103,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ SERIALGC_ONLY(GC_SERIAL_FLAGS( \ develop, \ @@ -122,8 +118,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ SHENANDOAHGC_ONLY(GC_SHENANDOAH_FLAGS( \ develop, \ @@ -138,8 +133,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ ZGC_ONLY(GC_Z_FLAGS( \ develop, \ @@ -154,8 +148,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ /* gc */ \ \ --- old/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2020-01-02 16:17:48.376354094 -0800 +++ new/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp 2020-01-02 16:17:48.092343287 -0800 @@ -1,4 +1,5 @@ /* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2019, Red Hat, Inc. All rights reserved. * * This code is free software; you can redistribute it and/or modify it @@ -36,8 +37,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ experimental(size_t, ShenandoahHeapRegionSize, 0, \ "Size of the Shenandoah regions. Set to zero to detect " \ --- old/src/hotspot/share/gc/z/z_globals.hpp 2020-01-02 16:17:49.044379513 -0800 +++ new/src/hotspot/share/gc/z/z_globals.hpp 2020-01-02 16:17:48.764368859 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020, 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 @@ -36,8 +36,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ experimental(ccstr, ZPath, NULL, \ "Filesystem path for Java heap backing storage " \ --- old/src/hotspot/share/jvmci/jvmci_globals.cpp 2020-01-02 16:17:49.708404781 -0800 +++ new/src/hotspot/share/jvmci/jvmci_globals.cpp 2020-01-02 16:17:49.424393973 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -37,7 +37,7 @@ #ifndef PRODUCT #define APPLY_JVMCI_FLAGS(params3, params4) \ - JVMCI_FLAGS(params4, params3, params4, params3, params4, params3, params4, params4, IGNORE_RANGE, IGNORE_CONSTRAINT, IGNORE_WRITEABLE) + JVMCI_FLAGS(params4, params3, params4, params3, params4, params3, params4, params4, IGNORE_RANGE, IGNORE_CONSTRAINT) #define JVMCI_DECLARE_CHECK4(type, name, value, doc) bool name##checked = false; #define JVMCI_DECLARE_CHECK3(type, name, doc) bool name##checked = false; #define JVMCI_FLAG_CHECKED(name) name##checked = true; --- old/src/hotspot/share/jvmci/jvmci_globals.hpp 2020-01-02 16:17:50.376430200 -0800 +++ new/src/hotspot/share/jvmci/jvmci_globals.hpp 2020-01-02 16:17:50.096419545 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -42,8 +42,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ experimental(bool, EnableJVMCI, false, \ "Enable JVMCI") \ --- old/src/hotspot/share/opto/c2_globals.hpp 2020-01-02 16:17:51.044455619 -0800 +++ new/src/hotspot/share/opto/c2_globals.hpp 2020-01-02 16:17:50.764444964 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2020, 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 @@ -44,8 +44,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ diagnostic(bool, StressLCM, false, \ "Randomize instruction scheduling in LCM") \ --- old/src/hotspot/share/runtime/arguments.cpp 2020-01-02 16:17:51.724481495 -0800 +++ new/src/hotspot/share/runtime/arguments.cpp 2020-01-02 16:17:51.432470383 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -42,7 +42,6 @@ #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" #include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagWriteableList.hpp" #include "runtime/flags/jvmFlagRangeList.hpp" #include "runtime/globals_extension.hpp" #include "runtime/java.hpp" @@ -3819,7 +3818,6 @@ // Initialize ranges, constraints and writeables JVMFlagRangeList::init(); JVMFlagConstraintList::init(); - JVMFlagWriteableList::init(); // If flag "-XX:Flags=flags-file" is used it will be the first option to be processed. const char* hotspotrc = ".hotspotrc"; --- old/src/hotspot/share/runtime/flags/jvmFlag.cpp 2020-01-02 16:17:52.440508741 -0800 +++ new/src/hotspot/share/runtime/flags/jvmFlag.cpp 2020-01-02 16:17:52.156497934 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" #include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagWriteableList.hpp" #include "runtime/flags/jvmFlagRangeList.hpp" #include "runtime/globals_extension.hpp" #include "utilities/defaultStream.hpp" @@ -92,165 +91,38 @@ #endif } -JVMFlag::Error JVMFlag::check_writable(bool changed) { - if (is_constant_in_binary()) { - fatal("flag is constant: %s", _name); - } - - JVMFlag::Error error = JVMFlag::SUCCESS; - if (changed) { - JVMFlagWriteable* writeable = JVMFlagWriteableList::find(_name); - if (writeable) { - if (writeable->is_writeable() == false) { - switch (writeable->type()) - { - case JVMFlagWriteable::Once: - error = JVMFlag::SET_ONLY_ONCE; - jio_fprintf(defaultStream::error_stream(), "Error: %s may not be set more than once\n", _name); - break; - case JVMFlagWriteable::CommandLineOnly: - error = JVMFlag::COMMAND_LINE_ONLY; - jio_fprintf(defaultStream::error_stream(), "Error: %s may be modified only from commad line\n", _name); - break; - default: - ShouldNotReachHere(); - break; - } - } - writeable->mark_once(); - } - } - return error; -} - bool JVMFlag::is_bool() const { return strcmp(_type, "bool") == 0; } -bool JVMFlag::get_bool() const { - return *((bool*) _addr); -} - -JVMFlag::Error JVMFlag::set_bool(bool value) { - JVMFlag::Error error = check_writable(value!=get_bool()); - if (error == JVMFlag::SUCCESS) { - *((bool*) _addr) = value; - } - return error; -} - bool JVMFlag::is_int() const { return strcmp(_type, "int") == 0; } -int JVMFlag::get_int() const { - return *((int*) _addr); -} - -JVMFlag::Error JVMFlag::set_int(int value) { - JVMFlag::Error error = check_writable(value!=get_int()); - if (error == JVMFlag::SUCCESS) { - *((int*) _addr) = value; - } - return error; -} - bool JVMFlag::is_uint() const { return strcmp(_type, "uint") == 0; } -uint JVMFlag::get_uint() const { - return *((uint*) _addr); -} - -JVMFlag::Error JVMFlag::set_uint(uint value) { - JVMFlag::Error error = check_writable(value!=get_uint()); - if (error == JVMFlag::SUCCESS) { - *((uint*) _addr) = value; - } - return error; -} - bool JVMFlag::is_intx() const { return strcmp(_type, "intx") == 0; } -intx JVMFlag::get_intx() const { - return *((intx*) _addr); -} - -JVMFlag::Error JVMFlag::set_intx(intx value) { - JVMFlag::Error error = check_writable(value!=get_intx()); - if (error == JVMFlag::SUCCESS) { - *((intx*) _addr) = value; - } - return error; -} - bool JVMFlag::is_uintx() const { return strcmp(_type, "uintx") == 0; } -uintx JVMFlag::get_uintx() const { - return *((uintx*) _addr); -} - -JVMFlag::Error JVMFlag::set_uintx(uintx value) { - JVMFlag::Error error = check_writable(value!=get_uintx()); - if (error == JVMFlag::SUCCESS) { - *((uintx*) _addr) = value; - } - return error; -} - bool JVMFlag::is_uint64_t() const { return strcmp(_type, "uint64_t") == 0; } -uint64_t JVMFlag::get_uint64_t() const { - return *((uint64_t*) _addr); -} - -JVMFlag::Error JVMFlag::set_uint64_t(uint64_t value) { - JVMFlag::Error error = check_writable(value!=get_uint64_t()); - if (error == JVMFlag::SUCCESS) { - *((uint64_t*) _addr) = value; - } - return error; -} - bool JVMFlag::is_size_t() const { return strcmp(_type, "size_t") == 0; } -size_t JVMFlag::get_size_t() const { - return *((size_t*) _addr); -} - -JVMFlag::Error JVMFlag::set_size_t(size_t value) { - JVMFlag::Error error = check_writable(value!=get_size_t()); - if (error == JVMFlag::SUCCESS) { - *((size_t*) _addr) = value; - } - return error; -} - bool JVMFlag::is_double() const { return strcmp(_type, "double") == 0; } -double JVMFlag::get_double() const { - return *((double*) _addr); -} - -JVMFlag::Error JVMFlag::set_double(double value) { - JVMFlag::Error error = check_writable(value!=get_double()); - if (error == JVMFlag::SUCCESS) { - *((double*) _addr) = value; - } - return error; -} - bool JVMFlag::is_ccstr() const { return strcmp(_type, "ccstr") == 0 || strcmp(_type, "ccstrlist") == 0; } @@ -259,19 +131,6 @@ return strcmp(_type, "ccstrlist") == 0; } -ccstr JVMFlag::get_ccstr() const { - return *((ccstr*) _addr); -} - -JVMFlag::Error JVMFlag::set_ccstr(ccstr value) { - JVMFlag::Error error = check_writable(value!=get_ccstr()); - if (error == JVMFlag::SUCCESS) { - *((ccstr*) _addr) = value; - } - return error; -} - - JVMFlag::Flags JVMFlag::get_origin() { return Flags(_flags & VALUE_ORIGIN_MASK); } @@ -835,8 +694,7 @@ RUNTIME_PRODUCT_RW_FLAG_STRUCT, \ RUNTIME_LP64_PRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, \ RUNTIME_PD_DEVELOP_FLAG_STRUCT, \ @@ -846,8 +704,7 @@ RUNTIME_PD_DIAGNOSTIC_FLAG_STRUCT, \ RUNTIME_NOTPRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #if INCLUDE_JVMCI JVMCI_FLAGS(JVMCI_DEVELOP_FLAG_STRUCT, \ JVMCI_PD_DEVELOP_FLAG_STRUCT, \ @@ -858,8 +715,7 @@ JVMCI_EXPERIMENTAL_FLAG_STRUCT, \ JVMCI_NOTPRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #endif // INCLUDE_JVMCI #ifdef COMPILER1 C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, \ @@ -870,8 +726,7 @@ C1_PD_DIAGNOSTIC_FLAG_STRUCT, \ C1_NOTPRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #endif // COMPILER1 #ifdef COMPILER2 C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, \ @@ -883,8 +738,7 @@ C2_EXPERIMENTAL_FLAG_STRUCT, \ C2_NOTPRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #endif // COMPILER2 ARCH_FLAGS(ARCH_DEVELOP_FLAG_STRUCT, \ ARCH_PRODUCT_FLAG_STRUCT, \ @@ -892,8 +746,7 @@ ARCH_EXPERIMENTAL_FLAG_STRUCT, \ ARCH_NOTPRODUCT_FLAG_STRUCT, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) {0, NULL, NULL} }; @@ -1025,10 +878,10 @@ if (check != JVMFlag::SUCCESS) return check; bool old_value = flag->get_bool(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_bool(*value); + flag->set_bool(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::boolAtPut(JVMFlagsEnum flag, bool value, JVMFlag::Flags origin) { @@ -1066,10 +919,10 @@ if (check != JVMFlag::SUCCESS) return check; int old_value = flag->get_int(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_int(*value); + flag->set_int(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::intAtPut(JVMFlagsEnum flag, int value, JVMFlag::Flags origin) { @@ -1107,10 +960,10 @@ if (check != JVMFlag::SUCCESS) return check; uint old_value = flag->get_uint(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_uint(*value); + flag->set_uint(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::uintAtPut(JVMFlagsEnum flag, uint value, JVMFlag::Flags origin) { @@ -1148,10 +1001,10 @@ if (check != JVMFlag::SUCCESS) return check; intx old_value = flag->get_intx(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_intx(*value); + flag->set_intx(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::intxAtPut(JVMFlagsEnum flag, intx value, JVMFlag::Flags origin) { @@ -1189,10 +1042,10 @@ if (check != JVMFlag::SUCCESS) return check; uintx old_value = flag->get_uintx(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_uintx(*value); + flag->set_uintx(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::uintxAtPut(JVMFlagsEnum flag, uintx value, JVMFlag::Flags origin) { @@ -1230,10 +1083,10 @@ if (check != JVMFlag::SUCCESS) return check; uint64_t old_value = flag->get_uint64_t(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_uint64_t(*value); + flag->set_uint64_t(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::uint64_tAtPut(JVMFlagsEnum flag, uint64_t value, JVMFlag::Flags origin) { @@ -1272,10 +1125,10 @@ if (check != JVMFlag::SUCCESS) return check; size_t old_value = flag->get_size_t(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_size_t(*value); + flag->set_size_t(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::size_tAtPut(JVMFlagsEnum flag, size_t value, JVMFlag::Flags origin) { @@ -1313,10 +1166,10 @@ if (check != JVMFlag::SUCCESS) return check; double old_value = flag->get_double(); trace_flag_changed(flag, old_value, *value, origin); - check = flag->set_double(*value); + flag->set_double(*value); *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::doubleAtPut(JVMFlagsEnum flag, double value, JVMFlag::Flags origin) { @@ -1341,14 +1194,14 @@ if (*value != NULL) { new_value = os::strdup_check_oom(*value); } - JVMFlag::Error check = flag->set_ccstr(new_value); + flag->set_ccstr(new_value); if (flag->is_default() && old_value != NULL) { // Prior value is NOT heap allocated, but was a literal constant. old_value = os::strdup_check_oom(old_value); } *value = old_value; flag->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } JVMFlag::Error JVMFlagEx::ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin) { @@ -1357,13 +1210,13 @@ ccstr old_value = faddr->get_ccstr(); trace_flag_changed(faddr, old_value, value, origin); char* new_value = os::strdup_check_oom(value); - JVMFlag::Error check = faddr->set_ccstr(new_value); + faddr->set_ccstr(new_value); if (!faddr->is_default() && old_value != NULL) { // Prior value is heap allocated so free it. FREE_C_HEAP_ARRAY(char, old_value); } faddr->set_origin(origin); - return check; + return JVMFlag::SUCCESS; } extern "C" { --- old/src/hotspot/share/runtime/flags/jvmFlag.hpp 2020-01-02 16:17:53.124534769 -0800 +++ new/src/hotspot/share/runtime/flags/jvmFlag.hpp 2020-01-02 16:17:52.840523962 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -143,44 +143,42 @@ static const char* get_size_t_default_range_str(); static const char* get_double_default_range_str(); - JVMFlag::Error check_writable(bool changed); - bool is_bool() const; - bool get_bool() const; - JVMFlag::Error set_bool(bool value); + bool get_bool() const { return *((bool*) _addr); } + void set_bool(bool value) { *((bool*) _addr) = value; } bool is_int() const; - int get_int() const; - JVMFlag::Error set_int(int value); + int get_int() const { return *((int*) _addr); } + void set_int(int value) { *((int*) _addr) = value; } bool is_uint() const; - uint get_uint() const; - JVMFlag::Error set_uint(uint value); + uint get_uint() const { return *((uint*) _addr); } + void set_uint(uint value) { *((uint*) _addr) = value; } bool is_intx() const; - intx get_intx() const; - JVMFlag::Error set_intx(intx value); + intx get_intx() const { return *((intx*) _addr); } + void set_intx(intx value) { *((intx*) _addr) = value; } bool is_uintx() const; - uintx get_uintx() const; - JVMFlag::Error set_uintx(uintx value); + uintx get_uintx() const { return *((uintx*) _addr); } + void set_uintx(uintx value) { *((uintx*) _addr) = value; } bool is_uint64_t() const; - uint64_t get_uint64_t() const; - JVMFlag::Error set_uint64_t(uint64_t value); + uint64_t get_uint64_t() const { return *((uint64_t*) _addr); } + void set_uint64_t(uint64_t value) { *((uint64_t*) _addr) = value; } bool is_size_t() const; - size_t get_size_t() const; - JVMFlag::Error set_size_t(size_t value); + size_t get_size_t() const { return *((size_t*) _addr); } + void set_size_t(size_t value) { *((size_t*) _addr) = value; } bool is_double() const; - double get_double() const; - JVMFlag::Error set_double(double value); + double get_double() const { return *((double*) _addr); } + void set_double(double value) { *((double*) _addr) = value; } bool is_ccstr() const; bool ccstr_accumulates() const; - ccstr get_ccstr() const; - JVMFlag::Error set_ccstr(ccstr value); + ccstr get_ccstr() const { return *((ccstr*) _addr); } + void set_ccstr(ccstr value) { *((ccstr*) _addr) = value; } Flags get_origin(); void set_origin(Flags origin); --- old/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp 2020-01-02 16:17:53.804560645 -0800 +++ new/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp 2020-01-02 16:17:53.520549837 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2020, 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 @@ -266,8 +266,7 @@ EMIT_CONSTRAINT_PRODUCT_RW_FLAG, EMIT_CONSTRAINT_LP64_PRODUCT_FLAG, IGNORE_RANGE, - EMIT_CONSTRAINT_CHECK, - IGNORE_WRITEABLE) + EMIT_CONSTRAINT_CHECK) EMIT_CONSTRAINT_END } --- old/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp 2020-01-02 16:17:54.476586216 -0800 +++ new/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp 2020-01-02 16:17:54.192575409 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2020, 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 @@ -331,8 +331,7 @@ EMIT_RANGE_PRODUCT_RW_FLAG, EMIT_RANGE_LP64_PRODUCT_FLAG, EMIT_RANGE_CHECK, - IGNORE_CONSTRAINT, - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) EMIT_RANGE_END } --- old/src/hotspot/share/runtime/globals.cpp 2020-01-02 16:17:55.152611940 -0800 +++ new/src/hotspot/share/runtime/globals.cpp 2020-01-02 16:17:54.868601133 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -32,7 +32,6 @@ #include "runtime/globals_extension.hpp" #include "runtime/globals_shared.hpp" #include "runtime/flags/jvmFlagConstraintList.hpp" -#include "runtime/flags/jvmFlagWriteableList.hpp" #include "runtime/os.hpp" #include "runtime/sharedRuntime.hpp" #include "utilities/defaultStream.hpp" @@ -76,5 +75,4 @@ MATERIALIZE_PRODUCT_RW_FLAG, \ MATERIALIZE_LP64_PRODUCT_FLAG, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) --- old/src/hotspot/share/runtime/globals.hpp 2020-01-02 16:17:55.820637359 -0800 +++ new/src/hotspot/share/runtime/globals.hpp 2020-01-02 16:17:55.536626553 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -104,17 +104,6 @@ // // constraint is a macro that will expand to custom function call // for constraint checking if provided - see jvmFlagConstraintList.hpp -// -// writeable is a macro that controls if and how the value can change during the runtime -// -// writeable(Always) is optional and allows the flag to have its value changed -// without any limitations at any time -// -// writeable(Once) flag value's can be only set once during the lifetime of VM -// -// writeable(CommandLineOnly) flag value's can be only set from command line -// (multiple times allowed) -// // Default and minimum StringTable and SymbolTable size values // Must be powers of 2 @@ -135,8 +124,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ lp64_product(bool, UseCompressedOops, false, \ "Use 32-bit object references in 64-bit VM. " \ @@ -2548,7 +2536,6 @@ DECLARE_PRODUCT_RW_FLAG, \ DECLARE_LP64_PRODUCT_FLAG, \ IGNORE_RANGE, \ - IGNORE_CONSTRAINT, \ - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #endif // SHARE_RUNTIME_GLOBALS_HPP --- old/src/hotspot/share/runtime/globals_extension.hpp 2020-01-02 16:17:56.520663996 -0800 +++ new/src/hotspot/share/runtime/globals_extension.hpp 2020-01-02 16:17:56.236653189 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2020, 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 @@ -63,8 +63,7 @@ FLAG_MEMBER_ENUM_PRODUCT_RW, FLAG_MEMBER_ENUM_LP64_PRODUCT, IGNORE_RANGE, - IGNORE_CONSTRAINT, - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) NUM_JVMFlagsEnum } JVMFlagsEnum; @@ -128,8 +127,7 @@ FLAG_MEMBER_SET_PRODUCT_RW, FLAG_MEMBER_SET_LP64_PRODUCT, IGNORE_RANGE, - IGNORE_CONSTRAINT, - IGNORE_WRITEABLE) + IGNORE_CONSTRAINT) #define FLAG_IS_DEFAULT(name) (JVMFlagEx::is_default(FLAG_MEMBER_ENUM(name))) #define FLAG_IS_ERGO(name) (JVMFlagEx::is_ergo(FLAG_MEMBER_ENUM(name))) --- old/src/hotspot/share/runtime/globals_shared.hpp 2020-01-02 16:17:57.188689415 -0800 +++ new/src/hotspot/share/runtime/globals_shared.hpp 2020-01-02 16:17:56.908678760 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -77,8 +77,6 @@ // Only materialize src code for contraint checking when required, ignore otherwise #define IGNORE_CONSTRAINT(func,type) -#define IGNORE_WRITEABLE(type) - #define VM_FLAGS( \ develop, \ develop_pd, \ @@ -92,8 +90,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ RUNTIME_FLAGS( \ develop, \ @@ -108,8 +105,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ GC_FLAGS( \ develop, \ @@ -124,8 +120,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ #define ALL_FLAGS( \ @@ -141,8 +136,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ VM_FLAGS( \ develop, \ @@ -157,8 +151,7 @@ product_rw, \ lp64_product, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ RUNTIME_OS_FLAGS( \ develop, \ @@ -169,8 +162,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable) \ + constraint) \ \ JVMCI_ONLY(JVMCI_FLAGS( \ develop, \ @@ -182,8 +174,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ COMPILER1_PRESENT(C1_FLAGS( \ develop, \ @@ -194,8 +185,7 @@ diagnostic_pd, \ notproduct, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ COMPILER2_PRESENT(C2_FLAGS( \ develop, \ @@ -207,8 +197,7 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable)) \ + constraint)) \ \ ARCH_FLAGS( \ develop, \ @@ -217,7 +206,6 @@ experimental, \ notproduct, \ range, \ - constraint, \ - writeable) + constraint) #endif // SHARE_RUNTIME_GLOBALS_SHARED_HPP --- old/src/hotspot/share/runtime/thread.cpp 2020-01-02 16:17:57.856714834 -0800 +++ new/src/hotspot/share/runtime/thread.cpp 2020-01-02 16:17:57.568703875 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2020, 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 @@ -68,7 +68,6 @@ #include "runtime/fieldDescriptor.inline.hpp" #include "runtime/flags/jvmFlagConstraintList.hpp" #include "runtime/flags/jvmFlagRangeList.hpp" -#include "runtime/flags/jvmFlagWriteableList.hpp" #include "runtime/deoptimization.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" @@ -3818,8 +3817,6 @@ return JNI_EINVAL; } - JVMFlagWriteableList::mark_startup(); - if (PauseAtStartup) { os::pause(); } --- old/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp 2020-01-02 16:17:58.576742232 -0800 +++ /dev/null 2019-11-19 22:05:02.069813242 -0800 @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2015, 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "runtime/flags/jvmFlagWriteableList.hpp" -#include "runtime/os.hpp" - -bool JVMFlagWriteable::is_writeable(void) { - return _writeable; -} - -void JVMFlagWriteable::mark_once(void) { - if (_type == Once) { - _writeable = false; - } -} - -void JVMFlagWriteable::mark_startup(void) { - if (_type == JVMFlagWriteable::CommandLineOnly) { - _writeable = false; - } -} - -// No control emitting -void emit_writeable_no(...) { /* NOP */ } - -// No control emitting if type argument is NOT provided -void emit_writeable_bool(const char* /*name*/) { /* NOP */ } -void emit_writeable_ccstr(const char* /*name*/) { /* NOP */ } -void emit_writeable_ccstrlist(const char* /*name*/) { /* NOP */ } -void emit_writeable_int(const char* /*name*/) { /* NOP */ } -void emit_writeable_intx(const char* /*name*/) { /* NOP */ } -void emit_writeable_uint(const char* /*name*/) { /* NOP */ } -void emit_writeable_uintx(const char* /*name*/) { /* NOP */ } -void emit_writeable_uint64_t(const char* /*name*/) { /* NOP */ } -void emit_writeable_size_t(const char* /*name*/) { /* NOP */ } -void emit_writeable_double(const char* /*name*/) { /* NOP */ } - -// JVMFlagWriteable emitting code functions if range arguments are provided -void emit_writeable_bool(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_int(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_intx(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_uint(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_uintx(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_uint64_t(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_size_t(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} -void emit_writeable_double(const char* name, JVMFlagWriteable::WriteableType type) { - JVMFlagWriteableList::add(new JVMFlagWriteable(name, type)); -} - -// Generate code to call emit_writeable_xxx function -#define EMIT_WRITEABLE_START (void)(0 -#define EMIT_WRITEABLE(type, name) ); emit_writeable_##type(#name -#define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_DIAGNOSTIC_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_EXPERIMENTAL_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_MANAGEABLE_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_PRODUCT_RW_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_PD_PRODUCT_FLAG(type, name, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_DEVELOPER_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_PD_DEVELOPER_FLAG(type, name, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG(type, name, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name) -#define EMIT_WRITEABLE_END ); - -// Generate type argument to pass into emit_writeable_xxx functions -#define EMIT_WRITEABLE_CHECK(a) , JVMFlagWriteable::a - -#define INITIAL_WRITEABLES_SIZE 2 -GrowableArray* JVMFlagWriteableList::_controls = NULL; - -void JVMFlagWriteableList::init(void) { - - _controls = new (ResourceObj::C_HEAP, mtArguments) GrowableArray(INITIAL_WRITEABLES_SIZE, true); - - EMIT_WRITEABLE_START - - ALL_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG, - EMIT_WRITEABLE_PD_DEVELOPER_FLAG, - EMIT_WRITEABLE_PRODUCT_FLAG, - EMIT_WRITEABLE_PD_PRODUCT_FLAG, - EMIT_WRITEABLE_DIAGNOSTIC_FLAG, - EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG, - EMIT_WRITEABLE_EXPERIMENTAL_FLAG, - EMIT_WRITEABLE_NOTPRODUCT_FLAG, - EMIT_WRITEABLE_MANAGEABLE_FLAG, - EMIT_WRITEABLE_PRODUCT_RW_FLAG, - EMIT_WRITEABLE_LP64_PRODUCT_FLAG, - IGNORE_RANGE, - IGNORE_CONSTRAINT, - EMIT_WRITEABLE_CHECK) - - EMIT_WRITEABLE_END -} - -JVMFlagWriteable* JVMFlagWriteableList::find(const char* name) { - JVMFlagWriteable* found = NULL; - for (int i=0; iname(), name) == 0) { - found = writeable; - break; - } - } - return found; -} - -void JVMFlagWriteableList::mark_startup(void) { - for (int i=0; imark_startup(); - } -} --- old/src/hotspot/share/runtime/flags/jvmFlagWriteableList.hpp 2020-01-02 16:17:59.060760650 -0800 +++ /dev/null 2019-11-19 22:05:02.069813242 -0800 @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2015, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_RUNTIME_FLAGS_JVMFLAGWRITEABLELIST_HPP -#define SHARE_RUNTIME_FLAGS_JVMFLAGWRITEABLELIST_HPP - -#include "utilities/growableArray.hpp" - -class JVMFlagWriteable : public CHeapObj { -public: - enum WriteableType { - // can be set without any limits - Always = 0, - // can only be set once, either via command lines or during runtime - Once = 1, - // can only be set on command line (multiple times allowed) - CommandLineOnly = 2 - }; -private: - const char* _name; - WriteableType _type; - bool _writeable; - bool _startup_done; -public: - // the "name" argument must be a string literal - JVMFlagWriteable(const char* name, WriteableType type) { _name=name; _type=type; _writeable=true; _startup_done=false; } - ~JVMFlagWriteable() {} - const char* name() { return _name; } - const WriteableType type() { return _type; } - bool is_writeable(void); - void mark_once(void); - void mark_startup(void); -}; - -class JVMFlagWriteableList : public AllStatic { - static GrowableArray* _controls; -public: - static void init(); - static int length() { return (_controls != NULL) ? _controls->length() : 0; } - static JVMFlagWriteable* at(int i) { return (_controls != NULL) ? _controls->at(i) : NULL; } - static JVMFlagWriteable* find(const char* name); - static void add(JVMFlagWriteable* range) { _controls->append(range); } - static void mark_startup(void); -}; - -#endif // SHARE_RUNTIME_FLAGS_JVMFLAGWRITEABLELIST_HPP