# HG changeset patch # User stefank # Date 1513329478 -3600 # Fri Dec 15 10:17:58 2017 +0100 # Node ID 16e59d1bf503d2aec0db5a6b017a307ac1640270 # Parent b97ac01a1c932f297154f96fa93e7c75567e21ff ZGC: Clean up some platform dependent code in shared directories diff --git a/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp b/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp --- a/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp +++ b/src/hotspot/cpu/x86/c1_Runtime1_x86.cpp @@ -1605,7 +1605,7 @@ case z_load_barrier_on_oop_field_preloaded_id: case z_load_barrier_on_weak_oop_field_preloaded_id: { -#if defined(LINUX) && defined(_LP64) +#if defined(_LP64) StubFrame f(sasm, "load_barrier", dont_gc_arguments); OopMap* map = save_live_registers(sasm, 2); diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -6701,7 +6701,7 @@ movptr(Address(dst, oopDesc::klass_offset_in_bytes()), src); } -#if INCLUDE_ALL_GCS && defined(LINUX) && defined(_LP64) +#if INCLUDE_ALL_GCS && defined(_LP64) void MacroAssembler::load_barrier(Register ref, Address ref_addr, bool expand_call, bool weak) { Label done; @@ -6805,7 +6805,7 @@ void MacroAssembler::load_heap_oop(Register dst, Address src, bool expand_call, bool weak) { #ifdef _LP64 -#if INCLUDE_ALL_GCS && defined(LINUX) +#if INCLUDE_ALL_GCS if (UseLoadBarrier) { load_barrier(dst, src, expand_call, weak); } else diff --git a/src/hotspot/share/gc/z/zLargePages.cpp b/src/hotspot/share/gc/z/zLargePages.cpp --- a/src/hotspot/share/gc/z/zLargePages.cpp +++ b/src/hotspot/share/gc/z/zLargePages.cpp @@ -31,7 +31,7 @@ void ZLargePages::initialize() { initialize_platform(); - log_info(gc, init)("Memory: " SIZE_FORMAT "M", os::physical_memory() / M); + log_info(gc, init)("Memory: " JULONG_FORMAT "M", os::physical_memory() / M); log_info(gc, init)("Large Page Support: %s", to_string()); } diff --git a/src/hotspot/share/gc/z/zMark.cpp b/src/hotspot/share/gc/z/zMark.cpp --- a/src/hotspot/share/gc/z/zMark.cpp +++ b/src/hotspot/share/gc/z/zMark.cpp @@ -524,7 +524,7 @@ ~ZMarkTimeout() { const Tickspan duration = Ticks::now() - _start; - log_debug(gc, marking)("Mark With Timeout (%s): %s, " SIZE_FORMAT " oops, %.3fms", + log_debug(gc, marking)("Mark With Timeout (%s): %s, " UINT64_FORMAT " oops, %.3fms", ZThread::name(), _expired ? "Expired" : "Completed", _check_count, TimeHelper::counter_to_millis(duration.value())); } diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -1069,7 +1069,7 @@ } bool eliminate = (optimizeLoadBarriers && !(val->is_Phi() || val->Opcode() == Op_LoadP || val->Opcode() == Op_GetAndSetP || val->is_DecodeN())) || - can_reshape && (dominating_barrier != NULL || !has_true_uses()); + (can_reshape && (dominating_barrier != NULL || !has_true_uses())); if (eliminate) { if (can_reshape) { diff --git a/test/hotspot/gtest/gc/z/test_zPhysicalMemory.cpp b/test/hotspot/gtest/gc/z/test_zPhysicalMemory.cpp --- a/test/hotspot/gtest/gc/z/test_zPhysicalMemory.cpp +++ b/test/hotspot/gtest/gc/z/test_zPhysicalMemory.cpp @@ -8,7 +8,7 @@ #include "utilities/debug.hpp" #include "unittest.hpp" -#if defined(LINUX) && defined(AMD64) +#if defined(AMD64) TEST(ZPhysicalMemorySegmentTest, split) { const size_t SegmentSize = 2 * M;