hotspot Udiff src/share/vm/jvmci/jvmciCodeInstaller.cpp (original) (raw)

< prev index next >

Print this page


@@ -57,11 +57,11 @@ VMReg getVMRegFromLocation(Handle location, int total_frame_size, TRAPS) { if (location.is_null()) { THROW_NULL(vmSymbols::java_lang_NullPointerException()); }


@@ -93,33 +93,33 @@ } }

// creates a HotSpot oop map out of the byte arrays provided by DebugInfo OopMap* CodeInstaller::create_oop_map(Handle debug_info, TRAPS) {


@@ -147,16 +147,16 @@ } else { JVMCI_ERROR_NULL("invalid oop size in ReferenceMap: %d", bytes); } }


@@ -277,13 +277,13 @@ TRACE_jvmci_3("narrowKlass[%d of %d] = %s", index, _oop_recorder->metadata_count(), klass->name()->as_C_string()); return Klass::encode_klass(klass); } #endif

-Location::Type CodeInstaller::get_oop_type(Handle value) {


@@ -298,17 +298,17 @@ if (type != T_ILLEGAL) { JVMCI_ERROR_NULL("unexpected illegal value, expected %s", basictype_to_str(type)); } return _illegal_value; } else if (value->is_a(RegisterValue::klass())) {


@@ -341,11 +341,11 @@ offset += _total_frame_size; }

 Location::Type locationType;
 if (type == T_OBJECT) {

@@ -362,11 +362,12 @@ if (value->is_a(PrimitiveConstant::klass())) { if (value->is_a(RawConstant::klass())) { jlong prim = PrimitiveConstant::primitive(value); return new ConstantLongValue(prim); } else {


@@ -419,22 +420,24 @@

JVMCI_ERROR_NULL("unexpected value in scope: %s", value->klass()->signature_name()) }

void CodeInstaller::record_object_value(ObjectValue* sv, Handle value, GrowableArray<ScopeValue*>* objects, TRAPS) {


@@ -456,14 +459,16 @@ if (!value->is_a(StackLockValue::klass())) { JVMCI_ERROR_NULL("Monitors must be of type StackLockValue, got %s", value->klass()->signature_name()); }

ScopeValue* second = NULL;


@@ -474,41 +479,42 @@ return new MonitorValue(owner_value, lock_data_loc, eliminated); }

void CodeInstaller::initialize_dependencies(oop compiled_code, OopRecorder* recorder, TRAPS) { JavaThread* thread = JavaThread::current();


@@ -637,11 +643,11 @@ return result; }

void CodeInstaller::initialize_fields(oop target, oop compiled_code, TRAPS) { if (compiled_code->is_a(HotSpotCompiledNmethod::klass())) {


@@ -726,11 +732,11 @@ }

// perform data and call relocation on the CodeBuffer JVMCIEnv::CodeInstallResult CodeInstaller::initialize_buffer(CodeBuffer& buffer, TRAPS) { HandleMark hm;


@@ -764,22 +770,23 @@ guarantee(_instructions->allocates2(end_pc), "initialize should have reserved enough space for all the code"); memcpy(_instructions->start(), code()->base(T_BYTE), _code_size); _instructions->set_end(end_pc);

for (int i = 0; i < data_section_patches()->length(); i++) {


@@ -791,11 +798,11 @@ #endif } else { ((void*) dest) = record_metadata_reference(_constants, dest, constant, CHECK_OK); } } else if (constant->is_a(HotSpotObjectConstantImpl::klass())) {

#ifdef _LP64


@@ -810,11 +817,12 @@ JVMCI_ERROR_OK("invalid constant in data section: %s", constant->klass()->signature_name()); } } jint last_pc_offset = -1; for (int i = 0; i < sites->length(); i++) {


@@ -867,46 +875,46 @@ } #endif return JVMCIEnv::ok; }

-void CodeInstaller::assumption_NoFinalizableSubclass(Handle assumption) {

-void CodeInstaller::assumption_ConcreteSubtype(Handle assumption) {

}

-void CodeInstaller::assumption_LeafType(Handle assumption) {

}

-void CodeInstaller::assumption_ConcreteMethod(Handle assumption) {

}

-void CodeInstaller::assumption_CallSiteTargetValue(Handle assumption) {

}

void CodeInstaller::site_ExceptionHandler(jint pc_offset, Handle exc) {


@@ -934,20 +942,21 @@ } return true; }

GrowableArray<ScopeValue*>* CodeInstaller::record_virtual_objects(Handle debug_info, TRAPS) {


@@ -957,20 +966,21 @@ objects->at_put(id, sv); } // All the values which could be referenced by the VirtualObjects // exist, so now describe all the VirtualObjects themselves. for (int i = 0; i < virtualObjects->length(); i++) { - Handle value = virtualObjects->obj_at(i); + HandleMark hm(THREAD); + Handle value (THREAD, virtualObjects->obj_at(i)); int id = VirtualObject::id(value); record_object_value(objects->at(id)->as_ObjectValue(), value, objects, CHECK_NULL); } _debug_recorder->dump_object_pool(objects); return objects; } void CodeInstaller::record_scope(jint pc_offset, Handle debug_info, ScopeMode scope_mode, bool return_oop, TRAPS) { - Handle position = DebugInfo::bytecodePosition(debug_info); + Handle position (THREAD, DebugInfo::bytecodePosition(debug_info)); if (position.is_null()) { // Stubs do not record scope info, just oop maps return; }

@@ -989,16 +999,16 @@ if (!position->is_a(BytecodeFrame::klass())) { JVMCI_ERROR("Full frame expected for debug info at %i", pc_offset); } frame = position; }


@@ -1025,12 +1035,12 @@

if (frame.not_null()) { jint local_count = BytecodeFrame::numLocals(frame); jint expression_count = BytecodeFrame::numStack(frame); jint monitor_count = BytecodeFrame::numLocks(frame);


@@ -1046,21 +1056,22 @@

 TRACE_jvmci_2("Scope at bci %d with %d values", bci, values->length());
 TRACE_jvmci_2("%d locals %d expressions, %d monitors", local_count, expression_count, monitor_count);

 for (jint i = 0; i < values->length(); i++) {

@@ -1086,11 +1097,11 @@ _debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, false, return_oop, locals_token, expressions_token, monitors_token); }

void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS) {


@@ -1100,11 +1111,11 @@ record_scope(pc_offset, debug_info, CodeInstaller::FullFrame, CHECK); _debug_recorder->end_safepoint(pc_offset); }

void CodeInstaller::site_Infopoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS) {


@@ -1115,11 +1126,11 @@ record_scope(pc_offset, debug_info, CodeInstaller::BytecodePosition, CHECK); _debug_recorder->end_non_safepoint(pc_offset); } void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS) { - Handle target = site_Call::target(site); + Handle target (THREAD, site_Call::target(site)); InstanceKlass* target_klass = InstanceKlass::cast(target->klass()); Handle hotspot_method; // JavaMethod Handle foreign_call;

@@ -1127,11 +1138,11 @@ foreign_call = target; } else { hotspot_method = target; }


@@ -1175,15 +1186,15 @@ _debug_recorder->end_safepoint(next_pc_offset); } }

void CodeInstaller::site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS) {


@@ -1211,11 +1222,11 @@ JVMCI_ERROR("unknown data patch type: %s", reference->klass()->signature_name()); } }

void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS) {

< prev index next >