< prev index next >

src/share/vm/gc/parallel/psPromotionManager.inline.hpp

Print this page

        

@@ -29,10 +29,11 @@
 #include "gc/parallel/psOldGen.hpp"
 #include "gc/parallel/psPromotionLAB.inline.hpp"
 #include "gc/parallel/psPromotionManager.hpp"
 #include "gc/parallel/psScavenge.hpp"
 #include "gc/shared/taskqueue.inline.hpp"
+#include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
 
 inline PSPromotionManager* PSPromotionManager::manager_array(uint index) {
   assert(_manager_array != NULL, "access of NULL manager_array");
   assert(index <= ParallelGCThreads, "out of range manager_array access");

@@ -258,19 +259,13 @@
   } else {
     assert(o->is_forwarded(), "Sanity");
     new_obj = o->forwardee();
   }
 
-#ifndef PRODUCT
-  // This code must come after the CAS test, or it will print incorrect
-  // information.
-  if (TraceScavenge) {
-    gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
+  log_develop(gc, scavenge)("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
        should_scavenge(&new_obj) ? "copying" : "tenuring",
        new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size());
-  }
-#endif
 
   return new_obj;
 }
 
 // Attempt to "claim" oop at p via CAS, push the new obj if successful

@@ -286,13 +281,12 @@
         : copy_to_survivor_space<promote_immediately>(o);
 
 #ifndef PRODUCT
   // This code must come after the CAS test, or it will print incorrect
   // information.
-  if (TraceScavenge &&  o->is_forwarded()) {
-    gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
-       "forwarding",
+  if (o->is_forwarded()) {
+    log_develop(gc, scavenge)("{forwarding %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}",
        new_obj->klass()->internal_name(), p2i((void *)o), p2i((void *)new_obj), new_obj->size());
   }
 #endif
 
   oopDesc::encode_store_heap_oop_not_null(p, new_obj);
< prev index next >