8153188: Use log_error(gc, verify) for logging in verification code
authorbrutisso
Fri, 01 Apr 2016 07:08:55 +0200
changeset 37226 9b0d4b523ce4
parent 37225 ac6c704f9a8c
child 37227 8c40b5b4e525
child 37228 25ea8814a824
8153188: Use log_error(gc, verify) for logging in verification code Reviewed-by: mgerdin, tschatzl
hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp
hotspot/src/share/vm/gc/shared/gcLocker.cpp
--- a/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp	Fri Apr 01 07:08:40 2016 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp	Fri Apr 01 07:08:55 2016 +0200
@@ -500,16 +500,14 @@
     bool failed = (val_equals) ? (curr_val != val) : (curr_val == val);
     if (failed) {
       if (!failures) {
-        tty->cr();
-        tty->print_cr("== CT verification failed: [" INTPTR_FORMAT "," INTPTR_FORMAT "]", p2i(start), p2i(end));
-        tty->print_cr("==   %sexpecting value: %d",
-                      (val_equals) ? "" : "not ", val);
+        log_error(gc, verify)("== CT verification failed: [" INTPTR_FORMAT "," INTPTR_FORMAT "]", p2i(start), p2i(end));
+        log_error(gc, verify)("==   %sexpecting value: %d", (val_equals) ? "" : "not ", val);
         failures = true;
       }
-      tty->print_cr("==   card " PTR_FORMAT " [" PTR_FORMAT "," PTR_FORMAT "], "
-                    "val: %d", p2i(curr), p2i(addr_for(curr)),
-                    p2i((HeapWord*) (((size_t) addr_for(curr)) + card_size)),
-                    (int) curr_val);
+      log_error(gc, verify)("==   card " PTR_FORMAT " [" PTR_FORMAT "," PTR_FORMAT "], val: %d",
+                            p2i(curr), p2i(addr_for(curr)),
+                            p2i((HeapWord*) (((size_t) addr_for(curr)) + card_size)),
+                            (int) curr_val);
     }
   }
   guarantee(!failures, "there should not have been any failures");
--- a/hotspot/src/share/vm/gc/shared/gcLocker.cpp	Fri Apr 01 07:08:40 2016 +0200
+++ b/hotspot/src/share/vm/gc/shared/gcLocker.cpp	Fri Apr 01 07:08:55 2016 +0200
@@ -51,10 +51,10 @@
       }
     }
     if (_jni_lock_count != count) {
-      tty->print_cr("critical counts don't match: %d != %d", _jni_lock_count, count);
+      log_error(gc, verify)("critical counts don't match: %d != %d", _jni_lock_count, count);
       for (JavaThread* thr = Threads::first(); thr; thr = thr->next()) {
         if (thr->in_critical()) {
-          tty->print_cr(INTPTR_FORMAT " in_critical %d", p2i(thr), thr->in_critical());
+          log_error(gc, verify)(INTPTR_FORMAT " in_critical %d", p2i(thr), thr->in_critical());
         }
       }
     }