6888954: argument formatting for assert() and friends

Reviewed-by: kvn, twisti, apetrusenko, never, dcubed
This commit is contained in:
John Coomes 2010-04-22 13:23:15 -07:00
parent 7e76feaf42
commit 99196ff9ca
37 changed files with 396 additions and 211 deletions

View file

@ -1288,8 +1288,9 @@ void Monitor::set_owner_implementation(Thread *new_owner) {
!(this == Safepoint_lock && contains(locks, Terminator_lock) &&
SafepointSynchronize::is_synchronizing())) {
new_owner->print_owned_locks();
fatal4("acquiring lock %s/%d out of order with lock %s/%d -- possible deadlock",
this->name(), this->rank(), locks->name(), locks->rank());
fatal(err_msg("acquiring lock %s/%d out of order with lock %s/%d -- "
"possible deadlock", this->name(), this->rank(),
locks->name(), locks->rank()));
}
this->_next = new_owner->_owned_locks;
@ -1342,7 +1343,8 @@ void Monitor::check_prelock_state(Thread *thread) {
|| rank() == Mutex::special, "wrong thread state for using locks");
if (StrictSafepointChecks) {
if (thread->is_VM_thread() && !allow_vm_block()) {
fatal1("VM thread using lock %s (not allowed to block on)", name());
fatal(err_msg("VM thread using lock %s (not allowed to block on)",
name()));
}
debug_only(if (rank() != Mutex::special) \
thread->check_for_valid_safepoint_state(false);)