< prev index next >
src/share/vm/utilities/workgroup.cpp
Print this page
rev 8326 : [mq]: formatstring
@@ -27,12 +27,10 @@
#include "memory/allocation.inline.hpp"
#include "runtime/atomic.inline.hpp"
#include "runtime/os.hpp"
#include "utilities/workgroup.hpp"
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
// Definitions of WorkGang methods.
AbstractWorkGang::AbstractWorkGang(const char* name,
bool are_GC_task_threads,
bool are_ConcurrentGC_threads) :
@@ -153,23 +151,23 @@
// Tell the workers to get to work.
monitor()->notify_all();
// Wait for them to be finished
while (finished_workers() < no_of_parallel_workers) {
if (TraceWorkGang) {
- tty->print_cr("Waiting in work gang %s: %d/%d finished sequence %d",
+ tty->print_cr("Waiting in work gang %s: %u/%u finished sequence %d",
name(), finished_workers(), no_of_parallel_workers,
_sequence_number);
}
monitor()->wait(/* no_safepoint_check */ true);
}
_task = NULL;
if (TraceWorkGang) {
- tty->print_cr("\nFinished work gang %s: %d/%d sequence %d",
+ tty->print_cr("\nFinished work gang %s: %u/%u sequence %d",
name(), finished_workers(), no_of_parallel_workers,
_sequence_number);
Thread* me = Thread::current();
- tty->print_cr(" T: 0x%x VM_thread: %d", me, me->is_VM_thread());
+ tty->print_cr(" T: " PTR_FORMAT " VM_thread: %d", p2i(me), me->is_VM_thread());
}
}
void FlexibleWorkGang::run_task(AbstractGangTask* task) {
// If active_workers() is passed, _finished_workers
@@ -188,11 +186,11 @@
_task = NULL;
_terminate = true;
monitor()->notify_all();
while (finished_workers() < active_workers()) {
if (TraceWorkGang) {
- tty->print_cr("Waiting in work gang %s: %d/%d finished",
+ tty->print_cr("Waiting in work gang %s: %u/%u finished",
name(), finished_workers(), active_workers());
}
monitor()->wait(/* no_safepoint_check */ true);
}
}
@@ -249,11 +247,11 @@
this->record_stack_base_and_size();
this->initialize_named_thread();
assert(_gang != NULL, "No gang to run in");
os::set_priority(this, NearMaxPriority);
if (TraceWorkGang) {
- tty->print_cr("Running gang worker for gang %s id %d",
+ tty->print_cr("Running gang worker for gang %s id %u",
gang()->name(), id());
}
// The VM thread should not execute here because MutexLocker's are used
// as (opposed to MutexLockerEx's).
assert(!Thread::current()->is_VM_thread(), "VM thread should not be part"
@@ -272,11 +270,11 @@
// Wait for something to do.
// Polling outside the while { wait } avoids missed notifies
// in the outer loop.
gang()->internal_worker_poll(&data);
if (TraceWorkGang) {
- tty->print("Polled outside for work in gang %s worker %d",
+ tty->print("Polled outside for work in gang %s worker %u",
gang()->name(), id());
tty->print(" terminate: %s",
data.terminate() ? "true" : "false");
tty->print(" sequence: %d (prev: %d)",
data.sequence_number(), previous_sequence_number);
@@ -306,11 +304,11 @@
}
// Nothing to do.
gang_monitor->wait(/* no_safepoint_check */ true);
gang()->internal_worker_poll(&data);
if (TraceWorkGang) {
- tty->print("Polled inside for work in gang %s worker %d",
+ tty->print("Polled inside for work in gang %s worker %u",
gang()->name(), id());
tty->print(" terminate: %s",
data.terminate() ? "true" : "false");
tty->print(" sequence: %d (prev: %d)",
data.sequence_number(), previous_sequence_number);
@@ -323,18 +321,18 @@
}
}
// Drop gang mutex.
}
if (TraceWorkGang) {
- tty->print("Work for work gang %s id %d task %s part %d",
+ tty->print("Work for work gang %s id %u task %s part %d",
gang()->name(), id(), data.task()->name(), part);
}
assert(data.task() != NULL, "Got null task");
data.task()->work(part);
{
if (TraceWorkGang) {
- tty->print("Finish for work gang %s id %d task %s part %d",
+ tty->print("Finish for work gang %s id %u task %s part %d",
gang()->name(), id(), data.task()->name(), part);
}
// Grab the gang mutex.
MutexLocker ml(gang_monitor);
gang()->internal_note_finish();
< prev index next >