--- old/src/hotspot/os/bsd/gc/z/zPhysicalMemoryBacking_bsd.cpp 2020-06-03 10:15:54.000000000 +0200 +++ new/src/hotspot/os/bsd/gc/z/zPhysicalMemoryBacking_bsd.cpp 2020-06-03 10:15:53.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zErrno.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zLargePages.inline.hpp" @@ -81,7 +82,7 @@ _base = (uintptr_t)os::reserve_memory(MaxHeapSize); if (_base == 0) { // Failed - log_error(gc)("Failed to reserve address space for backing memory"); + log_error_p(gc)("Failed to reserve address space for backing memory"); return; } --- old/src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp 2020-06-03 10:15:54.000000000 +0200 +++ new/src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp 2020-06-03 10:15:54.000000000 +0200 @@ -22,11 +22,11 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zArray.inline.hpp" #include "gc/z/zErrno.hpp" #include "gc/z/zMountPoint_linux.hpp" #include "runtime/globals.hpp" -#include "logging/log.hpp" #include #include @@ -73,7 +73,7 @@ FILE* fd = fopen(PROC_SELF_MOUNTINFO, "r"); if (fd == NULL) { ZErrno err; - log_error(gc)("Failed to open %s: %s", PROC_SELF_MOUNTINFO, err.to_string()); + log_error_p(gc)("Failed to open %s: %s", PROC_SELF_MOUNTINFO, err.to_string()); return; } @@ -114,10 +114,10 @@ } // Preferred mount point not found - log_error(gc)("More than one %s filesystem found:", filesystem); + log_error_p(gc)("More than one %s filesystem found:", filesystem); ZArrayIterator iter2(mountpoints); for (char* mountpoint; iter2.next(&mountpoint);) { - log_error(gc)(" %s", mountpoint); + log_error_p(gc)(" %s", mountpoint); } return NULL; @@ -131,7 +131,7 @@ if (mountpoints.size() == 0) { // No mount point found - log_error(gc)("Failed to find an accessible %s filesystem", filesystem); + log_error_p(gc)("Failed to find an accessible %s filesystem", filesystem); } else if (mountpoints.size() == 1) { // One mount point found path = strdup(mountpoints.at(0)); --- old/src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp 2020-06-03 10:15:55.000000000 +0200 +++ new/src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp 2020-06-03 10:15:54.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zArray.inline.hpp" #include "gc/z/zErrno.hpp" #include "gc/z/zGlobals.hpp" @@ -130,7 +131,7 @@ struct statfs buf; if (fstatfs(_fd, &buf) == -1) { ZErrno err; - log_error(gc)("Failed to determine filesystem type for backing file (%s)", err.to_string()); + log_error_p(gc)("Failed to determine filesystem type for backing file (%s)", err.to_string()); return; } @@ -138,50 +139,50 @@ _block_size = buf.f_bsize; _available = buf.f_bavail * _block_size; - log_info(gc, init)("Heap Backing Filesystem: %s (0x" UINT64_FORMAT_X ")", - is_tmpfs() ? ZFILESYSTEM_TMPFS : is_hugetlbfs() ? ZFILESYSTEM_HUGETLBFS : "other", _filesystem); + log_info_p(gc, init)("Heap Backing Filesystem: %s (0x" UINT64_FORMAT_X ")", + is_tmpfs() ? ZFILESYSTEM_TMPFS : is_hugetlbfs() ? ZFILESYSTEM_HUGETLBFS : "other", _filesystem); // Make sure the filesystem type matches requested large page type if (ZLargePages::is_transparent() && !is_tmpfs()) { - log_error(gc)("-XX:+UseTransparentHugePages can only be enabled when using a %s filesystem", - ZFILESYSTEM_TMPFS); + log_error_p(gc)("-XX:+UseTransparentHugePages can only be enabled when using a %s filesystem", + ZFILESYSTEM_TMPFS); return; } if (ZLargePages::is_transparent() && !tmpfs_supports_transparent_huge_pages()) { - log_error(gc)("-XX:+UseTransparentHugePages on a %s filesystem not supported by kernel", - ZFILESYSTEM_TMPFS); + log_error_p(gc)("-XX:+UseTransparentHugePages on a %s filesystem not supported by kernel", + ZFILESYSTEM_TMPFS); return; } if (ZLargePages::is_explicit() && !is_hugetlbfs()) { - log_error(gc)("-XX:+UseLargePages (without -XX:+UseTransparentHugePages) can only be enabled " - "when using a %s filesystem", ZFILESYSTEM_HUGETLBFS); + log_error_p(gc)("-XX:+UseLargePages (without -XX:+UseTransparentHugePages) can only be enabled " + "when using a %s filesystem", ZFILESYSTEM_HUGETLBFS); return; } if (!ZLargePages::is_explicit() && is_hugetlbfs()) { - log_error(gc)("-XX:+UseLargePages must be enabled when using a %s filesystem", - ZFILESYSTEM_HUGETLBFS); + log_error_p(gc)("-XX:+UseLargePages must be enabled when using a %s filesystem", + ZFILESYSTEM_HUGETLBFS); return; } if (ZLargePages::is_explicit() && os::large_page_size() != ZGranuleSize) { - log_error(gc)("Incompatible large page size configured " SIZE_FORMAT " (expected " SIZE_FORMAT ")", - os::large_page_size(), ZGranuleSize); + log_error_p(gc)("Incompatible large page size configured " SIZE_FORMAT " (expected " SIZE_FORMAT ")", + os::large_page_size(), ZGranuleSize); return; } // Make sure the filesystem block size is compatible if (ZGranuleSize % _block_size != 0) { - log_error(gc)("Filesystem backing the heap has incompatible block size (" SIZE_FORMAT ")", - _block_size); + log_error_p(gc)("Filesystem backing the heap has incompatible block size (" SIZE_FORMAT ")", + _block_size); return; } if (is_hugetlbfs() && _block_size != ZGranuleSize) { - log_error(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")", - ZFILESYSTEM_HUGETLBFS, _block_size, ZGranuleSize); + log_error_p(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")", + ZFILESYSTEM_HUGETLBFS, _block_size, ZGranuleSize); return; } @@ -199,12 +200,12 @@ const int fd = ZSyscall::memfd_create(filename, MFD_CLOEXEC | extra_flags); if (fd == -1) { ZErrno err; - log_debug(gc, init)("Failed to create memfd file (%s)", - ((ZLargePages::is_explicit() && err == EINVAL) ? "Hugepages not supported" : err.to_string())); + log_debug_p(gc, init)("Failed to create memfd file (%s)", + ((ZLargePages::is_explicit() && err == EINVAL) ? "Hugepages not supported" : err.to_string())); return -1; } - log_info(gc, init)("Heap Backing File: /memfd:%s", filename); + log_info_p(gc, init)("Heap Backing File: /memfd:%s", filename); return fd; } @@ -220,7 +221,7 @@ // Find mountpoint ZMountPoint mountpoint(filesystem, preferred_mountpoints); if (mountpoint.get() == NULL) { - log_error(gc)("Use -XX:AllocateHeapAt to specify the path to a %s filesystem", filesystem); + log_error_p(gc)("Use -XX:AllocateHeapAt to specify the path to a %s filesystem", filesystem); return -1; } @@ -229,23 +230,23 @@ const int fd_anon = os::open(mountpoint.get(), O_TMPFILE|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); if (fd_anon == -1) { ZErrno err; - log_debug(gc, init)("Failed to create anonymous file in %s (%s)", mountpoint.get(), - (err == EINVAL ? "Not supported" : err.to_string())); + log_debug_p(gc, init)("Failed to create anonymous file in %s (%s)", mountpoint.get(), + (err == EINVAL ? "Not supported" : err.to_string())); } else { // Get inode number for anonymous file struct stat stat_buf; if (fstat(fd_anon, &stat_buf) == -1) { ZErrno err; - log_error(gc)("Failed to determine inode number for anonymous file (%s)", err.to_string()); + log_error_p(gc)("Failed to determine inode number for anonymous file (%s)", err.to_string()); return -1; } - log_info(gc, init)("Heap Backing File: %s/#" UINT64_FORMAT, mountpoint.get(), (uint64_t)stat_buf.st_ino); + log_info_p(gc, init)("Heap Backing File: %s/#" UINT64_FORMAT, mountpoint.get(), (uint64_t)stat_buf.st_ino); return fd_anon; } - log_debug(gc, init)("Falling back to open/unlink"); + log_debug_p(gc, init)("Falling back to open/unlink"); // Create file name char filename[PATH_MAX]; @@ -255,18 +256,18 @@ const int fd = os::open(filename, O_CREAT|O_EXCL|O_RDWR|O_CLOEXEC, S_IRUSR|S_IWUSR); if (fd == -1) { ZErrno err; - log_error(gc)("Failed to create file %s (%s)", filename, err.to_string()); + log_error_p(gc)("Failed to create file %s (%s)", filename, err.to_string()); return -1; } // Unlink file if (unlink(filename) == -1) { ZErrno err; - log_error(gc)("Failed to unlink file %s (%s)", filename, err.to_string()); + log_error_p(gc)("Failed to unlink file %s (%s)", filename, err.to_string()); return -1; } - log_info(gc, init)("Heap Backing File: %s", filename); + log_info_p(gc, init)("Heap Backing File: %s", filename); return fd; } @@ -283,7 +284,7 @@ return fd; } - log_debug(gc, init)("Falling back to searching for an accessible mount point"); + log_debug_p(gc)("Falling back to searching for an accessible mount point"); } return create_file_fd(name); @@ -298,23 +299,23 @@ // will be zero if no size limit was specified when it was mounted. if (_available == 0) { // No size limit set, skip check - log_info(gc, init)("Available space on backing filesystem: N/A"); + log_info_p(gc, init)("Available space on backing filesystem: N/A"); return; } - log_info(gc, init)("Available space on backing filesystem: " SIZE_FORMAT "M", _available / M); + log_info_p(gc, init)("Available space on backing filesystem: " SIZE_FORMAT "M", _available / M); // Warn if the filesystem doesn't currently have enough space available to hold // the max heap size. The max heap size will be capped if we later hit this limit // when trying to expand the heap. if (_available < max) { - log_warning(gc)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****"); - log_warning(gc)("Not enough space available on the backing filesystem to hold the current max Java heap"); - log_warning(gc)("size (" SIZE_FORMAT "M). Please adjust the size of the backing filesystem accordingly " + log_warning_p(gc)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****"); + log_warning_p(gc)("Not enough space available on the backing filesystem to hold the current max Java heap"); + log_warning_p(gc)("size (" SIZE_FORMAT "M). Please adjust the size of the backing filesystem accordingly " "(available", max / M); - log_warning(gc)("space is currently " SIZE_FORMAT "M). Continuing execution with the current filesystem " + log_warning_p(gc)("space is currently " SIZE_FORMAT "M). Continuing execution with the current filesystem " "size could", _available / M); - log_warning(gc)("lead to a premature OutOfMemoryError being thrown, due to failure to map memory."); + log_warning_p(gc)("lead to a premature OutOfMemoryError being thrown, due to failure to map memory."); } } @@ -323,7 +324,7 @@ FILE* const file = fopen(filename, "r"); if (file == NULL) { // Failed to open file, skip check - log_debug(gc, init)("Failed to open %s", filename); + log_debug_p(gc, init)("Failed to open %s", filename); return; } @@ -332,7 +333,7 @@ fclose(file); if (result != 1) { // Failed to read file, skip check - log_debug(gc, init)("Failed to read %s", filename); + log_debug_p(gc, init)("Failed to read %s", filename); return; } @@ -343,13 +344,13 @@ // We speculate that we need another 20% to allow for non-ZGC subsystems to map memory. const size_t required_max_map_count = (max / ZGranuleSize) * 3 * 1.2; if (actual_max_map_count < required_max_map_count) { - log_warning(gc)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****"); - log_warning(gc)("The system limit on number of memory mappings per process might be too low for the given"); - log_warning(gc)("max Java heap size (" SIZE_FORMAT "M). Please adjust %s to allow for at", + log_warning_p(gc)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****"); + log_warning_p(gc)("The system limit on number of memory mappings per process might be too low for the given"); + log_warning_p(gc)("max Java heap size (" SIZE_FORMAT "M). Please adjust %s to allow for at", max / M, filename); - log_warning(gc)("least " SIZE_FORMAT " mappings (current limit is " SIZE_FORMAT "). Continuing execution " + log_warning_p(gc)("least " SIZE_FORMAT " mappings (current limit is " SIZE_FORMAT "). Continuing execution " "with the current", required_max_map_count, actual_max_map_count); - log_warning(gc)("limit could lead to a fatal error, due to failure to map memory."); + log_warning_p(gc)("limit could lead to a fatal error, due to failure to map memory."); } } @@ -564,7 +565,7 @@ } // Not supported - log_debug(gc)("Falling back to fallocate() compatibility mode"); + log_debug_p(gc)("Falling back to fallocate() compatibility mode"); z_fallocate_supported = false; } @@ -645,7 +646,7 @@ // will fail, since there is a delay between process termination and the // huge pages owned by that process being returned to the huge page pool // and made available for new allocations. - log_debug(gc, init)("Failed to commit memory (%s), retrying", err.to_string()); + log_debug_p(gc, init)("Failed to commit memory (%s), retrying", err.to_string()); // Wait and retry in one second, in the hope that huge pages will be // available by then. @@ -654,7 +655,7 @@ } // Failed - log_error(gc)("Failed to commit memory (%s)", err.to_string()); + log_error_p(gc)("Failed to commit memory (%s)", err.to_string()); return false; } --- old/src/hotspot/os/windows/gc/z/zSyscall_windows.cpp 2020-06-03 10:15:55.000000000 +0200 +++ new/src/hotspot/os/windows/gc/z/zSyscall_windows.cpp 2020-06-03 10:15:55.000000000 +0200 @@ -22,8 +22,8 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zSyscall_windows.hpp" -#include "logging/log.hpp" #include "runtime/java.hpp" #include "runtime/os.hpp" @@ -38,13 +38,13 @@ char ebuf[1024]; void* const handle = os::dll_load(library, ebuf, sizeof(ebuf)); if (handle == NULL) { - log_error(gc)("Failed to load library: %s", library); + log_error_p(gc)("Failed to load library: %s", library); vm_exit_during_initialization("ZGC requires Windows version 1803 or later"); } fn = reinterpret_cast(os::dll_lookup(handle, symbol)); if (fn == NULL) { - log_error(gc)("Failed to lookup symbol: %s", symbol); + log_error_p(gc)("Failed to lookup symbol: %s", symbol); vm_exit_during_initialization("ZGC requires Windows version 1803 or later"); } } --- old/src/hotspot/share/gc/z/zCPU.cpp 2020-06-03 10:15:56.000000000 +0200 +++ new/src/hotspot/share/gc/z/zCPU.cpp 2020-06-03 10:15:55.000000000 +0200 @@ -22,8 +22,8 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zCPU.inline.hpp" -#include "logging/log.hpp" #include "memory/padded.inline.hpp" #include "runtime/os.hpp" #include "runtime/thread.inline.hpp" @@ -46,9 +46,9 @@ _affinity[i]._thread = ZCPU_UNKNOWN_AFFINITY; } - log_info(gc, init)("CPUs: %u total, %u available", - os::processor_count(), - os::initial_active_processor_count()); + log_info_p(gc, init)("CPUs: %u total, %u available", + os::processor_count(), + os::initial_active_processor_count()); } uint32_t ZCPU::id_slow() { --- old/src/hotspot/share/gc/z/zHeuristics.cpp 2020-06-03 10:15:56.000000000 +0200 +++ new/src/hotspot/share/gc/z/zHeuristics.cpp 2020-06-03 10:15:56.000000000 +0200 @@ -22,10 +22,10 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zCPU.inline.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zHeuristics.hpp" -#include "logging/log.hpp" #include "runtime/globals.hpp" #include "runtime/os.hpp" #include "utilities/globalDefinitions.hpp" @@ -50,9 +50,9 @@ ZObjectAlignmentMediumShift = (int)ZPageSizeMediumShift - 13; ZObjectAlignmentMedium = 1 << ZObjectAlignmentMediumShift; - log_info(gc, init)("Medium Page Size: " SIZE_FORMAT "M", ZPageSizeMedium / M); + log_info_p(gc, init)("Medium Page Size: " SIZE_FORMAT "M", ZPageSizeMedium / M); } else { - log_info(gc, init)("Medium Page Size: N/A"); + log_info_p(gc, init)("Medium Page Size: N/A"); } } --- old/src/hotspot/share/gc/z/zLargePages.cpp 2020-06-03 10:15:57.000000000 +0200 +++ new/src/hotspot/share/gc/z/zLargePages.cpp 2020-06-03 10:15:56.000000000 +0200 @@ -22,8 +22,8 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zLargePages.hpp" -#include "logging/log.hpp" #include "runtime/os.hpp" ZLargePages::State ZLargePages::_state; @@ -31,8 +31,8 @@ void ZLargePages::initialize() { initialize_platform(); - log_info(gc, init)("Memory: " JULONG_FORMAT "M", os::physical_memory() / M); - log_info(gc, init)("Large Page Support: %s", to_string()); + log_info_p(gc, init)("Memory: " JULONG_FORMAT "M", os::physical_memory() / M); + log_info_p(gc, init)("Large Page Support: %s", to_string()); } const char* ZLargePages::to_string() { --- old/src/hotspot/share/gc/z/zMarkStackAllocator.cpp 2020-06-03 10:15:57.000000000 +0200 +++ new/src/hotspot/share/gc/z/zMarkStackAllocator.cpp 2020-06-03 10:15:57.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zLock.inline.hpp" #include "gc/z/zMarkStack.inline.hpp" #include "gc/z/zMarkStackAllocator.hpp" @@ -44,7 +45,7 @@ const size_t alignment = (size_t)os::vm_allocation_granularity(); const uintptr_t addr = (uintptr_t)os::reserve_memory(size, NULL, alignment, mtGC); if (addr == 0) { - log_error(gc, marking)("Failed to reserve address space for mark stacks"); + log_error_p(gc, marking)("Failed to reserve address space for mark stacks"); return; } --- old/src/hotspot/share/gc/z/zNUMA.cpp 2020-06-03 10:15:58.000000000 +0200 +++ new/src/hotspot/share/gc/z/zNUMA.cpp 2020-06-03 10:15:57.000000000 +0200 @@ -22,17 +22,17 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zNUMA.hpp" -#include "logging/log.hpp" bool ZNUMA::_enabled; void ZNUMA::initialize() { initialize_platform(); - log_info(gc, init)("NUMA Support: %s", to_string()); + log_info_p(gc, init)("NUMA Support: %s", to_string()); if (_enabled) { - log_info(gc, init)("NUMA Nodes: %u", count()); + log_info_p(gc, init)("NUMA Nodes: %u", count()); } } --- old/src/hotspot/share/gc/z/zPageAllocator.cpp 2020-06-03 10:15:58.000000000 +0200 +++ new/src/hotspot/share/gc/z/zPageAllocator.cpp 2020-06-03 10:15:58.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/shared/suspendibleThreadSet.hpp" #include "gc/z/zAddress.inline.hpp" #include "gc/z/zCollectedHeap.hpp" @@ -127,11 +128,11 @@ return; } - log_info(gc, init)("Min Capacity: " SIZE_FORMAT "M", min_capacity / M); - log_info(gc, init)("Initial Capacity: " SIZE_FORMAT "M", initial_capacity / M); - log_info(gc, init)("Max Capacity: " SIZE_FORMAT "M", max_capacity / M); - log_info(gc, init)("Max Reserve: " SIZE_FORMAT "M", max_reserve / M); - log_info(gc, init)("Pre-touch: %s", AlwaysPreTouch ? "Enabled" : "Disabled"); + log_info_p(gc, init)("Min Capacity: " SIZE_FORMAT "M", min_capacity / M); + log_info_p(gc, init)("Initial Capacity: " SIZE_FORMAT "M", initial_capacity / M); + log_info_p(gc, init)("Max Capacity: " SIZE_FORMAT "M", max_capacity / M); + log_info_p(gc, init)("Max Reserve: " SIZE_FORMAT "M", max_reserve / M); + log_info_p(gc, init)("Pre-touch: %s", AlwaysPreTouch ? "Enabled" : "Disabled"); // Warn if system limits could stop us from reaching max capacity _physical.warn_commit_limits(max_capacity); @@ -139,7 +140,7 @@ // Commit initial capacity _capacity = _physical.commit(initial_capacity); if (_capacity != initial_capacity) { - log_error(gc)("Failed to allocate initial Java heap (" SIZE_FORMAT "M)", initial_capacity / M); + log_error_p(gc)("Failed to allocate initial Java heap (" SIZE_FORMAT "M)", initial_capacity / M); return; } @@ -380,10 +381,10 @@ if (committed != commit) { // Failed, or partly failed, to increase capacity. Adjust current // max capacity to avoid further attempts to increase capacity. - log_error(gc)("Forced to lower max Java heap size from " - SIZE_FORMAT "M(%.0f%%) to " SIZE_FORMAT "M(%.0f%%)", - _current_max_capacity / M, percent_of(_current_max_capacity, _max_capacity), - _capacity / M, percent_of(_capacity, _max_capacity)); + log_error_p(gc)("Forced to lower max Java heap size from " + SIZE_FORMAT "M(%.0f%%) to " SIZE_FORMAT "M(%.0f%%)", + _current_max_capacity / M, percent_of(_current_max_capacity, _max_capacity), + _capacity / M, percent_of(_capacity, _max_capacity)); _current_max_capacity = _capacity; } --- old/src/hotspot/share/gc/z/zRuntimeWorkers.cpp 2020-06-03 10:15:59.000000000 +0200 +++ new/src/hotspot/share/gc/z/zRuntimeWorkers.cpp 2020-06-03 10:15:59.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/shared/workgroup.hpp" #include "gc/z/zRuntimeWorkers.hpp" #include "gc/z/zThread.hpp" @@ -66,7 +67,7 @@ false /* are_GC_task_threads */, false /* are_ConcurrentGC_threads */) { - log_info(gc, init)("Runtime Workers: %u parallel", nworkers()); + log_info_p(gc, init)("Runtime Workers: %u parallel", nworkers()); // Initialize worker threads _workers.initialize_workers(); --- old/src/hotspot/share/gc/z/zVirtualMemory.cpp 2020-06-03 10:15:59.000000000 +0200 +++ new/src/hotspot/share/gc/z/zVirtualMemory.cpp 2020-06-03 10:15:59.000000000 +0200 @@ -22,10 +22,10 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zAddressSpaceLimit.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zVirtualMemory.inline.hpp" -#include "logging/log.hpp" #include "services/memTracker.hpp" #include "utilities/debug.hpp" #include "utilities/align.hpp" @@ -36,14 +36,14 @@ // Check max supported heap size if (max_capacity > ZAddressOffsetMax) { - log_error(gc)("Java heap too large (max supported heap size is " SIZE_FORMAT "G)", - ZAddressOffsetMax / G); + log_error_p(gc)("Java heap too large (max supported heap size is " SIZE_FORMAT "G)", + ZAddressOffsetMax / G); return; } // Reserve address space if (!reserve(max_capacity)) { - log_error(gc)("Failed to reserve enough address space for Java heap"); + log_error_p(gc)("Failed to reserve enough address space for Java heap"); return; } @@ -132,12 +132,12 @@ contiguous = false; } - log_info(gc, init)("Address Space Type: %s/%s/%s", - (contiguous ? "Contiguous" : "Discontiguous"), - (limit == ZAddressOffsetMax ? "Unrestricted" : "Restricted"), - (reserved == size ? "Complete" : "Degraded")); - log_info(gc, init)("Address Space Size: " SIZE_FORMAT "M x " SIZE_FORMAT " = " SIZE_FORMAT "M", - reserved / M, ZHeapViews, (reserved * ZHeapViews) / M); + log_info_p(gc, init)("Address Space Type: %s/%s/%s", + (contiguous ? "Contiguous" : "Discontiguous"), + (limit == ZAddressOffsetMax ? "Unrestricted" : "Restricted"), + (reserved == size ? "Complete" : "Degraded")); + log_info_p(gc, init)("Address Space Size: " SIZE_FORMAT "M x " SIZE_FORMAT " = " SIZE_FORMAT "M", + reserved / M, ZHeapViews, (reserved * ZHeapViews) / M); return reserved >= max_capacity; } --- old/src/hotspot/share/gc/z/zWorkers.cpp 2020-06-03 10:16:00.000000000 +0200 +++ new/src/hotspot/share/gc/z/zWorkers.cpp 2020-06-03 10:16:00.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/gcLogPrecious.hpp" #include "gc/z/zGlobals.hpp" #include "gc/z/zTask.hpp" #include "gc/z/zThread.hpp" @@ -69,7 +70,7 @@ true /* are_GC_task_threads */, true /* are_ConcurrentGC_threads */) { - log_info(gc, init)("Workers: %u parallel, %u concurrent", nparallel(), nconcurrent()); + log_info_p(gc, init)("Workers: %u parallel, %u concurrent", nparallel(), nconcurrent()); // Initialize worker threads _workers.initialize_workers();