Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 5123746

Browse files
author
Vladimir Kozlov
committedAug 10, 2020
8251369: [JVMCI] Backout 8246347 changes
Reviewed-by: dholmes
1 parent 84057fe commit 5123746

6 files changed

+17
-45
lines changed
 

‎src/hotspot/share/code/compiledMethod.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -330,7 +330,7 @@ class CompiledMethod : public CodeBlob {
330330
// Deopt
331331
// Return true is the PC is one would expect if the frame is being deopted.
332332
inline bool is_deopt_pc(address pc);
333-
inline bool is_deopt_mh_entry(address pc);
333+
bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
334334
inline bool is_deopt_entry(address pc);
335335

336336
virtual bool can_convert_to_zombie() = 0;

‎src/hotspot/share/code/compiledMethod.inline.hpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* 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) {
4141
;
4242
}
4343

44-
inline bool CompiledMethod::is_deopt_mh_entry(address pc) {
45-
return pc == deopt_mh_handler_begin()
46-
#if INCLUDE_JVMCI
47-
|| (is_compiled_by_jvmci() && pc == (deopt_mh_handler_begin() + NativeCall::instruction_size))
48-
#endif
49-
;
50-
}
51-
5244
// -----------------------------------------------------------------------------
5345
// CompiledMethod::get_deopt_original_pc
5446
//

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

+8-21
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ GrowableArray<ScopeValue*>* CodeInstaller::record_virtual_objects(JVMCIObject de
10431043
return objects;
10441044
}
10451045

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

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

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

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

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

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

1239-
if (hotspot_method.is_non_null()) {
1240-
Method *method = jvmci_env()->asMethod(hotspot_method);
1241-
vmIntrinsics::ID iid = method->intrinsic_id();
1242-
bool is_mh_invoke = false;
1243-
if (jvmci_env()->get_site_Call_direct(site)) {
1244-
is_mh_invoke = !method->is_static() && (iid == vmIntrinsics::_compiledLambdaForm ||
1245-
(MethodHandles::is_signature_polymorphic(iid) && MethodHandles::is_signature_polymorphic_intrinsic(iid)));
1246-
}
1247-
bool return_oop = method->is_returning_oop();
1248-
record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, is_mh_invoke, return_oop, JVMCI_CHECK);
1249-
} else {
1250-
record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, JVMCI_CHECK);
1251-
}
1239+
bool return_oop = hotspot_method.is_non_null() && jvmci_env()->asMethod(hotspot_method)->is_returning_oop();
1240+
1241+
record_scope(next_pc_offset, debug_info, CodeInstaller::FullFrame, return_oop, JVMCI_CHECK);
12521242
}
12531243

12541244
if (foreign_call.is_non_null()) {
@@ -1357,9 +1347,6 @@ void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, JVMCIObject si
13571347
case DEOPT_HANDLER_ENTRY:
13581348
_offsets.set_value(CodeOffsets::Deopt, pc_offset);
13591349
break;
1360-
case DEOPT_MH_HANDLER_ENTRY:
1361-
_offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1362-
break;
13631350
case FRAME_COMPLETE:
13641351
_offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
13651352
break;

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -159,7 +159,6 @@ class CodeInstaller : public StackObj {
159159
CRC_TABLE_ADDRESS,
160160
LOG_OF_HEAP_REGION_GRAIN_BYTES,
161161
INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED,
162-
DEOPT_MH_HANDLER_ENTRY,
163162
INVOKE_INVALID = -1
164163
};
165164

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

299298
int map_jvmci_bci(int bci);
300299

301-
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS);
300+
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool return_oop, JVMCI_TRAPS);
302301
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, JVMCI_TRAPS) {
303-
record_scope(pc_offset, debug_info, scope_mode, false /* is_mh_invoke */, false /* return_oop */, JVMCIENV);
302+
record_scope(pc_offset, debug_info, scope_mode, false /* return_oop */, JVMCIENV);
304303
}
305-
void record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool is_mh_invoke, bool return_oop, JVMCI_TRAPS);
304+
void record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool return_oop, JVMCI_TRAPS);
306305
void record_object_value(ObjectValue* sv, JVMCIObject value, GrowableArray<ScopeValue*>* objects, JVMCI_TRAPS);
307306

308307
GrowableArray<ScopeValue*>* record_virtual_objects(JVMCIObject debug_info, JVMCI_TRAPS);

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -175,7 +175,6 @@
175175
end_class \
176176
start_class(site_Call, jdk_vm_ci_code_site_Call) \
177177
object_field(site_Call, target, "Ljdk/vm/ci/meta/InvokeTarget;") \
178-
boolean_field(site_Call, direct) \
179178
end_class \
180179
start_class(site_DataPatch, jdk_vm_ci_code_site_DataPatch) \
181180
object_field(site_DataPatch, reference, "Ljdk/vm/ci/code/site/Reference;") \

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

+1-6
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,8 @@
471471
declare_constant(CodeInstaller::CRC_TABLE_ADDRESS) \
472472
declare_constant(CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES) \
473473
declare_constant(CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED) \
474-
declare_constant(CodeInstaller::DEOPT_MH_HANDLER_ENTRY) \
475474
declare_constant(CodeInstaller::INVOKE_INVALID) \
476475
\
477-
declare_constant(vmIntrinsics::FIRST_MH_SIG_POLY) \
478-
declare_constant(vmIntrinsics::LAST_MH_SIG_POLY) \
479-
declare_constant(vmIntrinsics::_invokeGeneric) \
480-
declare_constant(vmIntrinsics::_compiledLambdaForm) \
481-
\
482476
declare_constant(CollectedHeap::Serial) \
483477
declare_constant(CollectedHeap::Parallel) \
484478
declare_constant(CollectedHeap::G1) \
@@ -972,3 +966,4 @@ void jvmci_vmStructs_init() {
972966
JVMCIVMStructs::init();
973967
}
974968
#endif // ASSERT
969+

0 commit comments

Comments
 (0)
This repository has been archived.