src/share/vm/utilities/debug.cpp

Print this page




   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 "incls/_precompiled.incl"
  26 # include "incls/_debug.cpp.incl"






































  27 
  28 #ifndef ASSERT
  29 #  ifdef _DEBUG
  30    // NOTE: don't turn the lines below into a comment -- if you're getting
  31    // a compile error here, change the settings to define ASSERT
  32    ASSERT should be defined when _DEBUG is defined.  It is not intended to be used for debugging
  33    functions that do not slow down the system too much and thus can be left in optimized code.
  34    On the other hand, the code should not be included in a production version.
  35 #  endif // _DEBUG
  36 #endif // ASSERT
  37 
  38 
  39 #ifdef _DEBUG
  40 #  ifndef ASSERT
  41      configuration error: ASSERT must be defined in debug version
  42 #  endif // ASSERT
  43 #endif // _DEBUG
  44 
  45 
  46 #ifdef PRODUCT




   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 "classfile/systemDictionary.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "code/icBuffer.hpp"
  29 #include "code/nmethod.hpp"
  30 #include "code/vtableStubs.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "compiler/disassembler.hpp"
  33 #include "gc_implementation/shared/markSweep.hpp"
  34 #include "gc_interface/collectedHeap.hpp"
  35 #include "interpreter/bytecodeHistogram.hpp"
  36 #include "interpreter/interpreter.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "memory/universe.hpp"
  39 #include "oops/oop.inline.hpp"
  40 #include "prims/privilegedStack.hpp"
  41 #include "runtime/arguments.hpp"
  42 #include "runtime/frame.hpp"
  43 #include "runtime/java.hpp"
  44 #include "runtime/sharedRuntime.hpp"
  45 #include "runtime/stubCodeGenerator.hpp"
  46 #include "runtime/stubRoutines.hpp"
  47 #include "runtime/vframe.hpp"
  48 #include "services/heapDumper.hpp"
  49 #include "utilities/defaultStream.hpp"
  50 #include "utilities/events.hpp"
  51 #include "utilities/top.hpp"
  52 #include "utilities/vmError.hpp"
  53 #ifdef TARGET_OS_FAMILY_linux
  54 # include "os_linux.inline.hpp"
  55 # include "thread_linux.inline.hpp"
  56 #endif
  57 #ifdef TARGET_OS_FAMILY_solaris
  58 # include "os_solaris.inline.hpp"
  59 # include "thread_solaris.inline.hpp"
  60 #endif
  61 #ifdef TARGET_OS_FAMILY_windows
  62 # include "os_windows.inline.hpp"
  63 # include "thread_windows.inline.hpp"
  64 #endif
  65 
  66 #ifndef ASSERT
  67 #  ifdef _DEBUG
  68    // NOTE: don't turn the lines below into a comment -- if you're getting
  69    // a compile error here, change the settings to define ASSERT
  70    ASSERT should be defined when _DEBUG is defined.  It is not intended to be used for debugging
  71    functions that do not slow down the system too much and thus can be left in optimized code.
  72    On the other hand, the code should not be included in a production version.
  73 #  endif // _DEBUG
  74 #endif // ASSERT
  75 
  76 
  77 #ifdef _DEBUG
  78 #  ifndef ASSERT
  79      configuration error: ASSERT must be defined in debug version
  80 #  endif // ASSERT
  81 #endif // _DEBUG
  82 
  83 
  84 #ifdef PRODUCT