src/share/vm/jvmci/vmStructs_jvmci.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/jvmci

src/share/vm/jvmci/vmStructs_jvmci.cpp

Print this page




  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 "code/codeBlob.hpp"
  27 #include "compiler/abstractCompiler.hpp"
  28 #include "compiler/compileBroker.hpp"
  29 #include "jvmci/jvmciCodeInstaller.hpp"
  30 #include "jvmci/jvmciCompilerToVM.hpp"
  31 #include "jvmci/jvmciEnv.hpp"
  32 #include "jvmci/jvmciRuntime.hpp"

  33 #include "jvmci/vmStructs_jvmci.hpp"
  34 #include "oops/oop.hpp"
  35 #include "oops/objArrayKlass.hpp"
  36 #include "runtime/globals.hpp"
  37 #include "runtime/sharedRuntime.hpp"
  38 #include "runtime/thread.hpp"
  39 #include "runtime/vm_version.hpp"
  40 
  41 #if INCLUDE_ALL_GCS
  42 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
  43 #include "gc/g1/heapRegion.hpp"
  44 #endif
  45 
  46 
  47 #define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \
  48   static_field(CompilerToVM::Data,             Klass_vtable_start_offset,              int)                                          \
  49   static_field(CompilerToVM::Data,             Klass_vtable_length_offset,             int)                                          \
  50                                                                                                                                      \
  51   static_field(CompilerToVM::Data,             Method_extra_stack_entries,             int)                                          \
  52                                                                                                                                      \
  53   static_field(CompilerToVM::Data,             SharedRuntime_ic_miss_stub,             address)                                      \
  54   static_field(CompilerToVM::Data,             SharedRuntime_handle_wrong_method_stub, address)                                      \
  55   static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_unpack,        address)                                      \
  56   static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_uncommon_trap, address)                                      \
  57                                                                                                                                      \
  58   static_field(CompilerToVM::Data,             ThreadLocalAllocBuffer_alignment_reserve, size_t)                                     \
  59                                                                                                                                      \
  60   static_field(CompilerToVM::Data,             Universe_collectedHeap,                 CollectedHeap*)                               \
  61   static_field(CompilerToVM::Data,             Universe_base_vtable_size,              int)                                          \
  62   static_field(CompilerToVM::Data,             Universe_narrow_oop_base,               address)                                      \
  63   static_field(CompilerToVM::Data,             Universe_narrow_oop_shift,              int)                                          \
  64   static_field(CompilerToVM::Data,             Universe_narrow_klass_base,             address)                                      \
  65   static_field(CompilerToVM::Data,             Universe_narrow_klass_shift,            int)                                          \
  66   static_field(CompilerToVM::Data,             Universe_non_oop_bits,                  void*)                                        \


 396   declare_constant(CodeInstaller::VERIFIED_ENTRY)                         \
 397   declare_constant(CodeInstaller::UNVERIFIED_ENTRY)                       \
 398   declare_constant(CodeInstaller::OSR_ENTRY)                              \
 399   declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY)                \
 400   declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY)                    \
 401   declare_constant(CodeInstaller::INVOKEINTERFACE)                        \
 402   declare_constant(CodeInstaller::INVOKEVIRTUAL)                          \
 403   declare_constant(CodeInstaller::INVOKESTATIC)                           \
 404   declare_constant(CodeInstaller::INVOKESPECIAL)                          \
 405   declare_constant(CodeInstaller::INLINE_INVOKE)                          \
 406   declare_constant(CodeInstaller::POLL_NEAR)                              \
 407   declare_constant(CodeInstaller::POLL_RETURN_NEAR)                       \
 408   declare_constant(CodeInstaller::POLL_FAR)                               \
 409   declare_constant(CodeInstaller::POLL_RETURN_FAR)                        \
 410   declare_constant(CodeInstaller::CARD_TABLE_SHIFT)                       \
 411   declare_constant(CodeInstaller::CARD_TABLE_ADDRESS)                     \
 412   declare_constant(CodeInstaller::HEAP_TOP_ADDRESS)                       \
 413   declare_constant(CodeInstaller::HEAP_END_ADDRESS)                       \
 414   declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS)              \
 415   declare_constant(CodeInstaller::CRC_TABLE_ADDRESS)                      \

 416   declare_constant(CodeInstaller::INVOKE_INVALID)                         \
 417                                                                           \
 418   declare_constant(ConstantPool::CPCACHE_INDEX_TAG)                       \
 419                                                                           \
 420   declare_constant(ConstMethod::_has_linenumber_table)                    \
 421   declare_constant(ConstMethod::_has_localvariable_table)                 \
 422   declare_constant(ConstMethod::_has_exception_table)                     \
 423                                                                           \
 424   declare_constant(CounterData::count_off)                                \
 425                                                                           \
 426   declare_constant(DataLayout::cell_size)                                 \
 427   declare_constant(DataLayout::no_tag)                                    \
 428   declare_constant(DataLayout::bit_data_tag)                              \
 429   declare_constant(DataLayout::counter_data_tag)                          \
 430   declare_constant(DataLayout::jump_data_tag)                             \
 431   declare_constant(DataLayout::receiver_type_data_tag)                    \
 432   declare_constant(DataLayout::virtual_call_data_tag)                     \
 433   declare_constant(DataLayout::ret_data_tag)                              \
 434   declare_constant(DataLayout::branch_data_tag)                           \
 435   declare_constant(DataLayout::multi_branch_data_tag)                     \


 862 
 863   VM_LONG_CONSTANTS_OS(GENERATE_VM_LONG_CONSTANT_ENTRY,
 864                        GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
 865                        GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
 866                        GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
 867                        GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
 868 
 869   VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
 870                         GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
 871                         GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
 872                         GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
 873                         GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
 874 
 875   GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
 876 };
 877 
 878 VMAddressEntry JVMCIVMStructs::localHotSpotVMAddresses[] = {
 879   VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,
 880                GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
 881                GENERATE_VM_FUNCTION_ENTRY)
 882 


 883   VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,
 884                   GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
 885                   GENERATE_VM_FUNCTION_ENTRY)
 886 
 887   GENERATE_VM_ADDRESS_LAST_ENTRY()
 888 };
 889 
 890 int JVMCIVMStructs::localHotSpotVMStructs_count() {
 891   // Ignore sentinel entry at the end
 892   return (sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1;
 893 }
 894 int JVMCIVMStructs::localHotSpotVMTypes_count() {
 895   // Ignore sentinel entry at the end
 896   return (sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry)) - 1;
 897 }
 898 int JVMCIVMStructs::localHotSpotVMIntConstants_count() {
 899   // Ignore sentinel entry at the end
 900   return (sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry)) - 1;
 901 }
 902 int JVMCIVMStructs::localHotSpotVMLongConstants_count() {


  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 "code/codeBlob.hpp"
  27 #include "compiler/abstractCompiler.hpp"
  28 #include "compiler/compileBroker.hpp"
  29 #include "jvmci/jvmciCodeInstaller.hpp"
  30 #include "jvmci/jvmciCompilerToVM.hpp"
  31 #include "jvmci/jvmciEnv.hpp"
  32 #include "jvmci/jvmciRuntime.hpp"
  33 #include "jvmci/vmStructs_compiler_runtime.hpp"
  34 #include "jvmci/vmStructs_jvmci.hpp"
  35 #include "oops/oop.hpp"
  36 #include "oops/objArrayKlass.hpp"
  37 #include "runtime/globals.hpp"
  38 #include "runtime/sharedRuntime.hpp"
  39 #include "runtime/thread.hpp"
  40 #include "runtime/vm_version.hpp"
  41 
  42 #if INCLUDE_ALL_GCS
  43 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
  44 #include "gc/g1/heapRegion.hpp"
  45 #endif
  46 

  47 #define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \
  48   static_field(CompilerToVM::Data,             Klass_vtable_start_offset,              int)                                          \
  49   static_field(CompilerToVM::Data,             Klass_vtable_length_offset,             int)                                          \
  50                                                                                                                                      \
  51   static_field(CompilerToVM::Data,             Method_extra_stack_entries,             int)                                          \
  52                                                                                                                                      \
  53   static_field(CompilerToVM::Data,             SharedRuntime_ic_miss_stub,             address)                                      \
  54   static_field(CompilerToVM::Data,             SharedRuntime_handle_wrong_method_stub, address)                                      \
  55   static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_unpack,        address)                                      \
  56   static_field(CompilerToVM::Data,             SharedRuntime_deopt_blob_uncommon_trap, address)                                      \
  57                                                                                                                                      \
  58   static_field(CompilerToVM::Data,             ThreadLocalAllocBuffer_alignment_reserve, size_t)                                     \
  59                                                                                                                                      \
  60   static_field(CompilerToVM::Data,             Universe_collectedHeap,                 CollectedHeap*)                               \
  61   static_field(CompilerToVM::Data,             Universe_base_vtable_size,              int)                                          \
  62   static_field(CompilerToVM::Data,             Universe_narrow_oop_base,               address)                                      \
  63   static_field(CompilerToVM::Data,             Universe_narrow_oop_shift,              int)                                          \
  64   static_field(CompilerToVM::Data,             Universe_narrow_klass_base,             address)                                      \
  65   static_field(CompilerToVM::Data,             Universe_narrow_klass_shift,            int)                                          \
  66   static_field(CompilerToVM::Data,             Universe_non_oop_bits,                  void*)                                        \


 396   declare_constant(CodeInstaller::VERIFIED_ENTRY)                         \
 397   declare_constant(CodeInstaller::UNVERIFIED_ENTRY)                       \
 398   declare_constant(CodeInstaller::OSR_ENTRY)                              \
 399   declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY)                \
 400   declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY)                    \
 401   declare_constant(CodeInstaller::INVOKEINTERFACE)                        \
 402   declare_constant(CodeInstaller::INVOKEVIRTUAL)                          \
 403   declare_constant(CodeInstaller::INVOKESTATIC)                           \
 404   declare_constant(CodeInstaller::INVOKESPECIAL)                          \
 405   declare_constant(CodeInstaller::INLINE_INVOKE)                          \
 406   declare_constant(CodeInstaller::POLL_NEAR)                              \
 407   declare_constant(CodeInstaller::POLL_RETURN_NEAR)                       \
 408   declare_constant(CodeInstaller::POLL_FAR)                               \
 409   declare_constant(CodeInstaller::POLL_RETURN_FAR)                        \
 410   declare_constant(CodeInstaller::CARD_TABLE_SHIFT)                       \
 411   declare_constant(CodeInstaller::CARD_TABLE_ADDRESS)                     \
 412   declare_constant(CodeInstaller::HEAP_TOP_ADDRESS)                       \
 413   declare_constant(CodeInstaller::HEAP_END_ADDRESS)                       \
 414   declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS)              \
 415   declare_constant(CodeInstaller::CRC_TABLE_ADDRESS)                      \
 416   declare_constant(CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES)         \
 417   declare_constant(CodeInstaller::INVOKE_INVALID)                         \
 418                                                                           \
 419   declare_constant(ConstantPool::CPCACHE_INDEX_TAG)                       \
 420                                                                           \
 421   declare_constant(ConstMethod::_has_linenumber_table)                    \
 422   declare_constant(ConstMethod::_has_localvariable_table)                 \
 423   declare_constant(ConstMethod::_has_exception_table)                     \
 424                                                                           \
 425   declare_constant(CounterData::count_off)                                \
 426                                                                           \
 427   declare_constant(DataLayout::cell_size)                                 \
 428   declare_constant(DataLayout::no_tag)                                    \
 429   declare_constant(DataLayout::bit_data_tag)                              \
 430   declare_constant(DataLayout::counter_data_tag)                          \
 431   declare_constant(DataLayout::jump_data_tag)                             \
 432   declare_constant(DataLayout::receiver_type_data_tag)                    \
 433   declare_constant(DataLayout::virtual_call_data_tag)                     \
 434   declare_constant(DataLayout::ret_data_tag)                              \
 435   declare_constant(DataLayout::branch_data_tag)                           \
 436   declare_constant(DataLayout::multi_branch_data_tag)                     \


 863 
 864   VM_LONG_CONSTANTS_OS(GENERATE_VM_LONG_CONSTANT_ENTRY,
 865                        GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
 866                        GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
 867                        GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
 868                        GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
 869 
 870   VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
 871                         GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
 872                         GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
 873                         GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
 874                         GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
 875 
 876   GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
 877 };
 878 
 879 VMAddressEntry JVMCIVMStructs::localHotSpotVMAddresses[] = {
 880   VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,
 881                GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
 882                GENERATE_VM_FUNCTION_ENTRY)
 883   VM_ADDRESSES_COMPILER_RUNTIME(GENERATE_VM_ADDRESS_ENTRY,
 884                GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
 885                GENERATE_VM_FUNCTION_ENTRY)
 886   VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,
 887                   GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,
 888                   GENERATE_VM_FUNCTION_ENTRY)
 889 
 890   GENERATE_VM_ADDRESS_LAST_ENTRY()
 891 };
 892 
 893 int JVMCIVMStructs::localHotSpotVMStructs_count() {
 894   // Ignore sentinel entry at the end
 895   return (sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1;
 896 }
 897 int JVMCIVMStructs::localHotSpotVMTypes_count() {
 898   // Ignore sentinel entry at the end
 899   return (sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry)) - 1;
 900 }
 901 int JVMCIVMStructs::localHotSpotVMIntConstants_count() {
 902   // Ignore sentinel entry at the end
 903   return (sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry)) - 1;
 904 }
 905 int JVMCIVMStructs::localHotSpotVMLongConstants_count() {
src/share/vm/jvmci/vmStructs_jvmci.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File