src/hotspot/share/jvmci/jvmci_globals.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff src/hotspot/share/jvmci

src/hotspot/share/jvmci/jvmci_globals.cpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2017, 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  *


  63     return false;                                      \
  64   }
  65 
  66   JVMCI_FLAG_CHECKED(UseJVMCICompiler)
  67   JVMCI_FLAG_CHECKED(EnableJVMCI)
  68 
  69   CHECK_NOT_SET(BootstrapJVMCI,   UseJVMCICompiler)
  70   CHECK_NOT_SET(PrintBootstrap,   UseJVMCICompiler)
  71   CHECK_NOT_SET(JVMCIThreads,     UseJVMCICompiler)
  72   CHECK_NOT_SET(JVMCIHostThreads, UseJVMCICompiler)
  73 
  74   if (UseJVMCICompiler) {
  75     if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) {
  76       jio_fprintf(defaultStream::error_stream(),
  77           "Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
  78       return false;
  79     }
  80     FLAG_SET_DEFAULT(EnableJVMCI, true);
  81   }
  82 









  83   CHECK_NOT_SET(JVMCITraceLevel,              EnableJVMCI)
  84   CHECK_NOT_SET(JVMCICounterSize,             EnableJVMCI)
  85   CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
  86   CHECK_NOT_SET(JVMCIUseFastLocking,          EnableJVMCI)
  87   CHECK_NOT_SET(JVMCINMethodSizeLimit,        EnableJVMCI)
  88   CHECK_NOT_SET(MethodProfileWidth,           EnableJVMCI)
  89   CHECK_NOT_SET(JVMCIPrintProperties,         EnableJVMCI)
  90   CHECK_NOT_SET(TraceUncollectedSpeculations, EnableJVMCI)
  91 
  92 #ifndef PRODUCT
  93 #define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
  94 #define JVMCI_CHECK3(type, name, doc)        assert(name##checked, #name " flag not checked");
  95   // Ensures that all JVMCI flags are checked by this method.
  96   APPLY_JVMCI_FLAGS(JVMCI_CHECK3, JVMCI_CHECK4)
  97 #undef APPLY_JVMCI_FLAGS
  98 #undef JVMCI_DECLARE_CHECK3
  99 #undef JVMCI_DECLARE_CHECK4
 100 #undef JVMCI_CHECK3
 101 #undef JVMCI_CHECK4
 102 #undef JVMCI_FLAG_CHECKED
   1 /*
   2  * Copyright (c) 2000, 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  *


  63     return false;                                      \
  64   }
  65 
  66   JVMCI_FLAG_CHECKED(UseJVMCICompiler)
  67   JVMCI_FLAG_CHECKED(EnableJVMCI)
  68 
  69   CHECK_NOT_SET(BootstrapJVMCI,   UseJVMCICompiler)
  70   CHECK_NOT_SET(PrintBootstrap,   UseJVMCICompiler)
  71   CHECK_NOT_SET(JVMCIThreads,     UseJVMCICompiler)
  72   CHECK_NOT_SET(JVMCIHostThreads, UseJVMCICompiler)
  73 
  74   if (UseJVMCICompiler) {
  75     if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) {
  76       jio_fprintf(defaultStream::error_stream(),
  77           "Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
  78       return false;
  79     }
  80     FLAG_SET_DEFAULT(EnableJVMCI, true);
  81   }
  82 
  83   if (!EnableJVMCI) {
  84     // Switch off eager JVMCI initialization if JVMCI is disabled.
  85     // Don't throw error if EagerJVMCI is set to allow testing.
  86     if (EagerJVMCI) {
  87       FLAG_SET_DEFAULT(EagerJVMCI, false);
  88     }
  89   }
  90   JVMCI_FLAG_CHECKED(EagerJVMCI)
  91 
  92   CHECK_NOT_SET(JVMCITraceLevel,              EnableJVMCI)
  93   CHECK_NOT_SET(JVMCICounterSize,             EnableJVMCI)
  94   CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
  95   CHECK_NOT_SET(JVMCIUseFastLocking,          EnableJVMCI)
  96   CHECK_NOT_SET(JVMCINMethodSizeLimit,        EnableJVMCI)
  97   CHECK_NOT_SET(MethodProfileWidth,           EnableJVMCI)
  98   CHECK_NOT_SET(JVMCIPrintProperties,         EnableJVMCI)
  99   CHECK_NOT_SET(TraceUncollectedSpeculations, EnableJVMCI)
 100 
 101 #ifndef PRODUCT
 102 #define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
 103 #define JVMCI_CHECK3(type, name, doc)        assert(name##checked, #name " flag not checked");
 104   // Ensures that all JVMCI flags are checked by this method.
 105   APPLY_JVMCI_FLAGS(JVMCI_CHECK3, JVMCI_CHECK4)
 106 #undef APPLY_JVMCI_FLAGS
 107 #undef JVMCI_DECLARE_CHECK3
 108 #undef JVMCI_DECLARE_CHECK4
 109 #undef JVMCI_CHECK3
 110 #undef JVMCI_CHECK4
 111 #undef JVMCI_FLAG_CHECKED
src/hotspot/share/jvmci/jvmci_globals.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File