< prev index next >

src/share/vm/utilities/globalDefinitions.cpp

Print this page


   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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/os.hpp"
  27 #include "utilities/globalDefinitions.hpp"
  28 
  29 // Basic error support
  30 
  31 // Info for oops within a java object.  Defaults are zero so
  32 // things will break badly if incorrectly initialized.
  33 int heapOopSize        = 0;
  34 int LogBytesPerHeapOop = 0;
  35 int LogBitsPerHeapOop  = 0;
  36 int BytesPerHeapOop    = 0;
  37 int BitsPerHeapOop     = 0;
  38 
  39 // Object alignment, in units of HeapWords.
  40 // Defaults are -1 so things will break badly if incorrectly initialized.
  41 int MinObjAlignment            = -1;

  42 int MinObjAlignmentInBytes     = -1;
  43 int MinObjAlignmentInBytesMask = 0;
  44 
  45 int LogMinObjAlignment         = -1;
  46 int LogMinObjAlignmentInBytes  = -1;
  47 
  48 // Oop encoding heap max
  49 uint64_t OopEncodingHeapMax = 0;
  50 
  51 void basic_fatal(const char* msg) {
  52   fatal("%s", msg);
  53 }
  54 
  55 // Something to help porters sleep at night
  56 
  57 void basic_types_init() {
  58 #ifdef ASSERT
  59 #ifdef _LP64
  60   assert(min_intx ==  (intx)CONST64(0x8000000000000000), "correct constant");
  61   assert(max_intx ==  CONST64(0x7FFFFFFFFFFFFFFF), "correct constant");


   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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/os.hpp"
  27 #include "utilities/globalDefinitions.hpp"
  28 
  29 // Basic error support
  30 
  31 // Info for oops within a java object.  Defaults are zero so
  32 // things will break badly if incorrectly initialized.
  33 int heapOopSize        = 0;
  34 int LogBytesPerHeapOop = 0;
  35 int LogBitsPerHeapOop  = 0;
  36 int BytesPerHeapOop    = 0;
  37 int BitsPerHeapOop     = 0;
  38 
  39 // Object alignment, in units of HeapWords.
  40 // Defaults are -1 so things will break badly if incorrectly initialized.
  41 int MinObjAlignment            = -1;
  42 int MinObjAlignmentMask        = 0;
  43 int MinObjAlignmentInBytes     = -1;
  44 int MinObjAlignmentInBytesMask = 0;
  45 
  46 int LogMinObjAlignment         = -1;
  47 int LogMinObjAlignmentInBytes  = -1;
  48 
  49 // Oop encoding heap max
  50 uint64_t OopEncodingHeapMax = 0;
  51 
  52 void basic_fatal(const char* msg) {
  53   fatal("%s", msg);
  54 }
  55 
  56 // Something to help porters sleep at night
  57 
  58 void basic_types_init() {
  59 #ifdef ASSERT
  60 #ifdef _LP64
  61   assert(min_intx ==  (intx)CONST64(0x8000000000000000), "correct constant");
  62   assert(max_intx ==  CONST64(0x7FFFFFFFFFFFFFFF), "correct constant");


< prev index next >