Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8261226: [lworld] Array access profiling should be disabled at compilation level 1 and 2 #323

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -3120,6 +3120,7 @@ void LIRGenerator::profile_flags(ciMethodData* md, ciProfileData* data, int flag
}

void LIRGenerator::profile_null_free_array(LIRItem array, ciMethodData* md, ciArrayLoadStoreData* load_store) {
assert(compilation()->profile_array_accesses(), "array access profiling is disabled");
LabelObj* L_end = new LabelObj();
LIR_Opr tmp = new_register(T_METADATA);
__ check_null_free_array(array.result(), tmp);
@@ -3128,6 +3129,7 @@ void LIRGenerator::profile_null_free_array(LIRItem array, ciMethodData* md, ciAr
}

void LIRGenerator::profile_array_type(AccessIndexed* x, ciMethodData*& md, ciArrayLoadStoreData*& load_store) {
assert(compilation()->profile_array_accesses(), "array access profiling is disabled");
int bci = x->profiled_bci();
md = x->profiled_method()->method_data();
assert(md != NULL, "Sanity");
@@ -3140,13 +3142,13 @@ void LIRGenerator::profile_array_type(AccessIndexed* x, ciMethodData*& md, ciArr
}

void LIRGenerator::profile_element_type(Value element, ciMethodData* md, ciArrayLoadStoreData* load_store) {
assert(compilation()->profile_array_accesses(), "array access profiling is disabled");
assert(md != NULL && load_store != NULL, "should have been initialized");
LIR_Opr mdp = LIR_OprFact::illegalOpr;
profile_type(md, md->byte_offset_of_slot(load_store, ArrayLoadStoreData::element_offset()), 0,
load_store->element()->type(), element, mdp, false, NULL, NULL);
}


void LIRGenerator::do_Base(Base* x) {
__ std_entry(LIR_OprFact::illegalOpr);
// Emit moves from physical registers / stack slots to virtual registers
@@ -465,6 +465,10 @@ static void profile_flat_array(JavaThread* thread) {
ResourceMark rm(thread);
vframeStream vfst(thread, true);
assert(!vfst.at_end(), "Java frame must exist");
// Check if array access profiling is enabled
if (vfst.nm()->comp_level() != CompLevel_full_profile || !C1UpdateMethodData) {
return;
}
int bci = vfst.bci();
Method* method = vfst.method();
MethodData* md = method->method_data();