8217343: Shenandoah control thread should be able to run at critical priority
Reviewed-by: rkennke
This commit is contained in:
parent
028cf5ae00
commit
2858e8f4e2
@ -47,7 +47,7 @@ ShenandoahControlThread::ShenandoahControlThread() :
|
||||
_degen_point(ShenandoahHeap::_degenerated_outside_cycle),
|
||||
_allocs_seen(0) {
|
||||
|
||||
create_and_start();
|
||||
create_and_start(ShenandoahCriticalControlThreadPriority ? CriticalPriority : NearMaxPriority);
|
||||
_periodic_task.enroll();
|
||||
_periodic_satb_flush_task.enroll();
|
||||
}
|
||||
|
@ -185,6 +185,9 @@
|
||||
"adjustment. Lower values make adjustments faster, at the " \
|
||||
"expense of higher perf overhead. Time is in milliseconds.") \
|
||||
\
|
||||
experimental(bool, ShenandoahCriticalControlThreadPriority, false, \
|
||||
"Shenandoah control thread runs at critical scheduling priority.")\
|
||||
\
|
||||
diagnostic(bool, ShenandoahVerify, false, \
|
||||
"Verify the Shenandoah garbage collector") \
|
||||
\
|
||||
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test TestCriticalControlThreadPriority
|
||||
* @summary Check that ShenandoahCriticalControlThreadPriority works
|
||||
* @bug 8217343
|
||||
* @key gc
|
||||
* @requires vm.gc.Shenandoah
|
||||
*
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:-ShenandoahCriticalControlThreadPriority -Xmx1g TestCriticalControlThreadPriority
|
||||
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ShenandoahCriticalControlThreadPriority -Xmx1g TestCriticalControlThreadPriority
|
||||
*/
|
||||
|
||||
public class TestCriticalControlThreadPriority {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
// checking the initialization before entering main()
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user