Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 12326:1c3486050433
Merge
author | adlertz |
---|---|
date | Fri, 27 Sep 2013 15:43:03 -0700 |
parents | 510fbd28919c a07c25e4f67e |
children | cefad50507d8 c90e76575b03 |
comparison
equal
deleted
inserted
replaced
12324:510fbd28919c | 12326:1c3486050433 |
---|---|
1098 } | 1098 } |
1099 break; | 1099 break; |
1100 } | 1100 } |
1101 } | 1101 } |
1102 | 1102 |
1103 #if defined(COMPILER2) || defined(_LP64) || !INCLUDE_CDS | |
1103 // Conflict: required to use shared spaces (-Xshare:on), but | 1104 // Conflict: required to use shared spaces (-Xshare:on), but |
1104 // incompatible command line options were chosen. | 1105 // incompatible command line options were chosen. |
1105 | 1106 |
1106 static void no_shared_spaces() { | 1107 static void no_shared_spaces() { |
1107 if (RequireSharedSpaces) { | 1108 if (RequireSharedSpaces) { |
1110 vm_exit_during_initialization("Unable to use shared archive.", NULL); | 1111 vm_exit_during_initialization("Unable to use shared archive.", NULL); |
1111 } else { | 1112 } else { |
1112 FLAG_SET_DEFAULT(UseSharedSpaces, false); | 1113 FLAG_SET_DEFAULT(UseSharedSpaces, false); |
1113 } | 1114 } |
1114 } | 1115 } |
1116 #endif | |
1115 | 1117 |
1116 void Arguments::set_tiered_flags() { | 1118 void Arguments::set_tiered_flags() { |
1117 // With tiered, set default policy to AdvancedThresholdPolicy, which is 3. | 1119 // With tiered, set default policy to AdvancedThresholdPolicy, which is 3. |
1118 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { | 1120 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { |
1119 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3); | 1121 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3); |
1521 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); | 1523 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); |
1522 } else { | 1524 } else { |
1523 FLAG_SET_ERGO(bool, UseParallelGC, true); | 1525 FLAG_SET_ERGO(bool, UseParallelGC, true); |
1524 } | 1526 } |
1525 } | 1527 } |
1526 // Shared spaces work fine with other GCs but causes bytecode rewriting | 1528 } |
1527 // to be disabled, which hurts interpreter performance and decreases | 1529 #ifdef COMPILER2 |
1528 // server performance. On server class machines, keep the default | 1530 // Shared spaces work fine with other GCs but causes bytecode rewriting |
1529 // off unless it is asked for. Future work: either add bytecode rewriting | 1531 // to be disabled, which hurts interpreter performance and decreases |
1530 // at link time, or rewrite bytecodes in non-shared methods. | 1532 // server performance. When -server is specified, keep the default off |
1531 if (!DumpSharedSpaces && !RequireSharedSpaces && | 1533 // unless it is asked for. Future work: either add bytecode rewriting |
1532 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { | 1534 // at link time, or rewrite bytecodes in non-shared methods. |
1533 no_shared_spaces(); | 1535 if (!DumpSharedSpaces && !RequireSharedSpaces && |
1534 } | 1536 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { |
1535 } | 1537 no_shared_spaces(); |
1538 } | |
1539 #endif | |
1536 | 1540 |
1537 set_conservative_max_heap_alignment(); | 1541 set_conservative_max_heap_alignment(); |
1538 | 1542 |
1539 #ifndef ZERO | 1543 #ifndef ZERO |
1540 #ifdef _LP64 | 1544 #ifdef _LP64 |
2442 | 2446 |
2443 // Parse JavaVMInitArgs structure passed in | 2447 // Parse JavaVMInitArgs structure passed in |
2444 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, Flag::COMMAND_LINE); | 2448 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, Flag::COMMAND_LINE); |
2445 if (result != JNI_OK) { | 2449 if (result != JNI_OK) { |
2446 return result; | 2450 return result; |
2447 } | |
2448 | |
2449 if (AggressiveOpts) { | |
2450 // Insert alt-rt.jar between user-specified bootclasspath | |
2451 // prefix and the default bootclasspath. os::set_boot_path() | |
2452 // uses meta_index_dir as the default bootclasspath directory. | |
2453 const char* altclasses_jar = "alt-rt.jar"; | |
2454 size_t altclasses_path_len = strlen(get_meta_index_dir()) + 1 + | |
2455 strlen(altclasses_jar); | |
2456 char* altclasses_path = NEW_C_HEAP_ARRAY(char, altclasses_path_len, mtInternal); | |
2457 strcpy(altclasses_path, get_meta_index_dir()); | |
2458 strcat(altclasses_path, altclasses_jar); | |
2459 scp.add_suffix_to_prefix(altclasses_path); | |
2460 scp_assembly_required = true; | |
2461 FREE_C_HEAP_ARRAY(char, altclasses_path, mtInternal); | |
2462 } | 2451 } |
2463 | 2452 |
2464 // Parse _JAVA_OPTIONS environment variable (if present) (mimics classic VM) | 2453 // Parse _JAVA_OPTIONS environment variable (if present) (mimics classic VM) |
2465 result = parse_java_options_environment_variable(&scp, &scp_assembly_required); | 2454 result = parse_java_options_environment_variable(&scp, &scp_assembly_required); |
2466 if (result != JNI_OK) { | 2455 if (result != JNI_OK) { |