Skip to content
Permalink
Browse files
8264016: [JVMCI] add some thread local fields for use by JVMCI
Reviewed-by: dholmes, iklam, coleenp
  • Loading branch information
Tom Rodriguez committed Mar 30, 2021
1 parent 8cf1c62 commit 182b11c31aa1d697ed254042c3350330ca3ac6e4
Showing with 14 additions and 0 deletions.
  1. +3 −0 src/hotspot/share/jvmci/vmStructs_jvmci.cpp
  2. +6 −0 src/hotspot/share/runtime/thread.cpp
  3. +5 −0 src/hotspot/share/runtime/thread.hpp
@@ -182,6 +182,9 @@
nonstatic_field(JavaThread, _pending_failed_speculation, jlong) \
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
nonstatic_field(JavaThread, _jvmci_reserved0, intptr_t*) \
nonstatic_field(JavaThread, _jvmci_reserved1, intptr_t*) \
nonstatic_field(JavaThread, _jvmci_reserved_oop0, oop) \
nonstatic_field(JavaThread, _should_post_on_exceptions_flag, int) \
nonstatic_field(JavaThread, _jni_environment, JNIEnv) \
nonstatic_field(JavaThread, _stack_overflow_state._reserved_stack_activation, address) \
@@ -1202,6 +1202,9 @@ JavaThread::JavaThread() :
_pending_failed_speculation(0),
_jvmci{nullptr},
_jvmci_counters(nullptr),
_jvmci_reserved0(nullptr),
_jvmci_reserved1(nullptr),
_jvmci_reserved_oop0(nullptr),
#endif // INCLUDE_JVMCI

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

if (jvmti_thread_state() != NULL) {
jvmti_thread_state()->oops_do(f, cf);
@@ -1024,6 +1024,11 @@ class JavaThread: public Thread {
// Support for high precision, thread sensitive counters in JVMCI compiled code.
jlong* _jvmci_counters;

// Fast thread locals for use by JVMCI
intptr_t* _jvmci_reserved0;
intptr_t* _jvmci_reserved1;
oop _jvmci_reserved_oop0;

public:
static jlong* _jvmci_old_thread_counters;
static void collect_counters(jlong* array, int length);

1 comment on commit 182b11c

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 182b11c Mar 30, 2021

Please sign in to comment.