mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8305936: JavaThread::create_system_thread_object has unused is_visible argument
Reviewed-by: alanb, kbarrett
This commit is contained in:
parent
76cda9f44a
commit
8a1639d49b
9 changed files with 15 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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(¬ification_thread_entry);
|
||||
JavaThread::vm_exit_on_osthread_failure(thread);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue