Skip to content

Commit f8eb7a8

Browse files
pronpchilano
authored andcommitted
8287512: continuationEntry.hpp has incomplete definitions
Reviewed-by: coleenp, pchilanomate
1 parent b2b4ee2 commit f8eb7a8

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ static void gen_continuation_enter(MacroAssembler* masm,
10501050

10511051
__ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw()));
10521052
oop_maps->add_gc_map(__ pc() - start, map->deep_copy());
1053-
ContinuationEntry::return_pc_offset = __ pc() - start;
1053+
ContinuationEntry::_return_pc_offset = __ pc() - start;
10541054
__ post_call_nop();
10551055

10561056
__ bind(exit);
@@ -1195,7 +1195,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
11951195
in_ByteSize(-1),
11961196
oop_maps,
11971197
exception_offset);
1198-
ContinuationEntry::set_enter_nmethod(nm);
1198+
ContinuationEntry::set_enter_code(nm);
11991199
return nm;
12001200
}
12011201

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ static void gen_continuation_enter(MacroAssembler* masm,
13171317
__ movptr(rbx, (intptr_t) StubRoutines::cont_thaw());
13181318
__ call(rbx);
13191319
oop_maps->add_gc_map(__ pc() - start, map->deep_copy());
1320-
ContinuationEntry::return_pc_offset = __ pc() - start;
1320+
ContinuationEntry::_return_pc_offset = __ pc() - start;
13211321
__ post_call_nop();
13221322

13231323
__ bind(exit);
@@ -1465,7 +1465,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
14651465
in_ByteSize(-1),
14661466
oop_maps,
14671467
exception_offset);
1468-
ContinuationEntry::set_enter_nmethod(nm);
1468+
ContinuationEntry::set_enter_code(nm);
14691469
return nm;
14701470
}
14711471

src/hotspot/share/runtime/continuationEntry.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@
3232
#include "runtime/stubRoutines.hpp"
3333
#include "runtime/thread.inline.hpp"
3434

35-
int ContinuationEntry::return_pc_offset = 0;
36-
nmethod* ContinuationEntry::continuation_enter = nullptr;
37-
address ContinuationEntry::return_pc = nullptr;
35+
int ContinuationEntry::_return_pc_offset = 0;
36+
address ContinuationEntry::_return_pc = nullptr;
3837

39-
void ContinuationEntry::set_enter_nmethod(nmethod* nm) {
40-
assert(return_pc_offset != 0, "");
41-
continuation_enter = nm;
42-
return_pc = nm->code_begin() + return_pc_offset;
38+
void ContinuationEntry::set_enter_code(CompiledMethod* cm) {
39+
assert(_return_pc_offset != 0, "");
40+
_return_pc = cm->code_begin() + _return_pc_offset;
4341
}
4442

4543
ContinuationEntry* ContinuationEntry::from_frame(const frame& f) {

src/hotspot/share/runtime/continuationEntry.hpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "runtime/continuation.hpp"
3131
#include "utilities/sizes.hpp"
3232

33-
class nmethod;
3433
class RegisterMap;
3534
class OopMap;
3635
class JavaThread;
@@ -52,12 +51,11 @@ class ContinuationEntry {
5251
#endif
5352

5453
public:
55-
static int return_pc_offset; // friend gen_continuation_enter
56-
static void set_enter_nmethod(nmethod* nm); // friend SharedRuntime::generate_native_wrapper
54+
static int _return_pc_offset; // friend gen_continuation_enter
55+
static void set_enter_code(CompiledMethod* nm); // friend SharedRuntime::generate_native_wrapper
5756

5857
private:
59-
static nmethod* continuation_enter;
60-
static address return_pc;
58+
static address _return_pc;
6159

6260
private:
6361
ContinuationEntry* _parent;
@@ -87,7 +85,7 @@ class ContinuationEntry {
8785
ContinuationEntry* parent() const { return _parent; }
8886
int parent_held_monitor_count() const { return _parent_held_monitor_count; }
8987

90-
static address entry_pc() { return return_pc; }
88+
static address entry_pc() { return _return_pc; }
9189
intptr_t* entry_sp() const { return (intptr_t*)this; }
9290
intptr_t* entry_fp() const;
9391

@@ -123,15 +121,11 @@ class ContinuationEntry {
123121
}
124122

125123
inline oop cont_oop() const;
126-
127-
oop scope() const { return Continuation::continuation_scope(cont_oop()); }
124+
inline oop scope() const;
125+
inline static oop cont_oop_or_null(const ContinuationEntry* ce);
128126

129127
bool is_virtual_thread() const { return _flags != 0; }
130128

131-
static oop cont_oop_or_null(const ContinuationEntry* ce) {
132-
return ce == nullptr ? nullptr : ce->cont_oop();
133-
}
134-
135129
#ifndef PRODUCT
136130
void describe(FrameValues& values, int frame_no) const {
137131
address usp = (address)this;

src/hotspot/share/runtime/continuationEntry.inline.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,12 @@ inline oop ContinuationEntry::cont_oop() const {
3636
return NativeAccess<>::oop_load(&snapshot);
3737
}
3838

39+
inline oop ContinuationEntry::cont_oop_or_null(const ContinuationEntry* ce) {
40+
return ce == nullptr ? nullptr : ce->cont_oop();
41+
}
42+
43+
inline oop ContinuationEntry::scope() const {
44+
return Continuation::continuation_scope(cont_oop());
45+
}
3946

4047
#endif // SHARE_VM_RUNTIME_CONTINUATIONENTRY_INLINE_HPP

0 commit comments

Comments
 (0)