changeset 10740:8342931bdc56

8153188: Use log_error(gc, verify) for logging in verification code Reviewed-by: mgerdin, tschatzl
author brutisso
date Fri, 01 Apr 2016 07:08:55 +0200
parents ec619fe64be0
children 1938de5a453a 7e2f9d1f8ec1
files src/share/vm/gc/shared/cardTableModRefBS.cpp src/share/vm/gc/shared/gcLocker.cpp
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/shared/cardTableModRefBS.cpp	Fri Apr 01 07:08:40 2016 +0200
+++ b/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/src/share/vm/gc/shared/gcLocker.cpp	Fri Apr 01 07:08:40 2016 +0200
+++ b/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());
         }
       }
     }