< prev index next >

src/share/vm/runtime/handles.cpp

Print this page
rev 9019 : [mq]: format.patch

*** 34,44 **** #ifdef ASSERT oop* HandleArea::allocate_handle(oop obj) { assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark"); assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark"); ! assert(obj->is_oop(), "not an oop: " INTPTR_FORMAT, (intptr_t*) obj); return real_allocate_handle(obj); } Handle::Handle(Thread* thread, oop obj) { assert(thread == Thread::current(), "sanity check"); --- 34,44 ---- #ifdef ASSERT oop* HandleArea::allocate_handle(oop obj) { assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark"); assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark"); ! assert(obj->is_oop(), "not an oop: " INTPTR_FORMAT, p2i(obj)); return real_allocate_handle(obj); } Handle::Handle(Thread* thread, oop obj) { assert(thread == Thread::current(), "sanity check");
*** 83,96 **** } // The thread local handle areas should not get very large if (TraceHandleAllocation && (size_t)handles_visited > TotalHandleAllocationLimit) { #ifdef ASSERT ! warning("%d: Visited in HandleMark : %d", ! _nof_handlemarks, handles_visited); #else ! warning("Visited in HandleMark : %d", handles_visited); #endif } if (_prev != NULL) _prev->oops_do(f); } --- 83,95 ---- } // The thread local handle areas should not get very large if (TraceHandleAllocation && (size_t)handles_visited > TotalHandleAllocationLimit) { #ifdef ASSERT ! warning("%d: Visited in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles_visited); #else ! warning("Visited in HandleMark : " SIZE_FORMAT, handles_visited); #endif } if (_prev != NULL) _prev->oops_do(f); }
*** 135,148 **** handles -= area->_max - area->_hwm; // adjust for last trunk not full } handles /= sizeof(void *); // Adjust for size of a handle if (handles > HandleAllocationLimit) { // Note: _nof_handlemarks is only set in debug mode ! warning("%d: Allocated in HandleMark : %d", _nof_handlemarks, handles); } ! tty->print_cr("Handles %d", handles); } #endif // Delete later chunks if( _chunk->next() ) { --- 134,147 ---- handles -= area->_max - area->_hwm; // adjust for last trunk not full } handles /= sizeof(void *); // Adjust for size of a handle if (handles > HandleAllocationLimit) { // Note: _nof_handlemarks is only set in debug mode ! warning("%d: Allocated in HandleMark : " SIZE_FORMAT, _nof_handlemarks, handles); } ! tty->print_cr("Handles " SIZE_FORMAT, handles); } #endif // Delete later chunks if( _chunk->next() ) {
< prev index next >