1 /*
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
2619 status = false;
2620 }
2621
2622 status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
2623 status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
2624
2625 if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2626 warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2627 }
2628
2629 #ifdef COMPILER1
2630 status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
2631 #endif
2632
2633 int min_number_of_compiler_threads = get_min_number_of_compiler_threads();
2634 // The default CICompilerCount's value is CI_COMPILER_COUNT.
2635 assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
2636 // Check the minimum number of compiler threads
2637 status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount");
2638
2639 return status;
2640 }
2641
2642 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2643 const char* option_type) {
2644 if (ignore) return false;
2645
2646 const char* spacer = " ";
2647 if (option_type == NULL) {
2648 option_type = ++spacer; // Set both to the empty string.
2649 }
2650
2651 if (os::obsolete_option(option)) {
2652 jio_fprintf(defaultStream::error_stream(),
2653 "Obsolete %s%soption: %s\n", option_type, spacer,
2654 option->optionString);
2655 return false;
2656 } else {
2657 jio_fprintf(defaultStream::error_stream(),
2658 "Unrecognized %s%soption: %s\n", option_type, spacer,
|
1 /*
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
2619 status = false;
2620 }
2621
2622 status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
2623 status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
2624
2625 if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2626 warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2627 }
2628
2629 #ifdef COMPILER1
2630 status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
2631 #endif
2632
2633 int min_number_of_compiler_threads = get_min_number_of_compiler_threads();
2634 // The default CICompilerCount's value is CI_COMPILER_COUNT.
2635 assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
2636 // Check the minimum number of compiler threads
2637 status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount");
2638
2639 if ((FlightRecorder || StartFlightRecording != NULL) && !EnableJFR) {
2640 jio_fprintf(defaultStream::error_stream(),
2641 "The VM option -XX:+FlightRecorder or -XX:StartFlightRecording=... must be combined with -XX:+EnableJFR.\n");
2642 status = false;
2643 }
2644
2645 return status;
2646 }
2647
2648 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2649 const char* option_type) {
2650 if (ignore) return false;
2651
2652 const char* spacer = " ";
2653 if (option_type == NULL) {
2654 option_type = ++spacer; // Set both to the empty string.
2655 }
2656
2657 if (os::obsolete_option(option)) {
2658 jio_fprintf(defaultStream::error_stream(),
2659 "Obsolete %s%soption: %s\n", option_type, spacer,
2660 option->optionString);
2661 return false;
2662 } else {
2663 jio_fprintf(defaultStream::error_stream(),
2664 "Unrecognized %s%soption: %s\n", option_type, spacer,
|