27 #include "gc/shared/workerPolicy.hpp" |
27 #include "gc/shared/workerPolicy.hpp" |
28 #include "gc/shenandoah/shenandoahArguments.hpp" |
28 #include "gc/shenandoah/shenandoahArguments.hpp" |
29 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" |
29 #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" |
30 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
30 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
31 #include "gc/shenandoah/shenandoahHeapRegion.hpp" |
31 #include "gc/shenandoah/shenandoahHeapRegion.hpp" |
32 #include "gc/shenandoah/shenandoahTaskqueue.hpp" |
|
33 #include "utilities/defaultStream.hpp" |
32 #include "utilities/defaultStream.hpp" |
34 |
33 |
35 void ShenandoahArguments::initialize() { |
34 void ShenandoahArguments::initialize() { |
36 #if !(defined AARCH64 || defined AMD64 || defined IA32) |
35 #if !(defined AARCH64 || defined AMD64 || defined IA32) |
37 vm_exit_during_initialization("Shenandoah GC is not supported on this platform."); |
36 vm_exit_during_initialization("Shenandoah GC is not supported on this platform."); |
50 FLAG_SET_DEFAULT(ShenandoahStoreValEnqueueBarrier, false); |
49 FLAG_SET_DEFAULT(ShenandoahStoreValEnqueueBarrier, false); |
51 FLAG_SET_DEFAULT(ShenandoahCASBarrier, false); |
50 FLAG_SET_DEFAULT(ShenandoahCASBarrier, false); |
52 FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false); |
51 FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false); |
53 |
52 |
54 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false); |
53 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false); |
55 #endif |
|
56 |
|
57 #ifdef _LP64 |
|
58 // The optimized ObjArrayChunkedTask takes some bits away from the full 64 addressable |
|
59 // bits, fail if we ever attempt to address more than we can. Only valid on 64bit. |
|
60 if (MaxHeapSize >= ObjArrayChunkedTask::max_addressable()) { |
|
61 jio_fprintf(defaultStream::error_stream(), |
|
62 "Shenandoah GC cannot address more than " SIZE_FORMAT " bytes, and " SIZE_FORMAT " bytes heap requested.", |
|
63 ObjArrayChunkedTask::max_addressable(), MaxHeapSize); |
|
64 vm_exit(1); |
|
65 } |
|
66 #endif |
54 #endif |
67 |
55 |
68 if (UseLargePages && (MaxHeapSize / os::large_page_size()) < ShenandoahHeapRegion::MIN_NUM_REGIONS) { |
56 if (UseLargePages && (MaxHeapSize / os::large_page_size()) < ShenandoahHeapRegion::MIN_NUM_REGIONS) { |
69 warning("Large pages size (" SIZE_FORMAT "K) is too large to afford page-sized regions, disabling uncommit", |
57 warning("Large pages size (" SIZE_FORMAT "K) is too large to afford page-sized regions, disabling uncommit", |
70 os::large_page_size() / K); |
58 os::large_page_size() / K); |