Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8264016: [JVMCI] add some thread local fields for use by JVMCI #278

wants to merge 1 commit into from
Changes from all commits
File filter
Filter by extension
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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);
f->do_oop((oop*) &_jvmci_reserved_oop0);

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;

static jlong* _jvmci_old_thread_counters;
static void collect_counters(typeArrayOop array);