8305936: JavaThread::create_system_thread_object has unused is_visible argument

Reviewed-by: alanb, kbarrett
This commit is contained in:
David Holmes 2023-04-13 23:10:18 +00:00
parent 76cda9f44a
commit 8a1639d49b
9 changed files with 15 additions and 17 deletions

View file

@ -759,7 +759,7 @@ void CompileBroker::compilation_init_phase2() {
}
Handle CompileBroker::create_thread_oop(const char* name, TRAPS) {
Handle thread_oop = JavaThread::create_system_thread_object(name, false /* not visible */, CHECK_NH);
Handle thread_oop = JavaThread::create_system_thread_object(name, CHECK_NH);
return thread_oop;
}

View file

@ -2067,8 +2067,7 @@ void JavaThread::verify_cross_modify_fence_failure(JavaThread *thread) {
// Helper function to create the java.lang.Thread object for a
// VM-internal thread. The thread will have the given name, and be
// a member of the "system" ThreadGroup.
Handle JavaThread::create_system_thread_object(const char* name,
bool is_visible, TRAPS) {
Handle JavaThread::create_system_thread_object(const char* name, TRAPS) {
Handle string = java_lang_String::create_from_str(name, CHECK_NH);
// Initialize thread_oop to put it into the system threadGroup.

View file

@ -1152,10 +1152,9 @@ public:
static void verify_cross_modify_fence_failure(JavaThread *thread) PRODUCT_RETURN;
// Helper function to create the java.lang.Thread object for a
// VM-internal thread. The thread will have the given name, be
// part of the System ThreadGroup and if is_visible is true will be
// discoverable via the system ThreadGroup.
static Handle create_system_thread_object(const char* name, bool is_visible, TRAPS);
// VM-internal thread. The thread will have the given name and be
// part of the System ThreadGroup.
static Handle create_system_thread_object(const char* name, TRAPS);
// Helper function to start a VM-internal daemon thread.
// E.g. ServiceThread, NotificationThread, CompilerThread etc.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, 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
@ -38,7 +38,7 @@ void MonitorDeflationThread::initialize() {
EXCEPTION_MARK;
const char* name = "Monitor Deflation Thread";
Handle thread_oop = JavaThread::create_system_thread_object(name, false /* not visible */, CHECK);
Handle thread_oop = JavaThread::create_system_thread_object(name, CHECK);
MonitorDeflationThread* thread = new MonitorDeflationThread(&monitor_deflation_thread_entry);
JavaThread::vm_exit_on_osthread_failure(thread);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, 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
@ -39,7 +39,7 @@ void NotificationThread::initialize() {
EXCEPTION_MARK;
const char* name = "Notification Thread";
Handle thread_oop = JavaThread::create_system_thread_object(name, true /* visible */, CHECK);
Handle thread_oop = JavaThread::create_system_thread_object(name, CHECK);
NotificationThread* thread = new NotificationThread(&notification_thread_entry);
JavaThread::vm_exit_on_osthread_failure(thread);

View file

@ -476,7 +476,7 @@ void os::initialize_jdk_signal_support(TRAPS) {
if (!ReduceSignalUsage) {
// Setup JavaThread for processing signals
const char* name = "Signal Dispatcher";
Handle thread_oop = JavaThread::create_system_thread_object(name, true /* visible */, CHECK);
Handle thread_oop = JavaThread::create_system_thread_object(name, CHECK);
JavaThread* thread = new JavaThread(&signal_thread_entry);
JavaThread::vm_exit_on_osthread_failure(thread);

View file

@ -63,7 +63,7 @@ void ServiceThread::initialize() {
EXCEPTION_MARK;
const char* name = "Service Thread";
Handle thread_oop = JavaThread::create_system_thread_object(name, false /* not visible */, CHECK);
Handle thread_oop = JavaThread::create_system_thread_object(name, CHECK);
ServiceThread* thread = new ServiceThread(&service_thread_entry);
JavaThread::vm_exit_on_osthread_failure(thread);

View file

@ -457,7 +457,7 @@ void AttachListener::init() {
EXCEPTION_MARK;
const char* name = "Attach Listener";
Handle thread_oop = JavaThread::create_system_thread_object(name, true /* visible */, THREAD);
Handle thread_oop = JavaThread::create_system_thread_object(name, THREAD);
if (has_init_error(THREAD)) {
set_state(AL_NOT_INITIALIZED);
return;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, 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
@ -42,10 +42,10 @@ static void startTestThread(JavaThread* thread, const char* name) {
// or by an existing JavaTestThread, which is _thread_in_vm.
if (THREAD->thread_state() == _thread_in_native) {
ThreadInVMfromNative tivfn(THREAD);
thread_oop = JavaThread::create_system_thread_object(name, false /* not visible */, CHECK);
thread_oop = JavaThread::create_system_thread_object(name, CHECK);
JavaThread::start_internal_daemon(THREAD, thread, thread_oop, NoPriority);
} else {
thread_oop = JavaThread::create_system_thread_object(name, false /* not visible */, CHECK);
thread_oop = JavaThread::create_system_thread_object(name, CHECK);
JavaThread::start_internal_daemon(THREAD, thread, thread_oop, NoPriority);
}
}