Skip to content

Commit

Permalink
8320139: [JVMCI] VmObjectAlloc is not generated by intrinsics methods…
Browse files Browse the repository at this point in the history
… which allocate objects

Reviewed-by: never, dnsimon
  • Loading branch information
rmosaner authored and Tom Rodriguez committed Dec 21, 2023
1 parent 3b908c4 commit 84c2379
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/share/jvmci/jvmciCompilerToVM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ class CompilerToVM {
// Minimum alignment of an offset into CodeBuffer::SECT_CONSTS
static int data_section_item_alignment;

/*
* Pointer to JvmtiExport::_should_notify_object_alloc.
* Exposed as an int* instead of an address so the
* underlying type is part of the JVMCIVMStructs definition.
*/
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 84c2379

Please sign in to comment.