--- old/src/os/aix/vm/perfMemory_aix.cpp 2017-04-21 11:47:41.249327300 -0400 +++ new/src/os/aix/vm/perfMemory_aix.cpp 2017-04-21 11:47:40.705327277 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" @@ -1244,15 +1245,10 @@ *addr = mapAddress; *sizep = size; - if (PerfTraceMemOps) { - tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " - INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); - } + log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); } - - - // create the PerfData memory region // // This method creates the memory region used to store performance --- old/src/os/bsd/vm/perfMemory_bsd.cpp 2017-04-21 11:47:45.177327462 -0400 +++ new/src/os/bsd/vm/perfMemory_bsd.cpp 2017-04-21 11:47:43.097327376 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" @@ -1150,15 +1151,10 @@ *addr = mapAddress; *sizep = size; - if (PerfTraceMemOps) { - tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " - INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); - } + log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); } - - - // create the PerfData memory region // // This method creates the memory region used to store performance --- old/src/os/linux/vm/perfMemory_linux.cpp 2017-04-21 11:47:49.289327632 -0400 +++ new/src/os/linux/vm/perfMemory_linux.cpp 2017-04-21 11:47:48.169327586 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" @@ -1166,15 +1167,10 @@ *addr = mapAddress; *sizep = size; - if (PerfTraceMemOps) { - tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " - INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); - } + log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress)); } - - - // create the PerfData memory region // // This method creates the memory region used to store performance --- old/src/os/solaris/vm/perfMemory_solaris.cpp 2017-04-21 11:47:51.265327714 -0400 +++ new/src/os/solaris/vm/perfMemory_solaris.cpp 2017-04-21 11:47:50.729327692 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" @@ -1184,15 +1185,10 @@ *addr = mapAddress; *sizep = size; - if (PerfTraceMemOps) { - tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " - INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress); - } + log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress); } - - - // create the PerfData memory region // // This method creates the memory region used to store performance --- old/src/os/windows/vm/perfMemory_windows.cpp 2017-04-21 11:47:53.553327808 -0400 +++ new/src/os/windows/vm/perfMemory_windows.cpp 2017-04-21 11:47:53.029327787 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/oop.inline.hpp" @@ -1695,10 +1696,8 @@ // invalidating the mapped view of the file CloseHandle(fmh); - if (PerfTraceMemOps) { - tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " - INTPTR_FORMAT "\n", size, vmid, mapAddress); - } + log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, mapAddress); } // this method unmaps the the mapped view of the the --- old/src/share/vm/logging/logTag.hpp 2017-04-21 11:47:55.313327881 -0400 +++ new/src/share/vm/logging/logTag.hpp 2017-04-21 11:47:54.785327859 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -57,6 +57,7 @@ LOG_TAG(cpu) \ LOG_TAG(cset) \ LOG_TAG(data) \ + LOG_TAG(datacreation) \ LOG_TAG(defaultmethods) \ LOG_TAG(dump) \ LOG_TAG(ergo) \ @@ -82,6 +83,7 @@ LOG_TAG(logging) \ LOG_TAG(mark) \ LOG_TAG(marking) \ + LOG_TAG(memops) \ LOG_TAG(methodcomparator) \ LOG_TAG(metadata) \ LOG_TAG(metaspace) \ @@ -98,6 +100,7 @@ LOG_TAG(pagesize) \ LOG_TAG(patch) \ LOG_TAG(path) \ + LOG_TAG(perf) \ LOG_TAG(phases) \ LOG_TAG(plab) \ LOG_TAG(promotion) \ --- old/src/share/vm/runtime/globals.hpp 2017-04-21 11:47:56.949327949 -0400 +++ new/src/share/vm/runtime/globals.hpp 2017-04-21 11:47:56.393327926 -0400 @@ -3811,12 +3811,6 @@ range(PeriodicTask::min_interval, max_jint) \ constraint(PerfDataSamplingIntervalFunc, AfterErgo) \ \ - develop(bool, PerfTraceDataCreation, false, \ - "Trace creation of Performance Data Entries") \ - \ - develop(bool, PerfTraceMemOps, false, \ - "Trace PerfMemory create/attach/detach calls") \ - \ product(bool, PerfDisableSharedMem, false, \ "Store performance data in standard memory") \ \ --- old/src/share/vm/runtime/perfData.cpp 2017-04-21 11:47:58.645328019 -0400 +++ new/src/share/vm/runtime/perfData.cpp 2017-04-21 11:47:58.117327997 -0400 @@ -1,5 +1,5 @@ /* - * 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 @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/vmSymbols.hpp" +#include "logging/log.hpp" #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/java.hpp" @@ -166,17 +167,15 @@ pdep->flags = (jbyte)flags(); pdep->data_offset = (jint) data_start; - if (PerfTraceDataCreation) { - tty->print("name = %s, dtype = %d, variability = %d," - " units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT "," - " pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s," - " address = " INTPTR_FORMAT "," - " data address = " INTPTR_FORMAT "\n", - cname, dtype, variability(), - units(), dsize, vlen, - pad_length, size, is_on_c_heap() ? "TRUE":"FALSE", - p2i(psmp), p2i(valuep)); - } + log_debug(perf, datacreation)("name = %s, dtype = %d, variability = %d," + " units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT "," + " pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s," + " address = " INTPTR_FORMAT "," + " data address = " INTPTR_FORMAT "\n", + cname, dtype, variability(), + units(), dsize, vlen, + pad_length, size, is_on_c_heap() ? "TRUE":"FALSE", + p2i(psmp), p2i(valuep)); // record the start of the entry and the location of the data field. _pdep = pdep; --- old/src/share/vm/runtime/perfMemory.cpp 2017-04-21 11:48:00.453328093 -0400 +++ new/src/share/vm/runtime/perfMemory.cpp 2017-04-21 11:47:59.837328068 -0400 @@ -1,5 +1,5 @@ /* - * 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 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "logging/log.hpp" #include "memory/allocation.inline.hpp" #include "runtime/arguments.hpp" #include "runtime/java.hpp" @@ -92,14 +93,12 @@ size_t capacity = align_size_up(PerfDataMemorySize, os::vm_allocation_granularity()); - if (PerfTraceMemOps) { - tty->print("PerfDataMemorySize = " SIZE_FORMAT "," - " os::vm_allocation_granularity = %d," - " adjusted size = " SIZE_FORMAT "\n", - PerfDataMemorySize, - os::vm_allocation_granularity(), - capacity); - } + 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); @@ -124,12 +123,10 @@ // the PerfMemory region was created as expected. - if (PerfTraceMemOps) { - tty->print("PerfMemory created: address = " INTPTR_FORMAT "," - " size = " SIZE_FORMAT "\n", - p2i(_start), - _capacity); - } + log_debug(perf, memops)("PerfMemory created: address = " INTPTR_FORMAT "," + " size = " SIZE_FORMAT "\n", + p2i(_start), + _capacity); _prologue = (PerfDataPrologue *)_start; _end = _start + _capacity;