Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 12287:0f37d1badced
Merge
author | dcubed |
---|---|
date | Fri, 20 Sep 2013 12:58:35 -0700 |
parents | da051ce490eb 9ed97b511b26 |
children | a07c25e4f67e 087f02e22fc2 |
comparison
equal
deleted
inserted
replaced
12271:bf13c3da3d11 | 12287:0f37d1badced |
---|---|
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); |
1518 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); | 1520 FLAG_SET_ERGO(bool, UseConcMarkSweepGC, true); |
1519 } else { | 1521 } else { |
1520 FLAG_SET_ERGO(bool, UseParallelGC, true); | 1522 FLAG_SET_ERGO(bool, UseParallelGC, true); |
1521 } | 1523 } |
1522 } | 1524 } |
1523 // Shared spaces work fine with other GCs but causes bytecode rewriting | 1525 } |
1524 // to be disabled, which hurts interpreter performance and decreases | 1526 #ifdef COMPILER2 |
1525 // server performance. On server class machines, keep the default | 1527 // Shared spaces work fine with other GCs but causes bytecode rewriting |
1526 // off unless it is asked for. Future work: either add bytecode rewriting | 1528 // to be disabled, which hurts interpreter performance and decreases |
1527 // at link time, or rewrite bytecodes in non-shared methods. | 1529 // server performance. When -server is specified, keep the default off |
1528 if (!DumpSharedSpaces && !RequireSharedSpaces && | 1530 // unless it is asked for. Future work: either add bytecode rewriting |
1529 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { | 1531 // at link time, or rewrite bytecodes in non-shared methods. |
1530 no_shared_spaces(); | 1532 if (!DumpSharedSpaces && !RequireSharedSpaces && |
1531 } | 1533 (FLAG_IS_DEFAULT(UseSharedSpaces) || !UseSharedSpaces)) { |
1532 } | 1534 no_shared_spaces(); |
1535 } | |
1536 #endif | |
1533 | 1537 |
1534 set_conservative_max_heap_alignment(); | 1538 set_conservative_max_heap_alignment(); |
1535 | 1539 |
1536 #ifndef ZERO | 1540 #ifndef ZERO |
1537 #ifdef _LP64 | 1541 #ifdef _LP64 |
2435 | 2439 |
2436 // Parse JavaVMInitArgs structure passed in | 2440 // Parse JavaVMInitArgs structure passed in |
2437 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, COMMAND_LINE); | 2441 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, COMMAND_LINE); |
2438 if (result != JNI_OK) { | 2442 if (result != JNI_OK) { |
2439 return result; | 2443 return result; |
2440 } | |
2441 | |
2442 if (AggressiveOpts) { | |
2443 // Insert alt-rt.jar between user-specified bootclasspath | |
2444 // prefix and the default bootclasspath. os::set_boot_path() | |
2445 // uses meta_index_dir as the default bootclasspath directory. | |
2446 const char* altclasses_jar = "alt-rt.jar"; | |
2447 size_t altclasses_path_len = strlen(get_meta_index_dir()) + 1 + | |
2448 strlen(altclasses_jar); | |
2449 char* altclasses_path = NEW_C_HEAP_ARRAY(char, altclasses_path_len, mtInternal); | |
2450 strcpy(altclasses_path, get_meta_index_dir()); | |
2451 strcat(altclasses_path, altclasses_jar); | |
2452 scp.add_suffix_to_prefix(altclasses_path); | |
2453 scp_assembly_required = true; | |
2454 FREE_C_HEAP_ARRAY(char, altclasses_path, mtInternal); | |
2455 } | 2444 } |
2456 | 2445 |
2457 // Parse _JAVA_OPTIONS environment variable (if present) (mimics classic VM) | 2446 // Parse _JAVA_OPTIONS environment variable (if present) (mimics classic VM) |
2458 result = parse_java_options_environment_variable(&scp, &scp_assembly_required); | 2447 result = parse_java_options_environment_variable(&scp, &scp_assembly_required); |
2459 if (result != JNI_OK) { | 2448 if (result != JNI_OK) { |