arguments.cpp (9499:d91e023b7294) arguments.cpp (9575:98a36f531ec2)
1/*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 445 unchanged lines hidden (view full) ---

454 const AliasedFlag& flag_status = aliased_jvm_flags[i];
455 if (strcmp(flag_status.alias_name, flag_name) == 0) {
456 return flag_status.real_name;
457 }
458 }
459 return flag_name;
460}
461
1/*
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *

--- 445 unchanged lines hidden (view full) ---

454 const AliasedFlag& flag_status = aliased_jvm_flags[i];
455 if (strcmp(flag_status.alias_name, flag_name) == 0) {
456 return flag_status.real_name;
457 }
458 }
459 return flag_name;
460}
461
462#ifdef ASSERT
462#ifndef PRODUCT
463static bool lookup_special_flag(const char *flag_name, size_t skip_index) {
464 for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
465 if ((i != skip_index) && (strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
466 return true;
467 }
468 }
469 return false;
470}

--- 992 unchanged lines hidden (view full) ---

1463 // Increase the code cache size - tiered compiles a lot more.
1464 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1465 FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
1466 MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
1467 }
1468 // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
1469 if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
1470 FLAG_SET_ERGO(bool, SegmentedCodeCache, true);
463static bool lookup_special_flag(const char *flag_name, size_t skip_index) {
464 for (size_t i = 0; special_jvm_flags[i].name != NULL; i++) {
465 if ((i != skip_index) && (strcmp(special_jvm_flags[i].name, flag_name) == 0)) {
466 return true;
467 }
468 }
469 return false;
470}

--- 992 unchanged lines hidden (view full) ---

1463 // Increase the code cache size - tiered compiles a lot more.
1464 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1465 FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
1466 MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
1467 }
1468 // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
1469 if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
1470 FLAG_SET_ERGO(bool, SegmentedCodeCache, true);
1471
1472 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1473 // Multiply sizes by 5 but fix NonNMethodCodeHeapSize (distribute among non-profiled and profiled code heap)
1474 if (FLAG_IS_DEFAULT(ProfiledCodeHeapSize)) {
1475 FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, ProfiledCodeHeapSize * 5 + NonNMethodCodeHeapSize * 2);
1476 }
1477 if (FLAG_IS_DEFAULT(NonProfiledCodeHeapSize)) {
1478 FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, NonProfiledCodeHeapSize * 5 + NonNMethodCodeHeapSize * 2);
1479 }
1480 // Check consistency of code heap sizes
1481 if ((NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
1482 jio_fprintf(defaultStream::error_stream(),
1483 "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
1484 NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
1485 (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
1486 vm_exit(1);
1487 }
1488 }
1471 }
1472 if (!UseInterpreter) { // -Xcomp
1473 Tier3InvokeNotifyFreqLog = 0;
1474 Tier4InvocationThreshold = 0;
1475 }
1476
1477 if (CompileThresholdScaling < 0) {
1478 vm_exit_during_initialization("Negative value specified for CompileThresholdScaling", NULL);

--- 1033 unchanged lines hidden (view full) ---

2512 min_code_cache_size/K);
2513 status = false;
2514 } else if (ReservedCodeCacheSize > CODE_CACHE_SIZE_LIMIT) {
2515 // Code cache size larger than CODE_CACHE_SIZE_LIMIT is not supported.
2516 jio_fprintf(defaultStream::error_stream(),
2517 "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
2518 CODE_CACHE_SIZE_LIMIT/M);
2519 status = false;
1489 }
1490 if (!UseInterpreter) { // -Xcomp
1491 Tier3InvokeNotifyFreqLog = 0;
1492 Tier4InvocationThreshold = 0;
1493 }
1494
1495 if (CompileThresholdScaling < 0) {
1496 vm_exit_during_initialization("Negative value specified for CompileThresholdScaling", NULL);

--- 1033 unchanged lines hidden (view full) ---

2530 min_code_cache_size/K);
2531 status = false;
2532 } else if (ReservedCodeCacheSize > CODE_CACHE_SIZE_LIMIT) {
2533 // Code cache size larger than CODE_CACHE_SIZE_LIMIT is not supported.
2534 jio_fprintf(defaultStream::error_stream(),
2535 "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
2536 CODE_CACHE_SIZE_LIMIT/M);
2537 status = false;
2520 } else if (NonNMethodCodeHeapSize < min_code_cache_size) {
2538 } else if (NonNMethodCodeHeapSize < min_code_cache_size){
2521 jio_fprintf(defaultStream::error_stream(),
2522 "Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K,
2523 min_code_cache_size/K);
2524 status = false;
2539 jio_fprintf(defaultStream::error_stream(),
2540 "Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K,
2541 min_code_cache_size/K);
2542 status = false;
2543 } else if ((!FLAG_IS_DEFAULT(NonNMethodCodeHeapSize) || !FLAG_IS_DEFAULT(ProfiledCodeHeapSize) || !FLAG_IS_DEFAULT(NonProfiledCodeHeapSize))
2544 && (NonNMethodCodeHeapSize + NonProfiledCodeHeapSize + ProfiledCodeHeapSize) != ReservedCodeCacheSize) {
2545 jio_fprintf(defaultStream::error_stream(),
2546 "Invalid code heap sizes: NonNMethodCodeHeapSize(%dK) + ProfiledCodeHeapSize(%dK) + NonProfiledCodeHeapSize(%dK) = %dK. Must be equal to ReservedCodeCacheSize = %uK.\n",
2547 NonNMethodCodeHeapSize/K, ProfiledCodeHeapSize/K, NonProfiledCodeHeapSize/K,
2548 (NonNMethodCodeHeapSize + ProfiledCodeHeapSize + NonProfiledCodeHeapSize)/K, ReservedCodeCacheSize/K);
2549 status = false;
2525 }
2526
2527 if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2528 warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2529 }
2530
2531 return status;
2532}

--- 862 unchanged lines hidden (view full) ---

3395 // Keep replacing ";;" -> ";" until we have no more ";;" (windows)
3396 }
3397
3398 _java_class_path->set_value(copy);
3399 FreeHeap(copy); // a copy was made by set_value, so don't need this anymore
3400 }
3401
3402 if (!PrintSharedArchiveAndExit) {
2550 }
2551
2552 if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2553 warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2554 }
2555
2556 return status;
2557}

--- 862 unchanged lines hidden (view full) ---

3420 // Keep replacing ";;" -> ";" until we have no more ";;" (windows)
3421 }
3422
3423 _java_class_path->set_value(copy);
3424 FreeHeap(copy); // a copy was made by set_value, so don't need this anymore
3425 }
3426
3427 if (!PrintSharedArchiveAndExit) {
3403 ClassLoader::trace_class_path("[classpath: ", _java_class_path->value());
3428 ClassLoader::trace_class_path(tty, "[classpath: ", _java_class_path->value());
3404 }
3405}
3406
3407static bool has_jar_files(const char* directory) {
3408 DIR* dir = os::opendir(directory);
3409 if (dir == NULL) return false;
3410
3411 struct dirent *entry;

--- 1108 unchanged lines hidden ---
3429 }
3430}
3431
3432static bool has_jar_files(const char* directory) {
3433 DIR* dir = os::opendir(directory);
3434 if (dir == NULL) return false;
3435
3436 struct dirent *entry;

--- 1108 unchanged lines hidden ---