src/share/vm/runtime/vmStructs.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2001, 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 // This table encapsulates the debugging information required by the
  26 // serviceability agent in order to run. Specifically, we need to
  27 // understand the layout of certain C data structures (offsets, in
  28 // bytes, of their fields.)
  29 //
  30 // There are alternatives for the design of this mechanism, including
  31 // parsing platform-specific debugging symbols from a debug build into
  32 // a program database. While this current mechanism can be considered
  33 // to be a workaround for the inability to debug arbitrary C and C++
  34 // programs at the present time, it does have certain advantages.
  35 // First, it is platform-independent, which will vastly simplify the
  36 // initial bringup of the system both now and on future platforms.
  37 // Second, it is embedded within the VM, as opposed to being in a
  38 // separate program database; experience has shown that whenever
  39 // portions of a system are decoupled, version skew is problematic.
  40 // Third, generating a program database, for example for a product
  41 // build, would probably require two builds to be done: the desired
  42 // product build as well as an intermediary build with the PRODUCT
  43 // flag turned on but also compiled with -g, leading to a doubling of
  44 // the time required to get a serviceability agent-debuggable product


 102   // Table of integer constants required by the serviceability agent.
 103   // The last entry is identified over in the serviceability agent by
 104   // the fact that it has a NULL typeName
 105   static VMIntConstantEntry localHotSpotVMIntConstants[];
 106 
 107   // Table of long constants required by the serviceability agent.
 108   // The last entry is identified over in the serviceability agent by
 109   // the fact that it has a NULL typeName
 110   static VMLongConstantEntry localHotSpotVMLongConstants[];
 111 
 112   // This is used to run any checking code necessary for validation of
 113   // the data structure (debug build only)
 114   static void init();
 115 
 116 private:
 117   // Look up a type in localHotSpotVMTypes using strcmp() (debug build only).
 118   // Returns 1 if found, 0 if not.
 119   //  debug_only(static int findType(const char* typeName);)
 120   static int findType(const char* typeName);
 121 };


   1 /*
   2  * Copyright (c) 2000, 2010, 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 #ifndef SHARE_VM_RUNTIME_VMSTRUCTS_HPP
  26 #define SHARE_VM_RUNTIME_VMSTRUCTS_HPP
  27 
  28 #ifndef VM_STRUCTS_KERNEL
  29 #include "utilities/debug.hpp"
  30 #endif
  31 #ifdef COMPILER1
  32 #include "c1/c1_Runtime1.hpp"
  33 #endif
  34 
  35 // This table encapsulates the debugging information required by the
  36 // serviceability agent in order to run. Specifically, we need to
  37 // understand the layout of certain C data structures (offsets, in
  38 // bytes, of their fields.)
  39 //
  40 // There are alternatives for the design of this mechanism, including
  41 // parsing platform-specific debugging symbols from a debug build into
  42 // a program database. While this current mechanism can be considered
  43 // to be a workaround for the inability to debug arbitrary C and C++
  44 // programs at the present time, it does have certain advantages.
  45 // First, it is platform-independent, which will vastly simplify the
  46 // initial bringup of the system both now and on future platforms.
  47 // Second, it is embedded within the VM, as opposed to being in a
  48 // separate program database; experience has shown that whenever
  49 // portions of a system are decoupled, version skew is problematic.
  50 // Third, generating a program database, for example for a product
  51 // build, would probably require two builds to be done: the desired
  52 // product build as well as an intermediary build with the PRODUCT
  53 // flag turned on but also compiled with -g, leading to a doubling of
  54 // the time required to get a serviceability agent-debuggable product


 112   // Table of integer constants required by the serviceability agent.
 113   // The last entry is identified over in the serviceability agent by
 114   // the fact that it has a NULL typeName
 115   static VMIntConstantEntry localHotSpotVMIntConstants[];
 116 
 117   // Table of long constants required by the serviceability agent.
 118   // The last entry is identified over in the serviceability agent by
 119   // the fact that it has a NULL typeName
 120   static VMLongConstantEntry localHotSpotVMLongConstants[];
 121 
 122   // This is used to run any checking code necessary for validation of
 123   // the data structure (debug build only)
 124   static void init();
 125 
 126 private:
 127   // Look up a type in localHotSpotVMTypes using strcmp() (debug build only).
 128   // Returns 1 if found, 0 if not.
 129   //  debug_only(static int findType(const char* typeName);)
 130   static int findType(const char* typeName);
 131 };
 132 
 133 #endif // SHARE_VM_RUNTIME_VMSTRUCTS_HPP