Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 8001:db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
Summary: Rename INCLUDE_ALTERNATE_GCS to INCLUDE_ALL_GCS and replace SERIALGC with INCLUDE_ALL_GCS.
Reviewed-by: coleenp, stefank
author | jprovino |
---|---|
date | Wed, 23 Jan 2013 13:02:39 -0500 |
parents | f1c06dcee0b5 |
children | 8391fdd36e1f |
comparison
equal
deleted
inserted
replaced
7619:46e60405583b | 8001:db9981fd3124 |
---|---|
36 #include "runtime/globals_extension.hpp" | 36 #include "runtime/globals_extension.hpp" |
37 #include "runtime/java.hpp" | 37 #include "runtime/java.hpp" |
38 #include "services/management.hpp" | 38 #include "services/management.hpp" |
39 #include "services/memTracker.hpp" | 39 #include "services/memTracker.hpp" |
40 #include "utilities/defaultStream.hpp" | 40 #include "utilities/defaultStream.hpp" |
41 #include "utilities/macros.hpp" | |
41 #include "utilities/taskqueue.hpp" | 42 #include "utilities/taskqueue.hpp" |
42 #ifdef TARGET_OS_FAMILY_linux | 43 #ifdef TARGET_OS_FAMILY_linux |
43 # include "os_linux.inline.hpp" | 44 # include "os_linux.inline.hpp" |
44 #endif | 45 #endif |
45 #ifdef TARGET_OS_FAMILY_solaris | 46 #ifdef TARGET_OS_FAMILY_solaris |
49 # include "os_windows.inline.hpp" | 50 # include "os_windows.inline.hpp" |
50 #endif | 51 #endif |
51 #ifdef TARGET_OS_FAMILY_bsd | 52 #ifdef TARGET_OS_FAMILY_bsd |
52 # include "os_bsd.inline.hpp" | 53 # include "os_bsd.inline.hpp" |
53 #endif | 54 #endif |
54 #ifndef SERIALGC | 55 #if INCLUDE_ALL_GCS |
55 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" | 56 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" |
56 #endif | 57 #endif // INCLUDE_ALL_GCS |
57 | 58 |
58 // Note: This is a special bug reporting site for the JVM | 59 // Note: This is a special bug reporting site for the JVM |
59 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp" | 60 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/crash.jsp" |
60 #define DEFAULT_JAVA_LAUNCHER "generic" | 61 #define DEFAULT_JAVA_LAUNCHER "generic" |
61 | 62 |
1070 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { | 1071 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { |
1071 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); | 1072 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); |
1072 } | 1073 } |
1073 } | 1074 } |
1074 | 1075 |
1075 #if INCLUDE_ALTERNATE_GCS | 1076 #if INCLUDE_ALL_GCS |
1076 static void disable_adaptive_size_policy(const char* collector_name) { | 1077 static void disable_adaptive_size_policy(const char* collector_name) { |
1077 if (UseAdaptiveSizePolicy) { | 1078 if (UseAdaptiveSizePolicy) { |
1078 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { | 1079 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { |
1079 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.", | 1080 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.", |
1080 collector_name); | 1081 collector_name); |
1282 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", | 1283 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", |
1283 MarkStackSize / K, MarkStackSizeMax / K); | 1284 MarkStackSize / K, MarkStackSizeMax / K); |
1284 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); | 1285 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); |
1285 } | 1286 } |
1286 } | 1287 } |
1287 #endif // INCLUDE_ALTERNATE_GCS | 1288 #endif // INCLUDE_ALL_GCS |
1288 | 1289 |
1289 void set_object_alignment() { | 1290 void set_object_alignment() { |
1290 // Object alignment. | 1291 // Object alignment. |
1291 assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2"); | 1292 assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2"); |
1292 MinObjAlignmentInBytes = ObjectAlignmentInBytes; | 1293 MinObjAlignmentInBytes = ObjectAlignmentInBytes; |
1299 LogMinObjAlignment = LogMinObjAlignmentInBytes - LogHeapWordSize; | 1300 LogMinObjAlignment = LogMinObjAlignmentInBytes - LogHeapWordSize; |
1300 | 1301 |
1301 // Oop encoding heap max | 1302 // Oop encoding heap max |
1302 OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes; | 1303 OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes; |
1303 | 1304 |
1304 #if INCLUDE_ALTERNATE_GCS | 1305 #if INCLUDE_ALL_GCS |
1305 // Set CMS global values | 1306 // Set CMS global values |
1306 CompactibleFreeListSpace::set_cms_values(); | 1307 CompactibleFreeListSpace::set_cms_values(); |
1307 #endif // INCLUDE_ALTERNATE_GCS | 1308 #endif // INCLUDE_ALL_GCS |
1308 } | 1309 } |
1309 | 1310 |
1310 bool verify_object_alignment() { | 1311 bool verify_object_alignment() { |
1311 // Object alignment. | 1312 // Object alignment. |
1312 if (!is_power_of_2(ObjectAlignmentInBytes)) { | 1313 if (!is_power_of_2(ObjectAlignmentInBytes)) { |
1974 status = false; | 1975 status = false; |
1975 } | 1976 } |
1976 | 1977 |
1977 status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk"); | 1978 status = status && verify_min_value(ParGCArrayScanChunk, 1, "ParGCArrayScanChunk"); |
1978 | 1979 |
1979 #ifndef SERIALGC | 1980 #if INCLUDE_ALL_GCS |
1980 if (UseG1GC) { | 1981 if (UseG1GC) { |
1981 status = status && verify_percentage(InitiatingHeapOccupancyPercent, | 1982 status = status && verify_percentage(InitiatingHeapOccupancyPercent, |
1982 "InitiatingHeapOccupancyPercent"); | 1983 "InitiatingHeapOccupancyPercent"); |
1983 status = status && verify_min_value(G1RefProcDrainInterval, 1, | 1984 status = status && verify_min_value(G1RefProcDrainInterval, 1, |
1984 "G1RefProcDrainInterval"); | 1985 "G1RefProcDrainInterval"); |
1985 status = status && verify_min_value((intx)G1ConcMarkStepDurationMillis, 1, | 1986 status = status && verify_min_value((intx)G1ConcMarkStepDurationMillis, 1, |
1986 "G1ConcMarkStepDurationMillis"); | 1987 "G1ConcMarkStepDurationMillis"); |
1987 } | 1988 } |
1988 #endif | 1989 #endif // INCLUDE_ALL_GCS |
1989 | 1990 |
1990 status = status && verify_interval(RefDiscoveryPolicy, | 1991 status = status && verify_interval(RefDiscoveryPolicy, |
1991 ReferenceProcessor::DiscoveryPolicyMin, | 1992 ReferenceProcessor::DiscoveryPolicyMin, |
1992 ReferenceProcessor::DiscoveryPolicyMax, | 1993 ReferenceProcessor::DiscoveryPolicyMax, |
1993 "RefDiscoveryPolicy"); | 1994 "RefDiscoveryPolicy"); |
3155 | 3156 |
3156 #ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. | 3157 #ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. |
3157 UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages"); | 3158 UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages"); |
3158 #endif | 3159 #endif |
3159 | 3160 |
3160 #if !INCLUDE_ALTERNATE_GCS | 3161 #if !INCLUDE_ALL_GCS |
3161 if (UseParallelGC) { | 3162 if (UseParallelGC) { |
3162 warning("Parallel GC is not supported in this VM. Using Serial GC."); | 3163 warning("Parallel GC is not supported in this VM. Using Serial GC."); |
3163 } | 3164 } |
3164 if (UseParallelOldGC) { | 3165 if (UseParallelOldGC) { |
3165 warning("Parallel Old GC is not supported in this VM. Using Serial GC."); | 3166 warning("Parallel Old GC is not supported in this VM. Using Serial GC."); |
3168 warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC."); | 3169 warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC."); |
3169 } | 3170 } |
3170 if (UseParNewGC) { | 3171 if (UseParNewGC) { |
3171 warning("Par New GC is not supported in this VM. Using Serial GC."); | 3172 warning("Par New GC is not supported in this VM. Using Serial GC."); |
3172 } | 3173 } |
3173 #endif // INCLUDE_ALTERNATE_GCS | 3174 #endif // INCLUDE_ALL_GCS |
3174 | 3175 |
3175 #ifndef PRODUCT | 3176 #ifndef PRODUCT |
3176 if (TraceBytecodesAt != 0) { | 3177 if (TraceBytecodesAt != 0) { |
3177 TraceBytecodes = true; | 3178 TraceBytecodes = true; |
3178 } | 3179 } |
3215 } | 3216 } |
3216 | 3217 |
3217 // Set object alignment values. | 3218 // Set object alignment values. |
3218 set_object_alignment(); | 3219 set_object_alignment(); |
3219 | 3220 |
3220 #ifdef SERIALGC | 3221 #if !INCLUDE_ALL_GCS |
3221 force_serial_gc(); | 3222 force_serial_gc(); |
3222 #endif // SERIALGC | 3223 #endif // INCLUDE_ALL_GCS |
3223 #if !INCLUDE_CDS | 3224 #if !INCLUDE_CDS |
3224 no_shared_spaces(); | 3225 no_shared_spaces(); |
3225 #endif // INCLUDE_CDS | 3226 #endif // INCLUDE_CDS |
3226 | 3227 |
3227 // Set flags based on ergonomics. | 3228 // Set flags based on ergonomics. |
3245 } | 3246 } |
3246 | 3247 |
3247 // Set heap size based on available physical memory | 3248 // Set heap size based on available physical memory |
3248 set_heap_size(); | 3249 set_heap_size(); |
3249 | 3250 |
3250 #if INCLUDE_ALTERNATE_GCS | 3251 #if INCLUDE_ALL_GCS |
3251 // Set per-collector flags | 3252 // Set per-collector flags |
3252 if (UseParallelGC || UseParallelOldGC) { | 3253 if (UseParallelGC || UseParallelOldGC) { |
3253 set_parallel_gc_flags(); | 3254 set_parallel_gc_flags(); |
3254 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below | 3255 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below |
3255 set_cms_and_parnew_gc_flags(); | 3256 set_cms_and_parnew_gc_flags(); |
3257 set_parnew_gc_flags(); | 3258 set_parnew_gc_flags(); |
3258 } else if (UseG1GC) { | 3259 } else if (UseG1GC) { |
3259 set_g1_gc_flags(); | 3260 set_g1_gc_flags(); |
3260 } | 3261 } |
3261 check_deprecated_gcs(); | 3262 check_deprecated_gcs(); |
3262 #endif // INCLUDE_ALTERNATE_GCS | 3263 #else // INCLUDE_ALL_GCS |
3263 | |
3264 #ifdef SERIALGC | |
3265 assert(verify_serial_gc_flags(), "SerialGC unset"); | 3264 assert(verify_serial_gc_flags(), "SerialGC unset"); |
3266 #endif // SERIALGC | 3265 #endif // INCLUDE_ALL_GCS |
3267 | 3266 |
3268 // Set bytecode rewriting flags | 3267 // Set bytecode rewriting flags |
3269 set_bytecode_flags(); | 3268 set_bytecode_flags(); |
3270 | 3269 |
3271 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. | 3270 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. |
3355 | 3354 |
3356 return JNI_OK; | 3355 return JNI_OK; |
3357 } | 3356 } |
3358 | 3357 |
3359 jint Arguments::adjust_after_os() { | 3358 jint Arguments::adjust_after_os() { |
3360 #if INCLUDE_ALTERNATE_GCS | 3359 #if INCLUDE_ALL_GCS |
3361 if (UseParallelGC || UseParallelOldGC) { | 3360 if (UseParallelGC || UseParallelOldGC) { |
3362 if (UseNUMA) { | 3361 if (UseNUMA) { |
3363 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { | 3362 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { |
3364 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); | 3363 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); |
3365 } | 3364 } |
3366 // For those collectors or operating systems (eg, Windows) that do | 3365 // For those collectors or operating systems (eg, Windows) that do |
3367 // not support full UseNUMA, we will map to UseNUMAInterleaving for now | 3366 // not support full UseNUMA, we will map to UseNUMAInterleaving for now |
3368 UseNUMAInterleaving = true; | 3367 UseNUMAInterleaving = true; |
3369 } | 3368 } |
3370 } | 3369 } |
3371 #endif | 3370 #endif // INCLUDE_ALL_GCS |
3372 return JNI_OK; | 3371 return JNI_OK; |
3373 } | 3372 } |
3374 | 3373 |
3375 int Arguments::PropertyList_count(SystemProperty* pl) { | 3374 int Arguments::PropertyList_count(SystemProperty* pl) { |
3376 int count = 0; | 3375 int count = 0; |