src/share/vm/runtime/vmStructs.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/vmStructs.hpp

Print this page




  78 typedef struct {
  79   const char* typeName;            // Type name (example: "Method")
  80   const char* superclassName;      // Superclass name, or null if none (example: "oopDesc")
  81   int32_t isOopType;               // Does this type represent an oop typedef? (i.e., "Method*" or
  82                                    // "Klass*", but NOT "Method")
  83   int32_t isIntegerType;           // Does this type represent an integer type (of arbitrary size)?
  84   int32_t isUnsigned;              // If so, is it unsigned?
  85   uint64_t size;                   // Size, in bytes, of the type
  86 } VMTypeEntry;
  87 
  88 typedef struct {
  89   const char* name;                // Name of constant (example: "_thread_in_native")
  90   int32_t value;                   // Value of constant
  91 } VMIntConstantEntry;
  92 
  93 typedef struct {
  94   const char* name;                // Name of constant (example: "_thread_in_native")
  95   uint64_t value;                  // Value of constant
  96 } VMLongConstantEntry;
  97 





  98 // This class is a friend of most classes, to be able to access
  99 // private fields
 100 class VMStructs {
 101 public:
 102   // The last entry is identified over in the serviceability agent by
 103   // the fact that it has a NULL fieldName
 104   static VMStructEntry localHotSpotVMStructs[];
 105 
 106   // The last entry is identified over in the serviceability agent by
 107   // the fact that it has a NULL typeName
 108   static VMTypeEntry   localHotSpotVMTypes[];
 109 
 110   // Table of integer constants required by the serviceability agent.
 111   // The last entry is identified over in the serviceability agent by
 112   // the fact that it has a NULL typeName
 113   static VMIntConstantEntry localHotSpotVMIntConstants[];
 114 
 115   // Table of long constants required by the serviceability agent.
 116   // The last entry is identified over in the serviceability agent by
 117   // the fact that it has a NULL typeName
 118   static VMLongConstantEntry localHotSpotVMLongConstants[];
 119 





 120   // This is used to run any checking code necessary for validation of
 121   // the data structure (debug build only)
 122   static void init();
 123 
 124 #ifndef PRODUCT
 125   // Execute unit tests
 126   static void test();
 127 #endif
 128 
 129 private:
 130   // Look up a type in localHotSpotVMTypes using strcmp() (debug build only).
 131   // Returns 1 if found, 0 if not.
 132   //  debug_only(static int findType(const char* typeName);)
 133   static int findType(const char* typeName);
 134 };
 135 
 136 #endif // SHARE_VM_RUNTIME_VMSTRUCTS_HPP


  78 typedef struct {
  79   const char* typeName;            // Type name (example: "Method")
  80   const char* superclassName;      // Superclass name, or null if none (example: "oopDesc")
  81   int32_t isOopType;               // Does this type represent an oop typedef? (i.e., "Method*" or
  82                                    // "Klass*", but NOT "Method")
  83   int32_t isIntegerType;           // Does this type represent an integer type (of arbitrary size)?
  84   int32_t isUnsigned;              // If so, is it unsigned?
  85   uint64_t size;                   // Size, in bytes, of the type
  86 } VMTypeEntry;
  87 
  88 typedef struct {
  89   const char* name;                // Name of constant (example: "_thread_in_native")
  90   int32_t value;                   // Value of constant
  91 } VMIntConstantEntry;
  92 
  93 typedef struct {
  94   const char* name;                // Name of constant (example: "_thread_in_native")
  95   uint64_t value;                  // Value of constant
  96 } VMLongConstantEntry;
  97 
  98 typedef struct {
  99   const char* name;                // Name of address (example: "SharedRuntime::register_finalizer")
 100   void* value;                     // Value of address
 101 } VMAddressEntry;
 102 
 103 // This class is a friend of most classes, to be able to access
 104 // private fields
 105 class VMStructs {
 106 public:
 107   // The last entry is identified over in the serviceability agent by
 108   // the fact that it has a NULL fieldName
 109   static VMStructEntry localHotSpotVMStructs[];
 110 
 111   // The last entry is identified over in the serviceability agent by
 112   // the fact that it has a NULL typeName
 113   static VMTypeEntry   localHotSpotVMTypes[];
 114 
 115   // Table of integer constants required by the serviceability agent.
 116   // The last entry is identified over in the serviceability agent by
 117   // the fact that it has a NULL typeName
 118   static VMIntConstantEntry localHotSpotVMIntConstants[];
 119 
 120   // Table of long constants required by the serviceability agent.
 121   // The last entry is identified over in the serviceability agent by
 122   // the fact that it has a NULL typeName
 123   static VMLongConstantEntry localHotSpotVMLongConstants[];
 124 
 125   /**
 126    * Table of addresses.
 127    */
 128   static VMAddressEntry localHotSpotVMAddresses[];
 129 
 130   // This is used to run any checking code necessary for validation of
 131   // the data structure (debug build only)
 132   static void init();
 133 
 134 #ifndef PRODUCT
 135   // Execute unit tests
 136   static void test();
 137 #endif
 138 
 139 private:
 140   // Look up a type in localHotSpotVMTypes using strcmp() (debug build only).
 141   // Returns 1 if found, 0 if not.
 142   //  debug_only(static int findType(const char* typeName);)
 143   static int findType(const char* typeName);
 144 };
 145 
 146 #endif // SHARE_VM_RUNTIME_VMSTRUCTS_HPP
src/share/vm/runtime/vmStructs.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File