< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.hpp

Print this page
rev 8978 : imported patch remove_err_msg

*** 366,430 **** void trace_heap(GCWhen::Type when, const GCTracer* tracer); // These are macros so that, if the assert fires, we get the correct // line number, file, etc. ! #define heap_locking_asserts_err_msg(_extra_message_) \ ! err_msg("%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s", \ (_extra_message_), \ BOOL_TO_STR(Heap_lock->owned_by_self()), \ BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()), \ ! BOOL_TO_STR(Thread::current()->is_VM_thread())) #define assert_heap_locked() \ do { \ assert(Heap_lock->owned_by_self(), \ ! heap_locking_asserts_err_msg("should be holding the Heap_lock")); \ } while (0) #define assert_heap_locked_or_at_safepoint(_should_be_vm_thread_) \ do { \ assert(Heap_lock->owned_by_self() || \ (SafepointSynchronize::is_at_safepoint() && \ ((_should_be_vm_thread_) == Thread::current()->is_VM_thread())), \ ! heap_locking_asserts_err_msg("should be holding the Heap_lock or " \ "should be at a safepoint")); \ } while (0) #define assert_heap_locked_and_not_at_safepoint() \ do { \ assert(Heap_lock->owned_by_self() && \ !SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_err_msg("should be holding the Heap_lock and " \ "should not be at a safepoint")); \ } while (0) #define assert_heap_not_locked() \ do { \ assert(!Heap_lock->owned_by_self(), \ ! heap_locking_asserts_err_msg("should not be holding the Heap_lock")); \ } while (0) #define assert_heap_not_locked_and_not_at_safepoint() \ do { \ assert(!Heap_lock->owned_by_self() && \ !SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_err_msg("should not be holding the Heap_lock and " \ "should not be at a safepoint")); \ } while (0) #define assert_at_safepoint(_should_be_vm_thread_) \ do { \ assert(SafepointSynchronize::is_at_safepoint() && \ ((_should_be_vm_thread_) == Thread::current()->is_VM_thread()), \ ! heap_locking_asserts_err_msg("should be at a safepoint")); \ } while (0) #define assert_not_at_safepoint() \ do { \ assert(!SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_err_msg("should not be at a safepoint")); \ } while (0) protected: // The young region list. --- 366,430 ---- void trace_heap(GCWhen::Type when, const GCTracer* tracer); // These are macros so that, if the assert fires, we get the correct // line number, file, etc. ! #define heap_locking_asserts_params(_extra_message_) \ ! "%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s", \ (_extra_message_), \ BOOL_TO_STR(Heap_lock->owned_by_self()), \ BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()), \ ! BOOL_TO_STR(Thread::current()->is_VM_thread()) #define assert_heap_locked() \ do { \ assert(Heap_lock->owned_by_self(), \ ! heap_locking_asserts_params("should be holding the Heap_lock")); \ } while (0) #define assert_heap_locked_or_at_safepoint(_should_be_vm_thread_) \ do { \ assert(Heap_lock->owned_by_self() || \ (SafepointSynchronize::is_at_safepoint() && \ ((_should_be_vm_thread_) == Thread::current()->is_VM_thread())), \ ! heap_locking_asserts_params("should be holding the Heap_lock or " \ "should be at a safepoint")); \ } while (0) #define assert_heap_locked_and_not_at_safepoint() \ do { \ assert(Heap_lock->owned_by_self() && \ !SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_params("should be holding the Heap_lock and " \ "should not be at a safepoint")); \ } while (0) #define assert_heap_not_locked() \ do { \ assert(!Heap_lock->owned_by_self(), \ ! heap_locking_asserts_params("should not be holding the Heap_lock")); \ } while (0) #define assert_heap_not_locked_and_not_at_safepoint() \ do { \ assert(!Heap_lock->owned_by_self() && \ !SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_params("should not be holding the Heap_lock and " \ "should not be at a safepoint")); \ } while (0) #define assert_at_safepoint(_should_be_vm_thread_) \ do { \ assert(SafepointSynchronize::is_at_safepoint() && \ ((_should_be_vm_thread_) == Thread::current()->is_VM_thread()), \ ! heap_locking_asserts_params("should be at a safepoint")); \ } while (0) #define assert_not_at_safepoint() \ do { \ assert(!SafepointSynchronize::is_at_safepoint(), \ ! heap_locking_asserts_params("should not be at a safepoint")); \ } while (0) protected: // The young region list.
< prev index next >