8252685: APIs that require JavaThread should take JavaThread arguments

Reviewed-by: coleenp, sspitsyn, kvn, iklam
This commit is contained in:
David Holmes 2021-05-17 04:05:44 +00:00
parent 2066f497b9
commit 02f895c5f6
120 changed files with 507 additions and 521 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -128,7 +128,7 @@ static bool setup_event_writer_offsets(TRAPS) {
bool JfrJavaEventWriter::initialize() {
static bool initialized = false;
if (!initialized) {
initialized = setup_event_writer_offsets(Thread::current());
initialized = setup_event_writer_offsets(JavaThread::current());
}
return initialized;
}
@ -211,7 +211,7 @@ static jobject create_new_event_writer(JfrBuffer* buffer, TRAPS) {
return result.get_jobject();
}
jobject JfrJavaEventWriter::event_writer(Thread* t) {
jobject JfrJavaEventWriter::event_writer(JavaThread* t) {
DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(t));
JfrThreadLocal* const tl = t->jfr_thread_local();
assert(tl->shelved_buffer() == NULL, "invariant");