Skip to content

Commit 6ff2d89

Browse files
author
Alan Bateman
committed
8287496: Alternative virtual thread implementation that maps to OS thread
Reviewed-by: rehn, mchung
1 parent 199832a commit 6ff2d89

File tree

72 files changed

+694
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+694
-173
lines changed

make/data/hotspot-symbols/symbols-unix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ JVM_IsFinalizationEnabled
155155
JVM_IsHiddenClass
156156
JVM_IsInterface
157157
JVM_IsPreviewEnabled
158+
JVM_IsContinuationsSupported
158159
JVM_IsPrimitiveClass
159160
JVM_IsRecord
160161
JVM_IsSameClassPackage

src/hotspot/cpu/aarch64/globals_aarch64.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ define_pd_global(intx, OptoLoopAlignment, 16);
5353
#define MIN_STACK_SHADOW_PAGES DEFAULT_STACK_SHADOW_PAGES
5454
#define MIN_STACK_RESERVED_PAGES (0)
5555

56+
define_pd_global(bool, VMContinuations, true);
57+
5658
define_pd_global(intx, StackYellowPages, DEFAULT_STACK_YELLOW_PAGES);
5759
define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
5860
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);

src/hotspot/cpu/arm/globals_arm.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
5353
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
5454
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
5555

56+
define_pd_global(bool, VMContinuations, false);
57+
5658
#if defined(COMPILER1) || defined(COMPILER2)
5759
define_pd_global(intx, InlineSmallCode, 1500);
5860
#endif

src/hotspot/cpu/ppc/globals_ppc.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
5454
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
5555
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
5656

57+
define_pd_global(bool, VMContinuations, false);
58+
5759
// Use large code-entry alignment.
5860
define_pd_global(uintx, CodeCacheSegmentSize, 128);
5961
define_pd_global(intx, CodeEntryAlignment, 128);

src/hotspot/cpu/riscv/globals_riscv.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
5858
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
5959
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
6060

61+
define_pd_global(bool, VMContinuations, false);
62+
6163
define_pd_global(bool, RewriteBytecodes, true);
6264
define_pd_global(bool, RewriteFrequentPairs, true);
6365

src/hotspot/cpu/s390/globals_s390.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
6262
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
6363
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
6464

65+
define_pd_global(bool, VMContinuations, false);
66+
6567
define_pd_global(bool, RewriteBytecodes, true);
6668
define_pd_global(bool, RewriteFrequentPairs, true);
6769

src/hotspot/cpu/x86/globals_x86.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
7777
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
7878
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
7979

80+
#ifdef _LP64
81+
define_pd_global(bool, VMContinuations, true);
82+
#else
83+
define_pd_global(bool, VMContinuations, false);
84+
#endif
85+
8086
define_pd_global(bool, RewriteBytecodes, true);
8187
define_pd_global(bool, RewriteFrequentPairs, true);
8288

src/hotspot/cpu/zero/globals_zero.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ define_pd_global(intx, StackRedPages, DEFAULT_STACK_RED_PAGES);
6262
define_pd_global(intx, StackShadowPages, DEFAULT_STACK_SHADOW_PAGES);
6363
define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
6464

65+
define_pd_global(bool, VMContinuations, false);
66+
6567
define_pd_global(bool, RewriteBytecodes, true);
6668
define_pd_global(bool, RewriteFrequentPairs, true);
6769

src/hotspot/share/classfile/vmClassMacros.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
do_klass(Thread_FieldHolder_klass, java_lang_Thread_FieldHolder ) \
9191
do_klass(Thread_Constants_klass, java_lang_Thread_Constants ) \
9292
do_klass(ThreadGroup_klass, java_lang_ThreadGroup ) \
93+
do_klass(BasicVirtualThread_klass, java_lang_BaseVirtualThread ) \
9394
do_klass(VirtualThread_klass, java_lang_VirtualThread ) \
9495
do_klass(Properties_klass, java_util_Properties ) \
9596
do_klass(Module_klass, java_lang_Module ) \

src/hotspot/share/classfile/vmSymbols.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
template(java_lang_Thread_FieldHolder, "java/lang/Thread$FieldHolder") \
6666
template(java_lang_Thread_Constants, "java/lang/Thread$Constants") \
6767
template(java_lang_ThreadGroup, "java/lang/ThreadGroup") \
68+
template(java_lang_BaseVirtualThread, "java/lang/BaseVirtualThread") \
6869
template(java_lang_VirtualThread, "java/lang/VirtualThread") \
6970
template(java_lang_Cloneable, "java/lang/Cloneable") \
7071
template(java_lang_Throwable, "java/lang/Throwable") \

0 commit comments

Comments
 (0)