Skip to content

Commit 84c2379

Browse files
rmosanerTom Rodriguez
authored and
Tom Rodriguez
committedDec 21, 2023
8320139: [JVMCI] VmObjectAlloc is not generated by intrinsics methods which allocate objects
Reviewed-by: never, dnsimon
1 parent 3b908c4 commit 84c2379

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed
 

‎src/hotspot/share/jvmci/jvmciCompilerToVM.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ class CompilerToVM {
115115
// Minimum alignment of an offset into CodeBuffer::SECT_CONSTS
116116
static int data_section_item_alignment;
117117

118+
/*
119+
* Pointer to JvmtiExport::_should_notify_object_alloc.
120+
* Exposed as an int* instead of an address so the
121+
* underlying type is part of the JVMCIVMStructs definition.
122+
*/
123+
static int* _should_notify_object_alloc;
124+
118125
public:
119126
static void initialize(JVMCI_TRAPS);
120127

‎src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ address CompilerToVM::Data::symbol_clinit;
130130

131131
int CompilerToVM::Data::data_section_item_alignment;
132132

133+
int* CompilerToVM::Data::_should_notify_object_alloc;
134+
133135
void CompilerToVM::Data::initialize(JVMCI_TRAPS) {
134136
Klass_vtable_start_offset = in_bytes(Klass::vtable_start_offset());
135137
Klass_vtable_length_offset = in_bytes(Klass::vtable_length_offset());
@@ -196,6 +198,8 @@ void CompilerToVM::Data::initialize(JVMCI_TRAPS) {
196198

197199
data_section_item_alignment = relocInfo::addr_unit();
198200

201+
_should_notify_object_alloc = &JvmtiExport::_should_notify_object_alloc;
202+
199203
BarrierSet* bs = BarrierSet::barrier_set();
200204
if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
201205
CardTable::CardValue* base = ci_card_table_address();

‎src/hotspot/share/jvmci/vmStructs_jvmci.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@
122122
\
123123
static_field(CompilerToVM::Data, data_section_item_alignment, int) \
124124
\
125+
static_field(CompilerToVM::Data, _should_notify_object_alloc, int*) \
126+
\
125127
static_field(Abstract_VM_Version, _features, uint64_t) \
126128
\
127129
nonstatic_field(Annotations, _class_annotations, AnnotationArray*) \

0 commit comments

Comments
 (0)
Please sign in to comment.