Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/arguments.cpp @ 12280:9ed97b511b26
8024517: runtime/CDSCompressedKPtrs/XShareAuto.java failed with RuntimeException
Summary: Make sure CDS is off by default when running server compiler.
Reviewed-by: dholmes, coleenp
author | hseigel |
---|---|
date | Thu, 19 Sep 2013 11:04:23 -0400 |
parents | dfae98867ee8 |
children | 0f37d1badced |
comparison
equal
deleted
inserted
replaced
12279:6eb908998b32 | 12280:9ed97b511b26 |
---|---|
1094 } | 1094 } |
1095 break; | 1095 break; |
1096 } | 1096 } |
1097 } | 1097 } |
1098 | 1098 |
1099 #if defined(COMPILER2) || defined(_LP64) || !INCLUDE_CDS | |
1099 // Conflict: required to use shared spaces (-Xshare:on), but | 1100 // Conflict: required to use shared spaces (-Xshare:on), but |
1100 // incompatible command line options were chosen. | 1101 // incompatible command line options were chosen. |
1101 | 1102 |
1102 static void no_shared_spaces() { | 1103 static void no_shared_spaces() { |
1103 if (RequireSharedSpaces) { | 1104 if (RequireSharedSpaces) { |
1106 vm_exit_during_initialization("Unable to use shared archive.", NULL); | 1107 vm_exit_during_initialization("Unable to use shared archive.", NULL); |
1107 } else { | 1108 } else { |
1108 FLAG_SET_DEFAULT(UseSharedSpaces, false); | 1109 FLAG_SET_DEFAULT(UseSharedSpaces, false); |
1109 } | 1110 } |
1110 } | 1111 } |
1112 #endif | |
1111 | 1113 |
1112 void Arguments::set_tiered_flags() { | 1114 void Arguments::set_tiered_flags() { |
1113 // With tiered, set default policy to AdvancedThresholdPolicy, which is 3. | 1115 // With tiered, set default policy to AdvancedThresholdPolicy, which is 3. |
1114 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { | 1116 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { |
1115 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3); | 1117 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3); |
1490 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); | 1492 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); |
1491 } else { | 1493 } else { |
1492 FLAG_SET_ERGO(bool, UseParallelGC, true); | 1494 FLAG_SET_ERGO(bool, UseParallelGC, true); |
1493 } | 1495 } |
1494 } | 1496 } |
1495 // Shared spaces work fine with other GCs but causes bytecode rewriting | 1497 } |
1496 // to be disabled, which hurts interpreter performance and decreases | 1498 #ifdef COMPILER2 |
1497 // server performance. On server class machines, keep the default | 1499 // Shared spaces work fine with other GCs but causes bytecode rewriting |
1498 // off unless it is asked for. Future work: either add bytecode rewriting | 1500 // to be disabled, which hurts interpreter performance and decreases |
1499 // at link time, or rewrite bytecodes in non-shared methods. | 1501 // server performance. When -server is specified, keep the default off |
1500 if (!DumpSharedSpaces && !RequireSharedSpaces && | 1502 // unless it is asked for. Future work: either add bytecode rewriting |
1501 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { | 1503 // at link time, or rewrite bytecodes in non-shared methods. |
1502 no_shared_spaces(); | 1504 if (!DumpSharedSpaces && !RequireSharedSpaces && |
1503 } | 1505 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { |
1504 } | 1506 no_shared_spaces(); |
1507 } | |
1508 #endif | |
1505 | 1509 |
1506 #ifndef ZERO | 1510 #ifndef ZERO |
1507 #ifdef _LP64 | 1511 #ifdef _LP64 |
1508 set_use_compressed_oops(); | 1512 set_use_compressed_oops(); |
1509 | 1513 |