Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 18009:f73af4455d7d
Merge
author | asaha |
---|---|
date | Thu, 29 May 2014 09:56:06 -0700 |
parents | 78bbf4d43a14 |
children | 52b4284cb496 54bc75c144b0 d15367d92f0d |
comparison
equal
deleted
inserted
replaced
18008:da65bbf6f89e | 18009:f73af4455d7d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
838 void Arguments::print_jvm_flags_on(outputStream* st) { | 838 void Arguments::print_jvm_flags_on(outputStream* st) { |
839 if (_num_jvm_flags > 0) { | 839 if (_num_jvm_flags > 0) { |
840 for (int i=0; i < _num_jvm_flags; i++) { | 840 for (int i=0; i < _num_jvm_flags; i++) { |
841 st->print("%s ", _jvm_flags_array[i]); | 841 st->print("%s ", _jvm_flags_array[i]); |
842 } | 842 } |
843 st->print_cr(""); | 843 st->cr(); |
844 } | 844 } |
845 } | 845 } |
846 | 846 |
847 void Arguments::print_jvm_args_on(outputStream* st) { | 847 void Arguments::print_jvm_args_on(outputStream* st) { |
848 if (_num_jvm_args > 0) { | 848 if (_num_jvm_args > 0) { |
849 for (int i=0; i < _num_jvm_args; i++) { | 849 for (int i=0; i < _num_jvm_args; i++) { |
850 st->print("%s ", _jvm_args_array[i]); | 850 st->print("%s ", _jvm_args_array[i]); |
851 } | 851 } |
852 st->print_cr(""); | 852 st->cr(); |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 bool Arguments::process_argument(const char* arg, | 856 bool Arguments::process_argument(const char* arg, |
857 jboolean ignore_unrecognized, Flag::Flags origin) { | 857 jboolean ignore_unrecognized, Flag::Flags origin) { |
1339 if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) { | 1339 if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) { |
1340 CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight); | 1340 CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight); |
1341 } | 1341 } |
1342 if (PrintGCDetails && Verbose) { | 1342 if (PrintGCDetails && Verbose) { |
1343 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", | 1343 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", |
1344 MarkStackSize / K, MarkStackSizeMax / K); | 1344 (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K)); |
1345 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); | 1345 tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads); |
1346 } | 1346 } |
1347 } | 1347 } |
1348 #endif // INCLUDE_ALL_GCS | 1348 #endif // INCLUDE_ALL_GCS |
1349 | 1349 |
1350 void set_object_alignment() { | 1350 void set_object_alignment() { |
1420 !FLAG_IS_DEFAULT(MaxGCPauseMillis) && | 1420 !FLAG_IS_DEFAULT(MaxGCPauseMillis) && |
1421 (MaxGCPauseMillis <= AutoGCSelectPauseMillis)) { | 1421 (MaxGCPauseMillis <= AutoGCSelectPauseMillis)) { |
1422 if (PrintGCDetails) { | 1422 if (PrintGCDetails) { |
1423 // Cannot use gclog_or_tty yet. | 1423 // Cannot use gclog_or_tty yet. |
1424 tty->print_cr("Automatic selection of the low pause collector" | 1424 tty->print_cr("Automatic selection of the low pause collector" |
1425 " based on pause goal of %d (ms)", MaxGCPauseMillis); | 1425 " based on pause goal of %d (ms)", (int) MaxGCPauseMillis); |
1426 } | 1426 } |
1427 return true; | 1427 return true; |
1428 } | 1428 } |
1429 return false; | 1429 return false; |
1430 } | 1430 } |
1637 FLAG_SET_DEFAULT(GCTimeRatio, 9); | 1637 FLAG_SET_DEFAULT(GCTimeRatio, 9); |
1638 } | 1638 } |
1639 | 1639 |
1640 if (PrintGCDetails && Verbose) { | 1640 if (PrintGCDetails && Verbose) { |
1641 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", | 1641 tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk", |
1642 MarkStackSize / K, MarkStackSizeMax / K); | 1642 (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K)); |
1643 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); | 1643 tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads); |
1644 } | 1644 } |
1645 } | 1645 } |
1646 | 1646 |
1647 julong Arguments::limit_by_allocatable_memory(julong limit) { | 1647 julong Arguments::limit_by_allocatable_memory(julong limit) { |
1648 julong max_allocatable; | 1648 julong max_allocatable; |
1701 reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize); | 1701 reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize); |
1702 } | 1702 } |
1703 | 1703 |
1704 if (PrintGCDetails && Verbose) { | 1704 if (PrintGCDetails && Verbose) { |
1705 // Cannot use gclog_or_tty yet. | 1705 // Cannot use gclog_or_tty yet. |
1706 tty->print_cr(" Maximum heap size " SIZE_FORMAT, reasonable_max); | 1706 tty->print_cr(" Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max); |
1707 } | 1707 } |
1708 FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max); | 1708 FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max); |
1709 } | 1709 } |
1710 | 1710 |
1711 // If the minimum or initial heap_size have not been set or requested to be set | 1711 // If the minimum or initial heap_size have not been set or requested to be set |
2088 | 2088 |
2089 { | 2089 { |
2090 // Using "else if" below to avoid printing two error messages if min > max. | 2090 // Using "else if" below to avoid printing two error messages if min > max. |
2091 // This will also prevent us from reporting both min>100 and max>100 at the | 2091 // This will also prevent us from reporting both min>100 and max>100 at the |
2092 // same time, but that is less annoying than printing two identical errors IMHO. | 2092 // same time, but that is less annoying than printing two identical errors IMHO. |
2093 FormatBuffer<80> err_msg(""); | 2093 FormatBuffer<80> err_msg("%s",""); |
2094 if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) { | 2094 if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) { |
2095 jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); | 2095 jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); |
2096 status = false; | 2096 status = false; |
2097 } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) { | 2097 } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) { |
2098 jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); | 2098 jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer()); |