< prev index next >
src/share/vm/runtime/arguments.cpp
Print this page
*** 30,39 ****
--- 30,40 ----
#include "code/codeCacheExtensions.hpp"
#include "gc/shared/cardTableRS.hpp"
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/referenceProcessor.hpp"
#include "gc/shared/taskqueue.hpp"
+ #include "logging/log.hpp"
#include "logging/logConfiguration.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/universe.inline.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
*** 1613,1659 ****
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
FLAG_SET_ERGO(size_t, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
} else {
FLAG_SET_ERGO(size_t, MaxNewSize, preferred_max_new_size);
}
! if (PrintGCDetails && Verbose) {
! // Too early to use gclog_or_tty
! tty->print_cr("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize);
! }
// Code along this path potentially sets NewSize and OldSize
! if (PrintGCDetails && Verbose) {
! // Too early to use gclog_or_tty
! tty->print_cr("CMS set min_heap_size: " SIZE_FORMAT
! " initial_heap_size: " SIZE_FORMAT
! " max_heap: " SIZE_FORMAT,
min_heap_size(), InitialHeapSize, max_heap);
- }
size_t min_new = preferred_max_new_size;
if (FLAG_IS_CMDLINE(NewSize)) {
min_new = NewSize;
}
if (max_heap > min_new && min_heap_size() > min_new) {
// Unless explicitly requested otherwise, make young gen
// at least min_new, and at most preferred_max_new_size.
if (FLAG_IS_DEFAULT(NewSize)) {
FLAG_SET_ERGO(size_t, NewSize, MAX2(NewSize, min_new));
FLAG_SET_ERGO(size_t, NewSize, MIN2(preferred_max_new_size, NewSize));
! if (PrintGCDetails && Verbose) {
! // Too early to use gclog_or_tty
! tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
! }
}
// Unless explicitly requested otherwise, size old gen
// so it's NewRatio x of NewSize.
if (FLAG_IS_DEFAULT(OldSize)) {
if (max_heap > NewSize) {
FLAG_SET_ERGO(size_t, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
! if (PrintGCDetails && Verbose) {
! // Too early to use gclog_or_tty
! tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
! }
}
}
}
}
// Unless explicitly requested otherwise, definitely
--- 1614,1646 ----
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
FLAG_SET_ERGO(size_t, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
} else {
FLAG_SET_ERGO(size_t, MaxNewSize, preferred_max_new_size);
}
! log_trace(gc, init)("CMS ergo set MaxNewSize: " SIZE_FORMAT, MaxNewSize);
// Code along this path potentially sets NewSize and OldSize
! log_trace(gc, init)("CMS set min_heap_size: " SIZE_FORMAT " initial_heap_size: " SIZE_FORMAT " max_heap: " SIZE_FORMAT,
min_heap_size(), InitialHeapSize, max_heap);
size_t min_new = preferred_max_new_size;
if (FLAG_IS_CMDLINE(NewSize)) {
min_new = NewSize;
}
if (max_heap > min_new && min_heap_size() > min_new) {
// Unless explicitly requested otherwise, make young gen
// at least min_new, and at most preferred_max_new_size.
if (FLAG_IS_DEFAULT(NewSize)) {
FLAG_SET_ERGO(size_t, NewSize, MAX2(NewSize, min_new));
FLAG_SET_ERGO(size_t, NewSize, MIN2(preferred_max_new_size, NewSize));
! log_trace(gc, init)("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
}
// Unless explicitly requested otherwise, size old gen
// so it's NewRatio x of NewSize.
if (FLAG_IS_DEFAULT(OldSize)) {
if (max_heap > NewSize) {
FLAG_SET_ERGO(size_t, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
! log_trace(gc, init)("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
}
}
}
}
// Unless explicitly requested otherwise, definitely
*** 1693,1707 ****
if (!ClassUnloading) {
FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
}
! if (PrintGCDetails && Verbose) {
! tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk",
! (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
! tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
! }
}
#endif // INCLUDE_ALL_GCS
void set_object_alignment() {
// Object alignment.
--- 1680,1691 ----
if (!ClassUnloading) {
FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
}
! log_trace(gc, init)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
! log_trace(gc, init)("ConcGCThreads: %u", ConcGCThreads);
}
#endif // INCLUDE_ALL_GCS
void set_object_alignment() {
// Object alignment.
*** 1744,1758 ****
bool Arguments::should_auto_select_low_pause_collector() {
if (UseAutoGCSelectPolicy &&
!FLAG_IS_DEFAULT(MaxGCPauseMillis) &&
(MaxGCPauseMillis <= AutoGCSelectPauseMillis)) {
! if (PrintGCDetails) {
! // Cannot use gclog_or_tty yet.
! tty->print_cr("Automatic selection of the low pause collector"
! " based on pause goal of %d (ms)", (int) MaxGCPauseMillis);
! }
return true;
}
return false;
}
--- 1728,1738 ----
bool Arguments::should_auto_select_low_pause_collector() {
if (UseAutoGCSelectPolicy &&
!FLAG_IS_DEFAULT(MaxGCPauseMillis) &&
(MaxGCPauseMillis <= AutoGCSelectPauseMillis)) {
! log_trace(gc, init)("Automatic selection of the low pause collector based on pause goal of %d (ms)", (int) MaxGCPauseMillis);
return true;
}
return false;
}
*** 2086,2099 ****
// after call to limit_by_allocatable_memory because that
// method might reduce the allocation size.
reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);
}
! if (PrintGCDetails && Verbose) {
! // Cannot use gclog_or_tty yet.
! tty->print_cr(" Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max);
! }
FLAG_SET_ERGO(size_t, MaxHeapSize, (size_t)reasonable_max);
}
// If the minimum or initial heap_size have not been set or requested to be set
// ergonomically, set them accordingly.
--- 2066,2076 ----
// after call to limit_by_allocatable_memory because that
// method might reduce the allocation size.
reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);
}
! log_trace(gc, init)(" Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max);
FLAG_SET_ERGO(size_t, MaxHeapSize, (size_t)reasonable_max);
}
// If the minimum or initial heap_size have not been set or requested to be set
// ergonomically, set them accordingly.
*** 2110,2133 ****
reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, (julong)min_heap_size());
reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize);
reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
! if (PrintGCDetails && Verbose) {
! // Cannot use gclog_or_tty yet.
! tty->print_cr(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial);
! }
FLAG_SET_ERGO(size_t, InitialHeapSize, (size_t)reasonable_initial);
}
// If the minimum heap size has not been set (via -Xms),
// synchronize with InitialHeapSize to avoid errors with the default value.
if (min_heap_size() == 0) {
set_min_heap_size(MIN2((size_t)reasonable_minimum, InitialHeapSize));
! if (PrintGCDetails && Verbose) {
! // Cannot use gclog_or_tty yet.
! tty->print_cr(" Minimum heap size " SIZE_FORMAT, min_heap_size());
! }
}
}
}
// This option inspects the machine and attempts to set various
--- 2087,2104 ----
reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, (julong)min_heap_size());
reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize);
reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
! log_trace(gc, init)(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial);
FLAG_SET_ERGO(size_t, InitialHeapSize, (size_t)reasonable_initial);
}
// If the minimum heap size has not been set (via -Xms),
// synchronize with InitialHeapSize to avoid errors with the default value.
if (min_heap_size() == 0) {
set_min_heap_size(MIN2((size_t)reasonable_minimum, InitialHeapSize));
! log_trace(gc, init)(" Minimum heap size " SIZE_FORMAT, min_heap_size());
}
}
}
// This option inspects the machine and attempts to set various
*** 3198,3210 ****
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, PrintGC, true) != Flag::SUCCESS) {
return JNI_EINVAL;
}
- if (FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true) != Flag::SUCCESS) {
- return JNI_EINVAL;
- }
} else if (match_option(option, "-Xlog", &tail)) {
bool ret = false;
if (strcmp(tail, ":help") == 0) {
LogConfiguration::print_command_line_help(defaultStream::output_stream());
vm_exit(0);
--- 3169,3178 ----
*** 4241,4253 ****
warning("Forcing ScavengeRootsInCode non-zero");
}
ScavengeRootsInCode = 1;
}
if (PrintGCDetails) {
! // Turn on -verbose:gc options as well
! PrintGC = true;
}
// Set object alignment values.
set_object_alignment();
--- 4209,4225 ----
warning("Forcing ScavengeRootsInCode non-zero");
}
ScavengeRootsInCode = 1;
}
+ if (PrintGC) {
+ warning("-XX:+PrintGC not supported in this build. Will turn it off.");
+ PrintGC = false;
+ }
if (PrintGCDetails) {
! warning("-XX:+PrintGCDetails not supported in this build. Will turn it off.");
! PrintGCDetails = false;
}
// Set object alignment values.
set_object_alignment();
< prev index next >