Skip to content

Commit

Permalink
[JVMCI] Export pointer to JvmtiExport::_should_notify_object_alloc vi…
Browse files Browse the repository at this point in the history
…a CompilerToVM::Data.
  • Loading branch information
rmosaner committed Dec 6, 2023
1 parent 7fbfb3b commit 0b430d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hotspot/share/jvmci/jvmciCompilerToVM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/hotspot/share/jvmci/vmStructs_jvmci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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*) \
Expand Down

0 comments on commit 0b430d8

Please sign in to comment.