< prev index next >

src/share/vm/runtime/perfMemory.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -21,10 +21,11 @@
  * questions.
  *
  */
 
 #include "precompiled.hpp"
+#include "logging/log.hpp"
 #include "memory/allocation.inline.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/java.hpp"
 #include "runtime/mutex.hpp"
 #include "runtime/mutexLocker.hpp"

@@ -90,18 +91,16 @@
     return;
 
   size_t capacity = align_size_up(PerfDataMemorySize,
                                   os::vm_allocation_granularity());
 
-  if (PerfTraceMemOps) {
-    tty->print("PerfDataMemorySize = " SIZE_FORMAT ","
+  log_debug(perf, memops)("PerfDataMemorySize = " SIZE_FORMAT ","
                " os::vm_allocation_granularity = %d,"
                " adjusted size = " SIZE_FORMAT "\n",
                PerfDataMemorySize,
                os::vm_allocation_granularity(),
                capacity);
-  }
 
   // allocate PerfData memory region
   create_memory_region(capacity);
 
   if (_start == NULL) {

@@ -122,16 +121,14 @@
   }
   else {
 
     // the PerfMemory region was created as expected.
 
-    if (PerfTraceMemOps) {
-      tty->print("PerfMemory created: address = " INTPTR_FORMAT ","
+    log_debug(perf, memops)("PerfMemory created: address = " INTPTR_FORMAT ","
                  " size = " SIZE_FORMAT "\n",
                  p2i(_start),
                  _capacity);
-    }
 
     _prologue = (PerfDataPrologue *)_start;
     _end = _start + _capacity;
     _top = _start + sizeof(PerfDataPrologue);
   }
< prev index next >