843 JVMCI_ERROR_OK("method contains safepoint, but has no deopt rescue slot");
844 }
845 } else {
846 TRACE_jvmci_4("infopoint at %i", pc_offset);
847 site_Infopoint(buffer, pc_offset, site, CHECK_OK);
848 }
849 } else if (site->is_a(site_DataPatch::klass())) {
850 TRACE_jvmci_4("datapatch at %i", pc_offset);
851 site_DataPatch(buffer, pc_offset, site, CHECK_OK);
852 } else if (site->is_a(site_Mark::klass())) {
853 TRACE_jvmci_4("mark at %i", pc_offset);
854 site_Mark(buffer, pc_offset, site, CHECK_OK);
855 } else if (site->is_a(site_ExceptionHandler::klass())) {
856 TRACE_jvmci_4("exceptionhandler at %i", pc_offset);
857 site_ExceptionHandler(pc_offset, site);
858 } else {
859 JVMCI_ERROR_OK("unexpected site subclass: %s", site->klass()->signature_name());
860 }
861 last_pc_offset = pc_offset;
862
863 if (SafepointMechanism::poll()) {
864 // this is a hacky way to force a safepoint check but nothing else was jumping out at me.
865 ThreadToNativeFromVM ttnfv(JavaThread::current());
866 }
867 }
868
869 #ifndef PRODUCT
870 if (comments() != NULL) {
871 for (int i = 0; i < comments()->length(); i++) {
872 oop comment = comments()->obj_at(i);
873 assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce");
874 jint offset = HotSpotCompiledCode_Comment::pcOffset(comment);
875 char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment));
876 buffer.block_comment(offset, text);
877 }
878 }
879 #endif
880 return JVMCIEnv::ok;
881 }
882
883 void CodeInstaller::assumption_NoFinalizableSubclass(Thread* thread, Handle assumption) {
884 Handle receiverType_handle (thread, Assumptions_NoFinalizableSubclass::receiverType(assumption()));
885 Klass* receiverType = java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(receiverType_handle));
|
843 JVMCI_ERROR_OK("method contains safepoint, but has no deopt rescue slot");
844 }
845 } else {
846 TRACE_jvmci_4("infopoint at %i", pc_offset);
847 site_Infopoint(buffer, pc_offset, site, CHECK_OK);
848 }
849 } else if (site->is_a(site_DataPatch::klass())) {
850 TRACE_jvmci_4("datapatch at %i", pc_offset);
851 site_DataPatch(buffer, pc_offset, site, CHECK_OK);
852 } else if (site->is_a(site_Mark::klass())) {
853 TRACE_jvmci_4("mark at %i", pc_offset);
854 site_Mark(buffer, pc_offset, site, CHECK_OK);
855 } else if (site->is_a(site_ExceptionHandler::klass())) {
856 TRACE_jvmci_4("exceptionhandler at %i", pc_offset);
857 site_ExceptionHandler(pc_offset, site);
858 } else {
859 JVMCI_ERROR_OK("unexpected site subclass: %s", site->klass()->signature_name());
860 }
861 last_pc_offset = pc_offset;
862
863 JavaThread* thread = JavaThread::current();
864 if (SafepointMechanism::poll(thread)) {
865 // this is a hacky way to force a safepoint check but nothing else was jumping out at me.
866 ThreadToNativeFromVM ttnfv(thread);
867 }
868 }
869
870 #ifndef PRODUCT
871 if (comments() != NULL) {
872 for (int i = 0; i < comments()->length(); i++) {
873 oop comment = comments()->obj_at(i);
874 assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce");
875 jint offset = HotSpotCompiledCode_Comment::pcOffset(comment);
876 char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment));
877 buffer.block_comment(offset, text);
878 }
879 }
880 #endif
881 return JVMCIEnv::ok;
882 }
883
884 void CodeInstaller::assumption_NoFinalizableSubclass(Thread* thread, Handle assumption) {
885 Handle receiverType_handle (thread, Assumptions_NoFinalizableSubclass::receiverType(assumption()));
886 Klass* receiverType = java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(receiverType_handle));
|