Skip to content

Commit 182b11c

Browse files
author
Tom Rodriguez
committed
8264016: [JVMCI] add some thread local fields for use by JVMCI
Reviewed-by: dholmes, iklam, coleenp
1 parent 8cf1c62 commit 182b11c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@
182182
nonstatic_field(JavaThread, _pending_failed_speculation, jlong) \
183183
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
184184
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
185+
nonstatic_field(JavaThread, _jvmci_reserved0, intptr_t*) \
186+
nonstatic_field(JavaThread, _jvmci_reserved1, intptr_t*) \
187+
nonstatic_field(JavaThread, _jvmci_reserved_oop0, oop) \
185188
nonstatic_field(JavaThread, _should_post_on_exceptions_flag, int) \
186189
nonstatic_field(JavaThread, _jni_environment, JNIEnv) \
187190
nonstatic_field(JavaThread, _stack_overflow_state._reserved_stack_activation, address) \

src/hotspot/share/runtime/thread.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,9 @@ JavaThread::JavaThread() :
12021202
_pending_failed_speculation(0),
12031203
_jvmci{nullptr},
12041204
_jvmci_counters(nullptr),
1205+
_jvmci_reserved0(nullptr),
1206+
_jvmci_reserved1(nullptr),
1207+
_jvmci_reserved_oop0(nullptr),
12051208
#endif // INCLUDE_JVMCI
12061209

12071210
_exception_oop(oop()),
@@ -2310,6 +2313,9 @@ void JavaThread::oops_do_no_frames(OopClosure* f, CodeBlobClosure* cf) {
23102313
f->do_oop((oop*) &_vm_result);
23112314
f->do_oop((oop*) &_exception_oop);
23122315
f->do_oop((oop*) &_pending_async_exception);
2316+
#if INCLUDE_JVMCI
2317+
f->do_oop((oop*) &_jvmci_reserved_oop0);
2318+
#endif
23132319

23142320
if (jvmti_thread_state() != NULL) {
23152321
jvmti_thread_state()->oops_do(f, cf);

src/hotspot/share/runtime/thread.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,11 @@ class JavaThread: public Thread {
10241024
// Support for high precision, thread sensitive counters in JVMCI compiled code.
10251025
jlong* _jvmci_counters;
10261026

1027+
// Fast thread locals for use by JVMCI
1028+
intptr_t* _jvmci_reserved0;
1029+
intptr_t* _jvmci_reserved1;
1030+
oop _jvmci_reserved_oop0;
1031+
10271032
public:
10281033
static jlong* _jvmci_old_thread_counters;
10291034
static void collect_counters(jlong* array, int length);

0 commit comments

Comments
 (0)