mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6885993: Named Thread: introduce print() and print_on(outputStream* st) methods
Eliminating duplicated code by introducing print_on(outputStream* st) methods in NamedThread Reviewed-by: twisti, coleenp, dholmes
This commit is contained in:
parent
a792009a9f
commit
16a3e2f16d
14 changed files with 14 additions and 62 deletions
|
@ -46,6 +46,8 @@ ConcurrentMarkThread::ConcurrentMarkThread(ConcurrentMark* cm) :
|
|||
_in_progress(false),
|
||||
_vtime_accum(0.0),
|
||||
_vtime_mark_accum(0.0) {
|
||||
|
||||
set_name("G1 Main Concurrent Mark GC Thread");
|
||||
create_and_start();
|
||||
}
|
||||
|
||||
|
@ -322,16 +324,6 @@ void ConcurrentMarkThread::stop() {
|
|||
}
|
||||
}
|
||||
|
||||
void ConcurrentMarkThread::print() const {
|
||||
print_on(tty);
|
||||
}
|
||||
|
||||
void ConcurrentMarkThread::print_on(outputStream* st) const {
|
||||
st->print("\"G1 Main Concurrent Mark GC Thread\" ");
|
||||
Thread::print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
|
||||
void ConcurrentMarkThread::sleepBeforeNextCycle() {
|
||||
// We join here because we don't want to do the "shouldConcurrentMark()"
|
||||
// below while the world is otherwise stopped.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue