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

@ -221,6 +221,6 @@ void ImplicitExceptionTable::verify(nmethod *nm) const {
for (uint i = 0; i < len(); i++) {
if ((*adr(i) > (unsigned int)nm->code_size()) ||
(*(adr(i)+1) > (unsigned int)nm->code_size()))
fatal1("Invalid offset in ImplicitExceptionTable at %lx", _data);
fatal(err_msg("Invalid offset in ImplicitExceptionTable at " PTR_FORMAT, _data));
}
}

View file

@ -2124,7 +2124,7 @@ void nmethod::verify() {
ResourceMark rm;
if (!CodeCache::contains(this)) {
fatal1("nmethod at " INTPTR_FORMAT " not in zone", this);
fatal(err_msg("nmethod at " INTPTR_FORMAT " not in zone", this));
}
if(is_native_method() )
@ -2132,7 +2132,8 @@ void nmethod::verify() {
nmethod* nm = CodeCache::find_nmethod(verified_entry_point());
if (nm != this) {
fatal1("findNMethod did not find this nmethod (" INTPTR_FORMAT ")", this);
fatal(err_msg("findNMethod did not find this nmethod (" INTPTR_FORMAT ")",
this));
}
for (PcDesc* p = scopes_pcs_begin(); p < scopes_pcs_end(); p++) {

View file

@ -62,7 +62,9 @@ StubQueue::StubQueue(StubInterface* stub_interface, int buffer_size,
Mutex* lock, const char* name) : _mutex(lock) {
intptr_t size = round_to(buffer_size, 2*BytesPerWord);
BufferBlob* blob = BufferBlob::create(name, size);
if( blob == NULL ) vm_exit_out_of_memory1(size, "CodeCache: no room for %s", name);
if( blob == NULL) {
vm_exit_out_of_memory(size, err_msg("CodeCache: no room for %s", name));
}
_stub_interface = stub_interface;
_buffer_size = blob->instructions_size();
_buffer_limit = blob->instructions_size();

View file

@ -45,7 +45,9 @@ void* VtableStub::operator new(size_t size, int code_size) {
if (_chunk == NULL || _chunk + real_size > _chunk_end) {
const int bytes = chunk_factor * real_size + pd_code_alignment();
BufferBlob* blob = BufferBlob::create("vtable chunks", bytes);
if( blob == NULL ) vm_exit_out_of_memory1(bytes, "CodeCache: no room for %s", "vtable chunks");
if (blob == NULL) {
vm_exit_out_of_memory(bytes, "CodeCache: no room for vtable chunks");
}
_chunk = blob->instructions_begin();
_chunk_end = _chunk + bytes;
VTune::register_stub("vtable stub", _chunk, _chunk_end);
@ -189,7 +191,9 @@ extern "C" void bad_compiled_vtable_index(JavaThread* thread, oop receiver, int
instanceKlass* ik = instanceKlass::cast(klass);
klassVtable* vt = ik->vtable();
klass->print();
fatal3("bad compiled vtable dispatch: receiver " INTPTR_FORMAT ", index %d (vtable length %d)", (address)receiver, index, vt->length());
fatal(err_msg("bad compiled vtable dispatch: receiver " INTPTR_FORMAT ", "
"index %d (vtable length %d)",
(address)receiver, index, vt->length()));
}
#endif // Product