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:
Zhengyu Gu 2014-05-01 05:52:28 -07:00
parent a792009a9f
commit 16a3e2f16d
14 changed files with 14 additions and 62 deletions

View file

@ -58,6 +58,9 @@ ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *nex
}
initialize();
create_and_start();
// set name
set_name("G1 Concurrent Refinement Thread#%d", worker_id);
}
void ConcurrentG1RefineThread::initialize() {
@ -247,12 +250,3 @@ void ConcurrentG1RefineThread::stop() {
}
}
void ConcurrentG1RefineThread::print() const {
print_on(tty);
}
void ConcurrentG1RefineThread::print_on(outputStream* st) const {
st->print("\"G1 Concurrent Refinement Thread#%d\" ", _worker_id);
Thread::print_on(st);
st->cr();
}