Skip to content
Permalink
Browse files
8264016: [JVMCI] add some thread local fields for use by JVMCI
Reviewed-by: shade
Backport-of: 182b11c
  • Loading branch information
jerboaa committed Aug 25, 2021
1 parent 3bc2275 commit 1f6eb0fc9c041a3fb277db0b39b5a369401510a6
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
@@ -179,6 +179,9 @@
nonstatic_field(JavaThread, _pending_failed_speculation, long) \
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, _reserved_stack_activation, address) \
\
static_field(java_lang_Class, _klass_offset, int) \
@@ -1622,6 +1622,9 @@ void JavaThread::initialize() {
_adjusting_comp_level = false;
_jvmci._alternate_call_target = NULL;
assert(_jvmci._implicit_exception_pc == NULL, "must be");
_jvmci_reserved0 = NULL;
_jvmci_reserved1 = NULL;
_jvmci_reserved_oop0 = NULL;
if (JVMCICounterSize > 0) {
_jvmci_counters = NEW_C_HEAP_ARRAY(jlong, JVMCICounterSize, mtInternal);
memset(_jvmci_counters, 0, sizeof(jlong) * JVMCICounterSize);
@@ -2923,6 +2926,9 @@ void JavaThread::oops_do(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);
@@ -1083,6 +1083,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(typeArrayOop array);

1 comment on commit 1f6eb0f

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 1f6eb0f Aug 25, 2021

Please sign in to comment.