Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8251369: [JVMCI] Backout 8246347 changes
Reviewed-by: dholmes
  • Loading branch information
Vladimir Kozlov committed Aug 10, 2020
1 parent 84057fe commit 512374628d96720e6d34086fb32b7e0784763c24
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 45 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -330,7 +330,7 @@ class CompiledMethod : public CodeBlob {
// Deopt
// Return true is the PC is one would expect if the frame is being deopted.
inline bool is_deopt_pc(address pc);
inline bool is_deopt_mh_entry(address pc);
bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
inline bool is_deopt_entry(address pc);

virtual bool can_convert_to_zombie() = 0;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,14 +41,6 @@ inline bool CompiledMethod::is_deopt_entry(address pc) {
;
}

inline bool CompiledMethod::is_deopt_mh_entry(address pc) {
return pc == deopt_mh_handler_begin()
#if INCLUDE_JVMCI
|| (is_compiled_by_jvmci() && pc == (deopt_mh_handler_begin() + NativeCall::instruction_size))
#endif
;
}

// -----------------------------------------------------------------------------
// CompiledMethod::get_deopt_original_pc
//
@@ -1043,7 +1043,7 @@ GrowableArray<ScopeValue*>* CodeInstaller::record_virtual_objects(JVMCIObject de
return objects;
}

void CodeInstaller::record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS) {
void CodeInstaller::record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool return_oop, JVMCI_TRAPS) {
JVMCIObject position = jvmci_env()->get_DebugInfo_bytecodePosition(debug_info);
if (position.is_null()) {
// Stubs do not record scope info, just oop maps
@@ -1056,7 +1056,7 @@ void CodeInstaller::record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMo
} else {
objectMapping = NULL;
}
record_scope(pc_offset, position, scope_mode, objectMapping, is_mh_invoke, return_oop, JVMCI_CHECK);
record_scope(pc_offset, position, scope_mode, objectMapping, return_oop, JVMCI_CHECK);
}

int CodeInstaller::map_jvmci_bci(int bci) {
@@ -1079,7 +1079,7 @@ int CodeInstaller::map_jvmci_bci(int bci) {
return bci;
}

void CodeInstaller::record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS) {
void CodeInstaller::record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool return_oop, JVMCI_TRAPS) {
JVMCIObject frame;
if (scope_mode == CodeInstaller::FullFrame) {
if (!jvmci_env()->isa_BytecodeFrame(position)) {
@@ -1089,7 +1089,7 @@ void CodeInstaller::record_scope(jint pc_offset, JVMCIObject position, ScopeMode
}
JVMCIObject caller_frame = jvmci_env()->get_BytecodePosition_caller(position);
if (caller_frame.is_non_null()) {
record_scope(pc_offset, caller_frame, scope_mode, objects, is_mh_invoke, return_oop, JVMCI_CHECK);
record_scope(pc_offset, caller_frame, scope_mode, objects, return_oop, JVMCI_CHECK);
}

JVMCIObject hotspot_method = jvmci_env()->get_BytecodePosition_method(position);
@@ -1181,7 +1181,7 @@ void CodeInstaller::record_scope(jint pc_offset, JVMCIObject position, ScopeMode
throw_exception = jvmci_env()->get_BytecodeFrame_rethrowException(frame) == JNI_TRUE;
}

_debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, is_mh_invoke, return_oop,
_debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, false, return_oop,
locals_token, expressions_token, monitors_token);
}

@@ -1236,19 +1236,9 @@ void CodeInstaller::site_Call(CodeBuffer& buffer, jint pc_offset, JVMCIObject si
OopMap *map = create_oop_map(debug_info, JVMCI_CHECK);
_debug_recorder->add_safepoint(next_pc_offset, map);

if (hotspot_method.is_non_null()) {
Method *method = jvmci_env()->asMethod(hotspot_method);
vmIntrinsics::ID iid = method->intrinsic_id();
bool is_mh_invoke = false;
if (jvmci_env()->get_site_Call_direct(site)) {
is_mh_invoke = !method->is_static() && (iid == vmIntrinsics::_compiledLambdaForm ||
(MethodHandles::is_signature_polymorphic(iid) && MethodHandles::is_signature_polymorphic_intrinsic(iid)));
}
bool return_oop = method->is_returning_oop();
record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, is_mh_invoke, return_oop, JVMCI_CHECK);
} else {
record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, JVMCI_CHECK);
}
bool return_oop = hotspot_method.is_non_null() && jvmci_env()->asMethod(hotspot_method)->is_returning_oop();

record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, return_oop, JVMCI_CHECK);
}

if (foreign_call.is_non_null()) {
@@ -1357,9 +1347,6 @@ void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, JVMCIObject si
case DEOPT_HANDLER_ENTRY:
_offsets.set_value(CodeOffsets::Deopt, pc_offset);
break;
case DEOPT_MH_HANDLER_ENTRY:
_offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
break;
case FRAME_COMPLETE:
_offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
break;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -159,7 +159,6 @@ class CodeInstaller : public StackObj {
CRC_TABLE_ADDRESS,
LOG_OF_HEAP_REGION_GRAIN_BYTES,
INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED,
DEOPT_MH_HANDLER_ENTRY,
INVOKE_INVALID = -1
};

@@ -298,11 +297,11 @@ class CodeInstaller : public StackObj {

int map_jvmci_bci(int bci);

void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS);
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool return_oop, JVMCI_TRAPS);
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, JVMCI_TRAPS) {
record_scope(pc_offset, debug_info, scope_mode, false /* is_mh_invoke */, false /* return_oop */, JVMCIENV);
record_scope(pc_offset, debug_info, scope_mode, false /* return_oop */, JVMCIENV);
}
void record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS);
void record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool return_oop, JVMCI_TRAPS);
void record_object_value(ObjectValue* sv, JVMCIObject value, GrowableArray<ScopeValue*>* objects, JVMCI_TRAPS);

GrowableArray<ScopeValue*>* record_virtual_objects(JVMCIObject debug_info, JVMCI_TRAPS);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -175,7 +175,6 @@
end_class \
start_class(site_Call, jdk_vm_ci_code_site_Call) \
object_field(site_Call, target, "Ljdk/vm/ci/meta/InvokeTarget;") \
boolean_field(site_Call, direct) \
end_class \
start_class(site_DataPatch, jdk_vm_ci_code_site_DataPatch) \
object_field(site_DataPatch, reference, "Ljdk/vm/ci/code/site/Reference;") \
@@ -471,14 +471,8 @@
declare_constant(CodeInstaller::CRC_TABLE_ADDRESS) \
declare_constant(CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES) \
declare_constant(CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED) \
declare_constant(CodeInstaller::DEOPT_MH_HANDLER_ENTRY) \
declare_constant(CodeInstaller::INVOKE_INVALID) \
\
declare_constant(vmIntrinsics::FIRST_MH_SIG_POLY) \
declare_constant(vmIntrinsics::LAST_MH_SIG_POLY) \
declare_constant(vmIntrinsics::_invokeGeneric) \
declare_constant(vmIntrinsics::_compiledLambdaForm) \
\
declare_constant(CollectedHeap::Serial) \
declare_constant(CollectedHeap::Parallel) \
declare_constant(CollectedHeap::G1) \
@@ -972,3 +966,4 @@ void jvmci_vmStructs_init() {
JVMCIVMStructs::init();
}
#endif // ASSERT

0 comments on commit 5123746

Please sign in to comment.