Skip to content

Commit 1f6eb0f

Browse files
committed
8264016: [JVMCI] add some thread local fields for use by JVMCI
Reviewed-by: shade Backport-of: 182b11c
1 parent 3bc2275 commit 1f6eb0f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@
179179
nonstatic_field(JavaThread, _pending_failed_speculation, long) \
180180
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
181181
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
182+
nonstatic_field(JavaThread, _jvmci_reserved0, intptr_t*) \
183+
nonstatic_field(JavaThread, _jvmci_reserved1, intptr_t*) \
184+
nonstatic_field(JavaThread, _jvmci_reserved_oop0, oop) \
182185
nonstatic_field(JavaThread, _reserved_stack_activation, address) \
183186
\
184187
static_field(java_lang_Class, _klass_offset, int) \

src/hotspot/share/runtime/thread.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,9 @@ void JavaThread::initialize() {
16221622
_adjusting_comp_level = false;
16231623
_jvmci._alternate_call_target = NULL;
16241624
assert(_jvmci._implicit_exception_pc == NULL, "must be");
1625+
_jvmci_reserved0 = NULL;
1626+
_jvmci_reserved1 = NULL;
1627+
_jvmci_reserved_oop0 = NULL;
16251628
if (JVMCICounterSize > 0) {
16261629
_jvmci_counters = NEW_C_HEAP_ARRAY(jlong, JVMCICounterSize, mtInternal);
16271630
memset(_jvmci_counters, 0, sizeof(jlong) * JVMCICounterSize);
@@ -2923,6 +2926,9 @@ void JavaThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
29232926
f->do_oop((oop*) &_vm_result);
29242927
f->do_oop((oop*) &_exception_oop);
29252928
f->do_oop((oop*) &_pending_async_exception);
2929+
#if INCLUDE_JVMCI
2930+
f->do_oop((oop*) &_jvmci_reserved_oop0);
2931+
#endif
29262932

29272933
if (jvmti_thread_state() != NULL) {
29282934
jvmti_thread_state()->oops_do(f, cf);

src/hotspot/share/runtime/thread.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,11 @@ class JavaThread: public Thread {
10831083
// Support for high precision, thread sensitive counters in JVMCI compiled code.
10841084
jlong* _jvmci_counters;
10851085

1086+
// Fast thread locals for use by JVMCI
1087+
intptr_t* _jvmci_reserved0;
1088+
intptr_t* _jvmci_reserved1;
1089+
oop _jvmci_reserved_oop0;
1090+
10861091
public:
10871092
static jlong* _jvmci_old_thread_counters;
10881093
staticvoidcollect_counters(typeArrayOop array);

0 commit comments

Comments
 (0)
close