diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp index 421ebd7396f43..300e5ebd4365e 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.hpp @@ -115,6 +115,8 @@ class CompilerToVM { // Minimum alignment of an offset into CodeBuffer::SECT_CONSTS static int data_section_item_alignment; + static int* _should_notify_object_alloc; + public: static void initialize(JVMCI_TRAPS); diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp index a3e2bd525ecf6..302a6c811c9d1 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp @@ -130,6 +130,8 @@ address CompilerToVM::Data::symbol_clinit; int CompilerToVM::Data::data_section_item_alignment; +int* CompilerToVM::Data::_should_notify_object_alloc; + void CompilerToVM::Data::initialize(JVMCI_TRAPS) { Klass_vtable_start_offset = in_bytes(Klass::vtable_start_offset()); Klass_vtable_length_offset = in_bytes(Klass::vtable_length_offset()); @@ -196,6 +198,8 @@ void CompilerToVM::Data::initialize(JVMCI_TRAPS) { data_section_item_alignment = relocInfo::addr_unit(); + _should_notify_object_alloc = &JvmtiExport::_should_notify_object_alloc; + BarrierSet* bs = BarrierSet::barrier_set(); if (bs->is_a(BarrierSet::CardTableBarrierSet)) { CardTable::CardValue* base = ci_card_table_address(); diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index 5fdc70d7bc7cb..582b39247fa20 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -122,6 +122,8 @@ \ static_field(CompilerToVM::Data, data_section_item_alignment, int) \ \ + static_field(CompilerToVM::Data, _should_notify_object_alloc, int*) \ + \ static_field(Abstract_VM_Version, _features, uint64_t) \ \ nonstatic_field(Annotations, _class_annotations, AnnotationArray*) \