src/share/vm/utilities/macros.hpp

Print this page
rev 13113 : 8182651: Add TRACE_ONLY conditional macro to support more fine-grained INCLUDE_TRACE programming
Reviewed-by:
   1 /*
   2  * Copyright (c) 1997, 2016, 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  *


 159 #define NOT_ALL_GCS_RETURN        {}
 160 #define NOT_ALL_GCS_RETURN_(code) { return code; }
 161 #endif // INCLUDE_ALL_GCS
 162 
 163 #ifndef INCLUDE_NMT
 164 #define INCLUDE_NMT 1
 165 #endif // INCLUDE_NMT
 166 
 167 #if INCLUDE_NMT
 168 #define NOT_NMT_RETURN        /* next token must be ; */
 169 #define NOT_NMT_RETURN_(code) /* next token must be ; */
 170 #else
 171 #define NOT_NMT_RETURN        {}
 172 #define NOT_NMT_RETURN_(code) { return code; }
 173 #endif // INCLUDE_NMT
 174 
 175 #ifndef INCLUDE_TRACE
 176 #define INCLUDE_TRACE 1
 177 #endif // INCLUDE_TRACE
 178 






 179 #ifndef INCLUDE_JVMCI
 180 #define INCLUDE_JVMCI 1
 181 #endif
 182 
 183 #ifdef INCLUDE_AOT
 184 # if INCLUDE_AOT && !(INCLUDE_JVMCI)
 185 #   error "Must have JVMCI for AOT"
 186 # endif
 187 #else
 188 # define INCLUDE_AOT 0
 189 #endif
 190 
 191 #if INCLUDE_JVMCI
 192 #define JVMCI_ONLY(code) code
 193 #define NOT_JVMCI(code)
 194 #define NOT_JVMCI_RETURN /* next token must be ; */
 195 #else
 196 #define JVMCI_ONLY(code)
 197 #define NOT_JVMCI(code) code
 198 #define NOT_JVMCI_RETURN {}


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


 159 #define NOT_ALL_GCS_RETURN        {}
 160 #define NOT_ALL_GCS_RETURN_(code) { return code; }
 161 #endif // INCLUDE_ALL_GCS
 162 
 163 #ifndef INCLUDE_NMT
 164 #define INCLUDE_NMT 1
 165 #endif // INCLUDE_NMT
 166 
 167 #if INCLUDE_NMT
 168 #define NOT_NMT_RETURN        /* next token must be ; */
 169 #define NOT_NMT_RETURN_(code) /* next token must be ; */
 170 #else
 171 #define NOT_NMT_RETURN        {}
 172 #define NOT_NMT_RETURN_(code) { return code; }
 173 #endif // INCLUDE_NMT
 174 
 175 #ifndef INCLUDE_TRACE
 176 #define INCLUDE_TRACE 1
 177 #endif // INCLUDE_TRACE
 178 
 179 #if INCLUDE_TRACE
 180 #define TRACE_ONLY(code) code
 181 #else
 182 #define TRACE_ONLY(code)
 183 #endif // INCLUDE_TRACE
 184 
 185 #ifndef INCLUDE_JVMCI
 186 #define INCLUDE_JVMCI 1
 187 #endif
 188 
 189 #ifdef INCLUDE_AOT
 190 # if INCLUDE_AOT && !(INCLUDE_JVMCI)
 191 #   error "Must have JVMCI for AOT"
 192 # endif
 193 #else
 194 # define INCLUDE_AOT 0
 195 #endif
 196 
 197 #if INCLUDE_JVMCI
 198 #define JVMCI_ONLY(code) code
 199 #define NOT_JVMCI(code)
 200 #define NOT_JVMCI_RETURN /* next token must be ; */
 201 #else
 202 #define JVMCI_ONLY(code)
 203 #define NOT_JVMCI(code) code
 204 #define NOT_JVMCI_RETURN {}