< prev index next >

src/hotspot/share/runtime/vmStructs.cpp

Print this page




 145 
 146 // NOTE: there is an interdependency between this file and
 147 // HotSpotTypeDataBase.java, which parses the type strings.
 148 
 149 #ifndef REG_COUNT
 150   #define REG_COUNT 0
 151 #endif
 152 
 153 #if INCLUDE_JVMTI
 154   #define JVMTI_STRUCTS(static_field) \
 155     static_field(JvmtiExport,                     _can_access_local_variables,                  bool)                                  \
 156     static_field(JvmtiExport,                     _can_hotswap_or_post_breakpoint,              bool)                                  \
 157     static_field(JvmtiExport,                     _can_post_on_exceptions,                      bool)                                  \
 158     static_field(JvmtiExport,                     _can_walk_any_space,                          bool)
 159 #else
 160   #define JVMTI_STRUCTS(static_field)
 161 #endif // INCLUDE_JVMTI
 162 
 163 typedef HashtableEntry<intptr_t, mtInternal>  IntptrHashtableEntry;
 164 typedef Hashtable<intptr_t, mtInternal>       IntptrHashtable;
 165 typedef Hashtable<Symbol*, mtSymbol>          SymbolHashtable;
 166 typedef HashtableEntry<Symbol*, mtClass>      SymbolHashtableEntry;
 167 typedef Hashtable<InstanceKlass*, mtClass>       KlassHashtable;
 168 typedef HashtableEntry<InstanceKlass*, mtClass>  KlassHashtableEntry;
 169 typedef CompactHashtable<Symbol*, char>       SymbolCompactHashTable;
 170 typedef RehashableHashtable<Symbol*, mtSymbol>   RehashableSymbolHashtable;
 171 
 172 typedef PaddedEnd<ObjectMonitor>              PaddedObjectMonitor;
 173 
 174 //--------------------------------------------------------------------------------
 175 // VM_STRUCTS
 176 //
 177 // This list enumerates all of the fields the serviceability agent
 178 // needs to know about. Be sure to see also the type table below this one.
 179 // NOTE that there are platform-specific additions to this table in
 180 // vmStructs_<os>_<cpu>.hpp.
 181 
 182 #define VM_STRUCTS(nonstatic_field,                                                                                                  \
 183                    static_field,                                                                                                     \
 184                    static_ptr_volatile_field,                                                                                        \
 185                    unchecked_nonstatic_field,                                                                                        \
 186                    volatile_nonstatic_field,                                                                                         \
 187                    nonproduct_nonstatic_field,                                                                                       \
 188                    c1_nonstatic_field,                                                                                               \
 189                    c2_nonstatic_field,                                                                                               \
 190                    unchecked_c1_static_field,                                                                                        \


 450   nonstatic_field(PerfDataPrologue,            mod_time_stamp,                                jlong)                                 \
 451   nonstatic_field(PerfDataPrologue,            entry_offset,                                  jint)                                  \
 452   nonstatic_field(PerfDataPrologue,            num_entries,                                   jint)                                  \
 453                                                                                                                                      \
 454   nonstatic_field(PerfDataEntry,               entry_length,                                  jint)                                  \
 455   nonstatic_field(PerfDataEntry,               name_offset,                                   jint)                                  \
 456   nonstatic_field(PerfDataEntry,               vector_length,                                 jint)                                  \
 457   nonstatic_field(PerfDataEntry,               data_type,                                     jbyte)                                 \
 458   nonstatic_field(PerfDataEntry,               flags,                                         jbyte)                                 \
 459   nonstatic_field(PerfDataEntry,               data_units,                                    jbyte)                                 \
 460   nonstatic_field(PerfDataEntry,               data_variability,                              jbyte)                                 \
 461   nonstatic_field(PerfDataEntry,               data_offset,                                   jint)                                  \
 462                                                                                                                                      \
 463      static_field(PerfMemory,                  _start,                                        char*)                                 \
 464      static_field(PerfMemory,                  _end,                                          char*)                                 \
 465      static_field(PerfMemory,                  _top,                                          char*)                                 \
 466      static_field(PerfMemory,                  _capacity,                                     size_t)                                \
 467      static_field(PerfMemory,                  _prologue,                                     PerfDataPrologue*)                     \
 468      static_field(PerfMemory,                  _initialized,                                  int)                                   \
 469                                                                                                                                      \
 470   /***************/                                                                                                                  \
 471   /* SymbolTable */                                                                                                                  \
 472   /***************/                                                                                                                  \
 473                                                                                                                                      \
 474      static_field(SymbolTable,                 _the_table,                                    SymbolTable*)                          \
 475      static_field(SymbolTable,                 _shared_table,                                 SymbolCompactHashTable)                \
 476      static_field(RehashableSymbolHashtable,   _seed,                                         juint)                                 \
 477                                                                                                                                      \
 478   /********************/                                                                                                             \
 479   /* CompactHashTable */                                                                                                             \
 480   /********************/                                                                                                             \
 481                                                                                                                                      \
 482   nonstatic_field(SymbolCompactHashTable,      _base_address,                                 address)                               \
 483   nonstatic_field(SymbolCompactHashTable,      _entry_count,                                  u4)                                    \
 484   nonstatic_field(SymbolCompactHashTable,      _bucket_count,                                 u4)                                    \
 485   nonstatic_field(SymbolCompactHashTable,      _buckets,                                      u4*)                                   \
 486   nonstatic_field(SymbolCompactHashTable,      _entries,                                      u4*)                                   \
 487                                                                                                                                      \
 488   /********************/                                                                                                             \
 489   /* SystemDictionary */                                                                                                             \
 490   /********************/                                                                                                             \
 491                                                                                                                                      \
 492      static_field(SystemDictionary,            _shared_dictionary,                            Dictionary*)                           \
 493      static_field(SystemDictionary,            _system_loader_lock_obj,                       oop)                                   \
 494      static_field(SystemDictionary,            WK_KLASS(Object_klass),                        InstanceKlass*)                        \
 495      static_field(SystemDictionary,            WK_KLASS(String_klass),                        InstanceKlass*)                        \
 496      static_field(SystemDictionary,            WK_KLASS(Class_klass),                         InstanceKlass*)                        \
 497      static_field(SystemDictionary,            WK_KLASS(ClassLoader_klass),                   InstanceKlass*)                        \
 498      static_field(SystemDictionary,            WK_KLASS(System_klass),                        InstanceKlass*)                        \
 499      static_field(SystemDictionary,            WK_KLASS(Thread_klass),                        InstanceKlass*)                        \
 500      static_field(SystemDictionary,            WK_KLASS(ThreadGroup_klass),                   InstanceKlass*)                        \
 501      static_field(SystemDictionary,            WK_KLASS(MethodHandle_klass),                  InstanceKlass*)                        \
 502      static_field(SystemDictionary,            _java_system_loader,                           oop)                                   \
 503                                                                                                                                      \
 504   /*************/                                                                                                                    \
 505   /* vmSymbols */                                                                                                                    \
 506   /*************/                                                                                                                    \
 507                                                                                                                                      \


1334   /*************************************/                                 \
1335                                                                           \
1336   declare_toplevel_type(CheckedExceptionElement)                          \
1337   declare_toplevel_type(LocalVariableTableElement)                        \
1338   declare_toplevel_type(ExceptionTableElement)                            \
1339   declare_toplevel_type(MethodParametersElement)                          \
1340                                                                           \
1341   declare_toplevel_type(ClassLoaderData)                                  \
1342   declare_toplevel_type(ClassLoaderDataGraph)                             \
1343                                                                           \
1344   /************************/                                              \
1345   /* PerfMemory - jvmstat */                                              \
1346   /************************/                                              \
1347                                                                           \
1348   declare_toplevel_type(PerfDataPrologue)                                 \
1349   declare_toplevel_type(PerfDataPrologue*)                                \
1350   declare_toplevel_type(PerfDataEntry)                                    \
1351   declare_toplevel_type(PerfMemory)                                       \
1352   declare_type(PerfData, CHeapObj<mtInternal>)                            \
1353                                                                           \
1354   /*********************************/                                     \
1355   /* SymbolTable, SystemDictionary */                                     \
1356   /*********************************/                                     \
1357                                                                           \
1358   declare_toplevel_type(BasicHashtable<mtInternal>)                       \
1359     declare_type(IntptrHashtable, BasicHashtable<mtInternal>)             \
1360   declare_toplevel_type(BasicHashtable<mtSymbol>)                         \
1361     declare_type(RehashableSymbolHashtable, BasicHashtable<mtSymbol>)     \
1362   declare_type(SymbolTable, SymbolHashtable)                              \
1363     declare_type(Dictionary, KlassHashtable)                              \
1364   declare_toplevel_type(BasicHashtableEntry<mtInternal>)                  \
1365   declare_type(IntptrHashtableEntry, BasicHashtableEntry<mtInternal>)     \
1366     declare_type(DictionaryEntry, KlassHashtableEntry)                    \
1367   declare_toplevel_type(HashtableBucket<mtInternal>)                      \
1368   declare_toplevel_type(SystemDictionary)                                 \
1369   declare_toplevel_type(vmSymbols)                                        \
1370                                                                           \
1371   declare_toplevel_type(GenericGrowableArray)                             \
1372   declare_toplevel_type(GrowableArray<int>)                               \
1373   declare_toplevel_type(Arena)                                            \
1374     declare_type(ResourceArea, Arena)                                     \
1375                                                                           \
1376   declare_toplevel_type(SymbolCompactHashTable)                           \
1377                                                                           \
1378   /***********************************************************/           \
1379   /* Thread hierarchy (needed for run-time type information) */           \
1380   /***********************************************************/           \
1381                                                                           \
1382   declare_toplevel_type(Threads)                                          \
1383   declare_toplevel_type(ThreadShadow)                                     \
1384            declare_type(Thread, ThreadShadow)                             \
1385            declare_type(NamedThread, Thread)                              \
1386            declare_type(WatcherThread, Thread)                            \
1387            declare_type(JavaThread, Thread)                               \
1388            declare_type(JvmtiAgentThread, JavaThread)                     \
1389            declare_type(ServiceThread, JavaThread)                        \
1390   declare_type(CompilerThread, JavaThread)                                \
1391   declare_type(CodeCacheSweeperThread, JavaThread)                        \
1392   declare_toplevel_type(OSThread)                                         \
1393   declare_toplevel_type(JavaFrameAnchor)                                  \
1394                                                                           \
1395   /***************/                                                       \
1396   /* Interpreter */                                                       \
1397   /***************/                                                       \




 145 
 146 // NOTE: there is an interdependency between this file and
 147 // HotSpotTypeDataBase.java, which parses the type strings.
 148 
 149 #ifndef REG_COUNT
 150   #define REG_COUNT 0
 151 #endif
 152 
 153 #if INCLUDE_JVMTI
 154   #define JVMTI_STRUCTS(static_field) \
 155     static_field(JvmtiExport,                     _can_access_local_variables,                  bool)                                  \
 156     static_field(JvmtiExport,                     _can_hotswap_or_post_breakpoint,              bool)                                  \
 157     static_field(JvmtiExport,                     _can_post_on_exceptions,                      bool)                                  \
 158     static_field(JvmtiExport,                     _can_walk_any_space,                          bool)
 159 #else
 160   #define JVMTI_STRUCTS(static_field)
 161 #endif // INCLUDE_JVMTI
 162 
 163 typedef HashtableEntry<intptr_t, mtInternal>  IntptrHashtableEntry;
 164 typedef Hashtable<intptr_t, mtInternal>       IntptrHashtable;


 165 typedef Hashtable<InstanceKlass*, mtClass>       KlassHashtable;
 166 typedef HashtableEntry<InstanceKlass*, mtClass>  KlassHashtableEntry;


 167 
 168 typedef PaddedEnd<ObjectMonitor>              PaddedObjectMonitor;
 169 
 170 //--------------------------------------------------------------------------------
 171 // VM_STRUCTS
 172 //
 173 // This list enumerates all of the fields the serviceability agent
 174 // needs to know about. Be sure to see also the type table below this one.
 175 // NOTE that there are platform-specific additions to this table in
 176 // vmStructs_<os>_<cpu>.hpp.
 177 
 178 #define VM_STRUCTS(nonstatic_field,                                                                                                  \
 179                    static_field,                                                                                                     \
 180                    static_ptr_volatile_field,                                                                                        \
 181                    unchecked_nonstatic_field,                                                                                        \
 182                    volatile_nonstatic_field,                                                                                         \
 183                    nonproduct_nonstatic_field,                                                                                       \
 184                    c1_nonstatic_field,                                                                                               \
 185                    c2_nonstatic_field,                                                                                               \
 186                    unchecked_c1_static_field,                                                                                        \


 446   nonstatic_field(PerfDataPrologue,            mod_time_stamp,                                jlong)                                 \
 447   nonstatic_field(PerfDataPrologue,            entry_offset,                                  jint)                                  \
 448   nonstatic_field(PerfDataPrologue,            num_entries,                                   jint)                                  \
 449                                                                                                                                      \
 450   nonstatic_field(PerfDataEntry,               entry_length,                                  jint)                                  \
 451   nonstatic_field(PerfDataEntry,               name_offset,                                   jint)                                  \
 452   nonstatic_field(PerfDataEntry,               vector_length,                                 jint)                                  \
 453   nonstatic_field(PerfDataEntry,               data_type,                                     jbyte)                                 \
 454   nonstatic_field(PerfDataEntry,               flags,                                         jbyte)                                 \
 455   nonstatic_field(PerfDataEntry,               data_units,                                    jbyte)                                 \
 456   nonstatic_field(PerfDataEntry,               data_variability,                              jbyte)                                 \
 457   nonstatic_field(PerfDataEntry,               data_offset,                                   jint)                                  \
 458                                                                                                                                      \
 459      static_field(PerfMemory,                  _start,                                        char*)                                 \
 460      static_field(PerfMemory,                  _end,                                          char*)                                 \
 461      static_field(PerfMemory,                  _top,                                          char*)                                 \
 462      static_field(PerfMemory,                  _capacity,                                     size_t)                                \
 463      static_field(PerfMemory,                  _prologue,                                     PerfDataPrologue*)                     \
 464      static_field(PerfMemory,                  _initialized,                                  int)                                   \
 465                                                                                                                                      \


















 466   /********************/                                                                                                             \
 467   /* SystemDictionary */                                                                                                             \
 468   /********************/                                                                                                             \
 469                                                                                                                                      \
 470      static_field(SystemDictionary,            _shared_dictionary,                            Dictionary*)                           \
 471      static_field(SystemDictionary,            _system_loader_lock_obj,                       oop)                                   \
 472      static_field(SystemDictionary,            WK_KLASS(Object_klass),                        InstanceKlass*)                        \
 473      static_field(SystemDictionary,            WK_KLASS(String_klass),                        InstanceKlass*)                        \
 474      static_field(SystemDictionary,            WK_KLASS(Class_klass),                         InstanceKlass*)                        \
 475      static_field(SystemDictionary,            WK_KLASS(ClassLoader_klass),                   InstanceKlass*)                        \
 476      static_field(SystemDictionary,            WK_KLASS(System_klass),                        InstanceKlass*)                        \
 477      static_field(SystemDictionary,            WK_KLASS(Thread_klass),                        InstanceKlass*)                        \
 478      static_field(SystemDictionary,            WK_KLASS(ThreadGroup_klass),                   InstanceKlass*)                        \
 479      static_field(SystemDictionary,            WK_KLASS(MethodHandle_klass),                  InstanceKlass*)                        \
 480      static_field(SystemDictionary,            _java_system_loader,                           oop)                                   \
 481                                                                                                                                      \
 482   /*************/                                                                                                                    \
 483   /* vmSymbols */                                                                                                                    \
 484   /*************/                                                                                                                    \
 485                                                                                                                                      \


1312   /*************************************/                                 \
1313                                                                           \
1314   declare_toplevel_type(CheckedExceptionElement)                          \
1315   declare_toplevel_type(LocalVariableTableElement)                        \
1316   declare_toplevel_type(ExceptionTableElement)                            \
1317   declare_toplevel_type(MethodParametersElement)                          \
1318                                                                           \
1319   declare_toplevel_type(ClassLoaderData)                                  \
1320   declare_toplevel_type(ClassLoaderDataGraph)                             \
1321                                                                           \
1322   /************************/                                              \
1323   /* PerfMemory - jvmstat */                                              \
1324   /************************/                                              \
1325                                                                           \
1326   declare_toplevel_type(PerfDataPrologue)                                 \
1327   declare_toplevel_type(PerfDataPrologue*)                                \
1328   declare_toplevel_type(PerfDataEntry)                                    \
1329   declare_toplevel_type(PerfMemory)                                       \
1330   declare_type(PerfData, CHeapObj<mtInternal>)                            \
1331                                                                           \
1332   /********************/                                                  \
1333   /* SystemDictionary */                                                  \
1334   /********************/                                                  \
1335                                                                           \
1336   declare_toplevel_type(BasicHashtable<mtInternal>)                       \
1337     declare_type(IntptrHashtable, BasicHashtable<mtInternal>)             \
1338   declare_toplevel_type(BasicHashtable<mtSymbol>)                         \


1339     declare_type(Dictionary, KlassHashtable)                              \
1340   declare_toplevel_type(BasicHashtableEntry<mtInternal>)                  \
1341   declare_type(IntptrHashtableEntry, BasicHashtableEntry<mtInternal>)     \
1342     declare_type(DictionaryEntry, KlassHashtableEntry)                    \
1343   declare_toplevel_type(HashtableBucket<mtInternal>)                      \
1344   declare_toplevel_type(SystemDictionary)                                 \
1345   declare_toplevel_type(vmSymbols)                                        \
1346                                                                           \
1347   declare_toplevel_type(GenericGrowableArray)                             \
1348   declare_toplevel_type(GrowableArray<int>)                               \
1349   declare_toplevel_type(Arena)                                            \
1350     declare_type(ResourceArea, Arena)                                     \
1351                                                                           \


1352   /***********************************************************/           \
1353   /* Thread hierarchy (needed for run-time type information) */           \
1354   /***********************************************************/           \
1355                                                                           \
1356   declare_toplevel_type(Threads)                                          \
1357   declare_toplevel_type(ThreadShadow)                                     \
1358            declare_type(Thread, ThreadShadow)                             \
1359            declare_type(NamedThread, Thread)                              \
1360            declare_type(WatcherThread, Thread)                            \
1361            declare_type(JavaThread, Thread)                               \
1362            declare_type(JvmtiAgentThread, JavaThread)                     \
1363            declare_type(ServiceThread, JavaThread)                        \
1364   declare_type(CompilerThread, JavaThread)                                \
1365   declare_type(CodeCacheSweeperThread, JavaThread)                        \
1366   declare_toplevel_type(OSThread)                                         \
1367   declare_toplevel_type(JavaFrameAnchor)                                  \
1368                                                                           \
1369   /***************/                                                       \
1370   /* Interpreter */                                                       \
1371   /***************/                                                       \


< prev index next >