--- old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2013-09-30 21:36:04.000000000 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2013-09-30 21:36:03.000000000 +0200 @@ -319,10 +319,11 @@ } void G1CollectorPolicy::initialize_flags() { - set_min_alignment(HeapRegion::GrainBytes); + _min_alignment = HeapRegion::GrainBytes; size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name()); size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size(); - set_max_alignment(MAX3(card_table_alignment, min_alignment(), page_size)); + _max_alignment = MAX3(card_table_alignment, _min_alignment, page_size); + if (SurvivorRatio < 1) { vm_exit_during_initialization("Invalid survivor ratio specified"); } --- old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2013-09-30 21:36:04.000000000 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp 2013-09-30 21:36:04.000000000 +0200 @@ -116,7 +116,7 @@ // If only -XX:NewRatio is set we should use the specified ratio of the heap // as both min and max. This will be interpreted as "fixed" just like the // NewSize==MaxNewSize case above. But we will update the min and max -// everytime the heap size changes. +// every time the heap size changes. // // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is // combined with either NewSize or MaxNewSize. (A warning message is printed.) @@ -217,7 +217,6 @@ return _during_marking; } -private: enum PredictionConstants { TruncatedSeqLength = 10 }; --- old/src/share/vm/gc_implementation/g1/g1RemSet.cpp 2013-09-30 21:36:05.000000000 +0200 +++ new/src/share/vm/gc_implementation/g1/g1RemSet.cpp 2013-09-30 21:36:04.000000000 +0200 @@ -375,11 +375,6 @@ DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); dcqs.concatenate_logs(); - if (G1CollectedHeap::use_parallel_gc_threads()) { - // Don't set the number of workers here. It will be set - // when the task is run - // _seq_task->set_n_termination((int)n_workers()); - } guarantee( _cards_scanned == NULL, "invariant" ); _cards_scanned = NEW_C_HEAP_ARRAY(size_t, n_workers(), mtGC); for (uint i = 0; i < n_workers(); ++i) { --- old/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp 2013-09-30 21:36:05.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.cpp 2013-09-30 21:36:05.000000000 +0200 @@ -115,8 +115,8 @@ // Make checks on the current sizes of the generations and -// the contraints on the sizes of the generations. Push -// up the boundary within the contraints. A partial +// the constraints on the sizes of the generations. Push +// up the boundary within the constraints. A partial // push can occur. void AdjoiningGenerations::request_old_gen_expansion(size_t expand_in_bytes) { assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check"); --- old/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.hpp 2013-09-30 21:36:06.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/adjoiningGenerations.hpp 2013-09-30 21:36:05.000000000 +0200 @@ -75,7 +75,7 @@ // the available space and attempt to move the boundary if more space // is needed. The growth is not guaranteed to occur. void adjust_boundary_for_old_gen_needs(size_t desired_change_in_bytes); - // Similary for a growth of the young generation. + // Similarly for a growth of the young generation. void adjust_boundary_for_young_gen_needs(size_t eden_size, size_t survivor_size); // Return the total byte size of the reserved space --- old/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp 2013-09-30 21:36:06.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp 2013-09-30 21:36:06.000000000 +0200 @@ -40,7 +40,7 @@ void initialize_flags() { // Do basic sizing work - this->TwoGenerationCollectorPolicy::initialize_flags(); + TwoGenerationCollectorPolicy::initialize_flags(); // If the user hasn't explicitly set the number of worker // threads, set the count. --- old/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp 2013-09-30 21:36:07.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp 2013-09-30 21:36:07.000000000 +0200 @@ -23,7 +23,6 @@ */ #include "precompiled.hpp" -#include "gc_implementation/parallelScavenge/generationSizer.hpp" #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" #include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp" #include "gc_implementation/parallelScavenge/psScavenge.hpp" --- old/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp 2013-09-30 21:36:07.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp 2013-09-30 21:36:07.000000000 +0200 @@ -53,7 +53,6 @@ // Forward decls class elapsedTimer; -class GenerationSizer; class PSAdaptiveSizePolicy : public AdaptiveSizePolicy { friend class PSGCAdaptivePolicyCounters; --- old/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp 2013-09-30 21:36:08.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp 2013-09-30 21:36:08.000000000 +0200 @@ -26,7 +26,6 @@ #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" -#include "gc_implementation/parallelScavenge/generationSizer.hpp" #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" #include "gc_implementation/parallelScavenge/psMarkSweep.hpp" --- old/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2013-09-30 21:36:08.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2013-09-30 21:36:08.000000000 +0200 @@ -27,7 +27,6 @@ #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "gc_implementation/parallelScavenge/gcTaskManager.hpp" -#include "gc_implementation/parallelScavenge/generationSizer.hpp" #include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp" #include "gc_implementation/parallelScavenge/pcTasks.hpp" #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" --- old/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp 2013-09-30 21:36:09.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp 2013-09-30 21:36:09.000000000 +0200 @@ -877,7 +877,7 @@ // The summary phase calculates the total live data to the left of each region // XXX. Based on that total and the bottom of the space, it can calculate the // starting location of the live data in XXX. The summary phase calculates for -// each region XXX quantites such as +// each region XXX quantities such as // // - the amount of live data at the beginning of a region from an object // entering the region. --- old/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2013-09-30 21:36:10.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2013-09-30 21:36:10.000000000 +0200 @@ -27,7 +27,6 @@ #include "code/codeCache.hpp" #include "gc_implementation/parallelScavenge/cardTableExtension.hpp" #include "gc_implementation/parallelScavenge/gcTaskManager.hpp" -#include "gc_implementation/parallelScavenge/generationSizer.hpp" #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp" #include "gc_implementation/parallelScavenge/psMarkSweep.hpp" --- old/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp 2013-09-30 21:36:11.000000000 +0200 +++ new/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp 2013-09-30 21:36:10.000000000 +0200 @@ -136,7 +136,7 @@ // generation - the less space committed, the smaller the survivor // space, possibly as small as an alignment. However, we are interested // in the case where the young generation is 100% committed, as this - // is the point where eden reachs its maximum size. At this point, + // is the point where eden reaches its maximum size. At this point, // the size of a survivor space is max_survivor_size. max_eden_size = size - 2 * max_survivor_size; } --- old/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp 2013-09-30 21:36:11.000000000 +0200 +++ new/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp 2013-09-30 21:36:11.000000000 +0200 @@ -445,7 +445,7 @@ // into account (i.e., don't trigger if the amount of free // space has suddenly jumped up). If the current is much // higher than the average, use the average since it represents - // the longer term behavor. + // the longer term behavior. const size_t live_in_eden = MIN2(eden_live, (size_t) avg_eden_live()->average()); const size_t free_in_eden = max_eden_size > live_in_eden ? --- old/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp 2013-09-30 21:36:12.000000000 +0200 +++ new/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp 2013-09-30 21:36:11.000000000 +0200 @@ -157,7 +157,7 @@ // decrease/increase the old generation for major pause time int _change_old_gen_for_maj_pauses; - // change old geneneration for throughput + // change old generation for throughput int _change_old_gen_for_throughput; // change young generation for throughput @@ -182,7 +182,7 @@ // Changing the generation sizing depends on the data that is // gathered about the effects of changes on the pause times and // throughput. These variable count the number of data points - // gathered. The policy may use these counters as a threshhold + // gathered. The policy may use these counters as a threshold // for reliable data. julong _young_gen_change_for_minor_throughput; julong _old_gen_change_for_major_throughput; --- old/src/share/vm/memory/collectorPolicy.cpp 2013-09-30 21:36:12.000000000 +0200 +++ new/src/share/vm/memory/collectorPolicy.cpp 2013-09-30 21:36:12.000000000 +0200 @@ -53,40 +53,40 @@ } void CollectorPolicy::initialize_flags() { - assert(max_alignment() >= min_alignment(), - err_msg("max_alignment: " SIZE_FORMAT " less than min_alignment: " SIZE_FORMAT, - max_alignment(), min_alignment())); - assert(max_alignment() % min_alignment() == 0, - err_msg("max_alignment: " SIZE_FORMAT " not aligned by min_alignment: " SIZE_FORMAT, - max_alignment(), min_alignment())); + assert(_max_alignment >= _min_alignment, + err_msg("max_alignment: " SIZE_FORMAT " less than min_alignment: " SIZE_FORMAT, + _max_alignment, _min_alignment)); + assert(_max_alignment % _min_alignment == 0, + err_msg("max_alignment: " SIZE_FORMAT " not aligned by min_alignment: " SIZE_FORMAT, + _max_alignment, _min_alignment)); if (MaxHeapSize < InitialHeapSize) { vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified"); } - if (!is_size_aligned(MaxMetaspaceSize, max_alignment())) { + if (!is_size_aligned(MaxMetaspaceSize, _max_alignment)) { FLAG_SET_ERGO(uintx, MaxMetaspaceSize, - restricted_align_down(MaxMetaspaceSize, max_alignment())); + restricted_align_down(MaxMetaspaceSize, _max_alignment)); } if (MetaspaceSize > MaxMetaspaceSize) { FLAG_SET_ERGO(uintx, MetaspaceSize, MaxMetaspaceSize); } - if (!is_size_aligned(MetaspaceSize, min_alignment())) { + if (!is_size_aligned(MetaspaceSize, _min_alignment)) { FLAG_SET_ERGO(uintx, MetaspaceSize, - restricted_align_down(MetaspaceSize, min_alignment())); + restricted_align_down(MetaspaceSize, _min_alignment)); } assert(MetaspaceSize <= MaxMetaspaceSize, "Must be"); - MinMetaspaceExpansion = restricted_align_down(MinMetaspaceExpansion, min_alignment()); - MaxMetaspaceExpansion = restricted_align_down(MaxMetaspaceExpansion, min_alignment()); + MinMetaspaceExpansion = restricted_align_down(MinMetaspaceExpansion, _min_alignment); + MaxMetaspaceExpansion = restricted_align_down(MaxMetaspaceExpansion, _min_alignment); - MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, min_alignment()); + MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, _min_alignment); - assert(MetaspaceSize % min_alignment() == 0, "metapace alignment"); - assert(MaxMetaspaceSize % max_alignment() == 0, "maximum metaspace alignment"); + assert(MetaspaceSize % _min_alignment == 0, "metapace alignment"); + assert(MaxMetaspaceSize % _max_alignment == 0, "maximum metaspace alignment"); if (MetaspaceSize < 256*K) { vm_exit_during_initialization("Too small initial Metaspace size"); } @@ -94,36 +94,36 @@ void CollectorPolicy::initialize_size_info() { // User inputs from -mx and ms must be aligned - set_min_heap_byte_size(align_size_up(Arguments::min_heap_size(), min_alignment())); - set_initial_heap_byte_size(align_size_up(InitialHeapSize, min_alignment())); - set_max_heap_byte_size(align_size_up(MaxHeapSize, max_alignment())); + _min_heap_byte_size = align_size_up(Arguments::min_heap_size(), _min_alignment); + _initial_heap_byte_size = align_size_up(InitialHeapSize, _min_alignment); + _max_heap_byte_size = align_size_up(MaxHeapSize, _max_alignment); // Check heap parameter properties - if (initial_heap_byte_size() < M) { + if (_initial_heap_byte_size < M) { vm_exit_during_initialization("Too small initial heap"); } // Check heap parameter properties - if (min_heap_byte_size() < M) { + if (_min_heap_byte_size < M) { vm_exit_during_initialization("Too small minimum heap"); } - if (initial_heap_byte_size() <= NewSize) { + if (_initial_heap_byte_size <= NewSize) { // make sure there is at least some room in old space vm_exit_during_initialization("Too small initial heap for new size specified"); } - if (max_heap_byte_size() < min_heap_byte_size()) { + if (_max_heap_byte_size < _min_heap_byte_size) { vm_exit_during_initialization("Incompatible minimum and maximum heap sizes specified"); } - if (initial_heap_byte_size() < min_heap_byte_size()) { + if (_initial_heap_byte_size < _min_heap_byte_size) { vm_exit_during_initialization("Incompatible minimum and initial heap sizes specified"); } - if (max_heap_byte_size() < initial_heap_byte_size()) { + if (_max_heap_byte_size < _initial_heap_byte_size) { vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified"); } if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap " SIZE_FORMAT " Maximum heap " SIZE_FORMAT, - min_heap_byte_size(), initial_heap_byte_size(), max_heap_byte_size()); + _min_heap_byte_size, _initial_heap_byte_size, _max_heap_byte_size); } } @@ -135,15 +135,8 @@ GenRemSet* CollectorPolicy::create_rem_set(MemRegion whole_heap, int max_covered_regions) { - switch (rem_set_name()) { - case GenRemSet::CardTable: { - CardTableRS* res = new CardTableRS(whole_heap, max_covered_regions); - return res; - } - default: - guarantee(false, "unrecognized GenRemSet::Name"); - return NULL; - } + assert(rem_set_name() == GenRemSet::CardTable, "unrecognized GenRemSet::Name"); + return new CardTableRS(whole_heap, max_covered_regions); } void CollectorPolicy::cleared_all_soft_refs() { @@ -185,15 +178,15 @@ size_t GenCollectorPolicy::scale_by_NewRatio_aligned(size_t base_size) { size_t x = base_size / (NewRatio+1); - size_t new_gen_size = x > min_alignment() ? - align_size_down(x, min_alignment()) : - min_alignment(); + size_t new_gen_size = x > _min_alignment ? + align_size_down(x, _min_alignment) : + _min_alignment; return new_gen_size; } size_t GenCollectorPolicy::bound_minus_alignment(size_t desired_size, size_t maximum_size) { - size_t alignment = min_alignment(); + size_t alignment = _min_alignment; size_t max_minus = maximum_size - alignment; return desired_size < max_minus ? desired_size : max_minus; } @@ -212,8 +205,8 @@ void GenCollectorPolicy::initialize_flags() { // All sizes must be multiples of the generation granularity. - set_min_alignment((uintx) Generation::GenGrain); - set_max_alignment(compute_max_alignment()); + _min_alignment = (uintx) Generation::GenGrain; + _max_alignment = compute_max_alignment(); CollectorPolicy::initialize_flags(); @@ -223,26 +216,26 @@ if (NewSize > MaxNewSize) { MaxNewSize = NewSize; } - NewSize = align_size_down(NewSize, min_alignment()); - MaxNewSize = align_size_down(MaxNewSize, min_alignment()); + NewSize = align_size_down(NewSize, _min_alignment); + MaxNewSize = align_size_down(MaxNewSize, _min_alignment); // Check validity of heap flags - assert(NewSize % min_alignment() == 0, "eden space alignment"); - assert(MaxNewSize % min_alignment() == 0, "survivor space alignment"); + assert(NewSize % _min_alignment == 0, "eden space alignment"); + assert(MaxNewSize % _min_alignment == 0, "survivor space alignment"); - if (NewSize < 3*min_alignment()) { + if (NewSize < 3 * _min_alignment) { // make sure there room for eden and two survivor spaces vm_exit_during_initialization("Too small new size specified"); } if (SurvivorRatio < 1 || NewRatio < 1) { - vm_exit_during_initialization("Invalid heap ratio specified"); + vm_exit_during_initialization("Invalid young gen ratio specified"); } } void TwoGenerationCollectorPolicy::initialize_flags() { GenCollectorPolicy::initialize_flags(); - OldSize = align_size_down(OldSize, min_alignment()); + OldSize = align_size_down(OldSize, _min_alignment); if (FLAG_IS_CMDLINE(OldSize) && FLAG_IS_DEFAULT(NewSize)) { // NewRatio will be used later to set the young generation size so we use @@ -251,11 +244,11 @@ assert(NewRatio > 0, "NewRatio should have been set up earlier"); size_t calculated_heapsize = (OldSize / NewRatio) * (NewRatio + 1); - calculated_heapsize = align_size_up(calculated_heapsize, max_alignment()); + calculated_heapsize = align_size_up(calculated_heapsize, _max_alignment); MaxHeapSize = calculated_heapsize; InitialHeapSize = calculated_heapsize; } - MaxHeapSize = align_size_up(MaxHeapSize, max_alignment()); + MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment); // adjust max heap size if necessary if (NewSize + OldSize > MaxHeapSize) { @@ -265,18 +258,18 @@ uintx calculated_size = NewSize + OldSize; double shrink_factor = (double) MaxHeapSize / calculated_size; // align - NewSize = align_size_down((uintx) (NewSize * shrink_factor), min_alignment()); + NewSize = align_size_down((uintx) (NewSize * shrink_factor), _min_alignment); // OldSize is already aligned because above we aligned MaxHeapSize to - // max_alignment(), and we just made sure that NewSize is aligned to - // min_alignment(). In initialize_flags() we verified that max_alignment() - // is a multiple of min_alignment(). + // _max_alignment, and we just made sure that NewSize is aligned to + // _min_alignment. In initialize_flags() we verified that _max_alignment + // is a multiple of _min_alignment. OldSize = MaxHeapSize - NewSize; } else { MaxHeapSize = NewSize + OldSize; } } // need to do this again - MaxHeapSize = align_size_up(MaxHeapSize, max_alignment()); + MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment); // adjust max heap size if necessary if (NewSize + OldSize > MaxHeapSize) { @@ -286,24 +279,24 @@ uintx calculated_size = NewSize + OldSize; double shrink_factor = (double) MaxHeapSize / calculated_size; // align - NewSize = align_size_down((uintx) (NewSize * shrink_factor), min_alignment()); + NewSize = align_size_down((uintx) (NewSize * shrink_factor), _min_alignment); // OldSize is already aligned because above we aligned MaxHeapSize to - // max_alignment(), and we just made sure that NewSize is aligned to - // min_alignment(). In initialize_flags() we verified that max_alignment() - // is a multiple of min_alignment(). + // _max_alignment, and we just made sure that NewSize is aligned to + // _min_alignment. In initialize_flags() we verified that _max_alignment + // is a multiple of _min_alignment. OldSize = MaxHeapSize - NewSize; } else { MaxHeapSize = NewSize + OldSize; } } // need to do this again - MaxHeapSize = align_size_up(MaxHeapSize, max_alignment()); + MaxHeapSize = align_size_up(MaxHeapSize, _max_alignment); always_do_update_barrier = UseConcMarkSweepGC; // Check validity of heap flags - assert(OldSize % min_alignment() == 0, "old space alignment"); - assert(MaxHeapSize % max_alignment() == 0, "maximum heap alignment"); + assert(OldSize % _min_alignment == 0, "old space alignment"); + assert(MaxHeapSize % _max_alignment == 0, "maximum heap alignment"); } // Values set on the command line win over any ergonomically @@ -318,7 +311,7 @@ void GenCollectorPolicy::initialize_size_info() { CollectorPolicy::initialize_size_info(); - // min_alignment() is used for alignment within a generation. + // _min_alignment is used for alignment within a generation. // There is additional alignment done down stream for some // collectors that sometimes causes unwanted rounding up of // generations sizes. @@ -327,18 +320,18 @@ size_t max_new_size = 0; if (FLAG_IS_CMDLINE(MaxNewSize) || FLAG_IS_ERGO(MaxNewSize)) { - if (MaxNewSize < min_alignment()) { - max_new_size = min_alignment(); + if (MaxNewSize < _min_alignment) { + max_new_size = _min_alignment; } - if (MaxNewSize >= max_heap_byte_size()) { - max_new_size = align_size_down(max_heap_byte_size() - min_alignment(), - min_alignment()); + if (MaxNewSize >= _max_heap_byte_size) { + max_new_size = align_size_down(_max_heap_byte_size - _min_alignment, + _min_alignment); warning("MaxNewSize (" SIZE_FORMAT "k) is equal to or " "greater than the entire heap (" SIZE_FORMAT "k). A " "new generation size of " SIZE_FORMAT "k will be used.", - MaxNewSize/K, max_heap_byte_size()/K, max_new_size/K); + MaxNewSize/K, _max_heap_byte_size/K, max_new_size/K); } else { - max_new_size = align_size_down(MaxNewSize, min_alignment()); + max_new_size = align_size_down(MaxNewSize, _min_alignment); } // The case for FLAG_IS_ERGO(MaxNewSize) could be treated @@ -356,7 +349,7 @@ // just accept those choices. The choices currently made are // not always "wise". } else { - max_new_size = scale_by_NewRatio_aligned(max_heap_byte_size()); + max_new_size = scale_by_NewRatio_aligned(_max_heap_byte_size); // Bound the maximum size by NewSize below (since it historically // would have been NewSize and because the NewRatio calculation could // yield a size that is too small) and bound it by MaxNewSize above. @@ -369,13 +362,13 @@ // Given the maximum gen0 size, determine the initial and // minimum gen0 sizes. - if (max_heap_byte_size() == min_heap_byte_size()) { + if (_max_heap_byte_size == _min_heap_byte_size) { // The maximum and minimum heap sizes are the same so // the generations minimum and initial must be the // same as its maximum. - set_min_gen0_size(max_new_size); - set_initial_gen0_size(max_new_size); - set_max_gen0_size(max_new_size); + _min_gen0_size = max_new_size; + _initial_gen0_size = max_new_size; + _max_gen0_size = max_new_size; } else { size_t desired_new_size = 0; if (!FLAG_IS_DEFAULT(NewSize)) { @@ -396,43 +389,37 @@ // Use the default NewSize as the floor for these values. If // NewRatio is overly large, the resulting sizes can be too // small. - _min_gen0_size = MAX2(scale_by_NewRatio_aligned(min_heap_byte_size()), - NewSize); + _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize); desired_new_size = - MAX2(scale_by_NewRatio_aligned(initial_heap_byte_size()), - NewSize); + MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize); } assert(_min_gen0_size > 0, "Sanity check"); - set_initial_gen0_size(desired_new_size); - set_max_gen0_size(max_new_size); + _initial_gen0_size = desired_new_size; + _max_gen0_size = max_new_size; // At this point the desirable initial and minimum sizes have been // determined without regard to the maximum sizes. // Bound the sizes by the corresponding overall heap sizes. - set_min_gen0_size( - bound_minus_alignment(_min_gen0_size, min_heap_byte_size())); - set_initial_gen0_size( - bound_minus_alignment(_initial_gen0_size, initial_heap_byte_size())); - set_max_gen0_size( - bound_minus_alignment(_max_gen0_size, max_heap_byte_size())); + _min_gen0_size = bound_minus_alignment(_min_gen0_size, _min_heap_byte_size); + _initial_gen0_size = bound_minus_alignment(_initial_gen0_size, _initial_heap_byte_size); + _max_gen0_size = bound_minus_alignment(_max_gen0_size, _max_heap_byte_size); // At this point all three sizes have been checked against the // maximum sizes but have not been checked for consistency // among the three. // Final check min <= initial <= max - set_min_gen0_size(MIN2(_min_gen0_size, _max_gen0_size)); - set_initial_gen0_size( - MAX2(MIN2(_initial_gen0_size, _max_gen0_size), _min_gen0_size)); - set_min_gen0_size(MIN2(_min_gen0_size, _initial_gen0_size)); + _min_gen0_size = MIN2(_min_gen0_size, _max_gen0_size); + _initial_gen0_size = MAX2(MIN2(_initial_gen0_size, _max_gen0_size), _min_gen0_size); + _min_gen0_size = MIN2(_min_gen0_size, _initial_gen0_size); } if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("1: Minimum gen0 " SIZE_FORMAT " Initial gen0 " SIZE_FORMAT " Maximum gen0 " SIZE_FORMAT, - min_gen0_size(), initial_gen0_size(), max_gen0_size()); + _min_gen0_size, _initial_gen0_size, _max_gen0_size); } } @@ -452,26 +439,24 @@ if ((*gen1_size_ptr + *gen0_size_ptr) > heap_size) { if ((heap_size < (*gen0_size_ptr + min_gen1_size)) && - (heap_size >= min_gen1_size + min_alignment())) { + (heap_size >= min_gen1_size + _min_alignment)) { // Adjust gen0 down to accommodate min_gen1_size *gen0_size_ptr = heap_size - min_gen1_size; *gen0_size_ptr = - MAX2((uintx)align_size_down(*gen0_size_ptr, min_alignment()), - min_alignment()); + MAX2((uintx)align_size_down(*gen0_size_ptr, _min_alignment), _min_alignment); assert(*gen0_size_ptr > 0, "Min gen0 is too large"); result = true; } else { *gen1_size_ptr = heap_size - *gen0_size_ptr; *gen1_size_ptr = - MAX2((uintx)align_size_down(*gen1_size_ptr, min_alignment()), - min_alignment()); + MAX2((uintx)align_size_down(*gen1_size_ptr, _min_alignment), _min_alignment); } } return result; } // Minimum sizes of the generations may be different than -// the initial sizes. An inconsistently is permitted here +// the initial sizes. An inconsistency is permitted here // in the total size that can be specified explicitly by // command line specification of OldSize and NewSize and // also a command line specification of -Xms. Issue a warning @@ -483,12 +468,11 @@ // At this point the minimum, initial and maximum sizes // of the overall heap and of gen0 have been determined. // The maximum gen1 size can be determined from the maximum gen0 - // and maximum heap size since no explicit flags exits + // and maximum heap size since no explicit flags exist // for setting the gen1 maximum. - _max_gen1_size = max_heap_byte_size() - _max_gen0_size; + _max_gen1_size = _max_heap_byte_size - _max_gen0_size; _max_gen1_size = - MAX2((uintx)align_size_down(_max_gen1_size, min_alignment()), - min_alignment()); + MAX2((uintx)align_size_down(_max_gen1_size, _min_alignment), _min_alignment); // If no explicit command line flag has been set for the // gen1 size, use what is left for gen1. if (FLAG_IS_DEFAULT(OldSize) || FLAG_IS_ERGO(OldSize)) { @@ -497,70 +481,66 @@ // with the overall heap size). In either case make // the minimum, maximum and initial sizes consistent // with the gen0 sizes and the overall heap sizes. - assert(min_heap_byte_size() > _min_gen0_size, + assert(_min_heap_byte_size > _min_gen0_size, "gen0 has an unexpected minimum size"); - set_min_gen1_size(min_heap_byte_size() - min_gen0_size()); - set_min_gen1_size( - MAX2((uintx)align_size_down(_min_gen1_size, min_alignment()), - min_alignment())); - set_initial_gen1_size(initial_heap_byte_size() - initial_gen0_size()); - set_initial_gen1_size( - MAX2((uintx)align_size_down(_initial_gen1_size, min_alignment()), - min_alignment())); - + _min_gen1_size = _min_heap_byte_size - _min_gen0_size; + _min_gen1_size = MAX2((uintx)align_size_down(_min_gen1_size, _min_alignment), + _min_alignment); + _initial_gen1_size = _initial_heap_byte_size - _initial_gen0_size; + _initial_gen1_size = MAX2((uintx)align_size_down(_initial_gen1_size, _min_alignment), + _min_alignment); } else { - // It's been explicitly set on the command line. Use the + // OldSize has been explicitly set on the command line. Use the // OldSize and then determine the consequences. - set_min_gen1_size(OldSize); - set_initial_gen1_size(OldSize); + _min_gen1_size = OldSize; + _initial_gen1_size = OldSize; // If the user has explicitly set an OldSize that is inconsistent // with other command line flags, issue a warning. - // The generation minimums and the overall heap mimimum should + // The generation minimums and the overall heap minimum should // be within one heap alignment. - if ((_min_gen1_size + _min_gen0_size + min_alignment()) < - min_heap_byte_size()) { + if ((_min_gen1_size + _min_gen0_size + _min_alignment) < _min_heap_byte_size) { warning("Inconsistency between minimum heap size and minimum " - "generation sizes: using minimum heap = " SIZE_FORMAT, - min_heap_byte_size()); + "generation sizes: using minimum heap = " SIZE_FORMAT, + _min_heap_byte_size); } - if ((OldSize > _max_gen1_size)) { + if (OldSize > _max_gen1_size) { warning("Inconsistency between maximum heap size and maximum " - "generation sizes: using maximum heap = " SIZE_FORMAT - " -XX:OldSize flag is being ignored", - max_heap_byte_size()); + "generation sizes: using maximum heap = " SIZE_FORMAT + " -XX:OldSize flag is being ignored", + _max_heap_byte_size); } // If there is an inconsistency between the OldSize and the minimum and/or // initial size of gen0, since OldSize was explicitly set, OldSize wins. if (adjust_gen0_sizes(&_min_gen0_size, &_min_gen1_size, - min_heap_byte_size(), OldSize)) { + _min_heap_byte_size, OldSize)) { if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("2: Minimum gen0 " SIZE_FORMAT " Initial gen0 " SIZE_FORMAT " Maximum gen0 " SIZE_FORMAT, - min_gen0_size(), initial_gen0_size(), max_gen0_size()); + _min_gen0_size, _initial_gen0_size, _max_gen0_size); } } - // Initial size + // The same as above for the old gen initial size if (adjust_gen0_sizes(&_initial_gen0_size, &_initial_gen1_size, - initial_heap_byte_size(), OldSize)) { + _initial_heap_byte_size, OldSize)) { if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("3: Minimum gen0 " SIZE_FORMAT " Initial gen0 " SIZE_FORMAT " Maximum gen0 " SIZE_FORMAT, - min_gen0_size(), initial_gen0_size(), max_gen0_size()); + _min_gen0_size, _initial_gen0_size, _max_gen0_size); } } } - // Enforce the maximum gen1 size. - set_min_gen1_size(MIN2(_min_gen1_size, _max_gen1_size)); - // Check that min gen1 <= initial gen1 <= max gen1 - set_initial_gen1_size(MAX2(_initial_gen1_size, _min_gen1_size)); - set_initial_gen1_size(MIN2(_initial_gen1_size, _max_gen1_size)); + _min_gen1_size = MIN2(_min_gen1_size, _max_gen1_size); + + // Make sure that min gen1 <= initial gen1 <= max gen1 + _initial_gen1_size = MAX2(_initial_gen1_size, _min_gen1_size); + _initial_gen1_size = MIN2(_initial_gen1_size, _max_gen1_size); if (PrintGCDetails && Verbose) { gclog_or_tty->print_cr("Minimum gen1 " SIZE_FORMAT " Initial gen1 " SIZE_FORMAT " Maximum gen1 " SIZE_FORMAT, - min_gen1_size(), initial_gen1_size(), max_gen1_size()); + _min_gen1_size, _initial_gen1_size, _max_gen1_size); } } @@ -579,8 +559,7 @@ HeapWord* result = NULL; - // Loop until the allocation is satisified, - // or unsatisfied after GC. + // Loop until the allocation is satisfied, or unsatisfied after GC. for (int try_count = 1, gclocker_stalled_count = 0; /* return or throw */; try_count += 1) { HandleMark hm; // discard any handles allocated in each iteration @@ -655,9 +634,7 @@ gc_count_before = Universe::heap()->total_collections(); } - VM_GenCollectForAllocation op(size, - is_tlab, - gc_count_before); + VM_GenCollectForAllocation op(size, is_tlab, gc_count_before); VMThread::execute(&op); if (op.prologue_succeeded()) { result = op.result(); @@ -892,8 +869,9 @@ void MarkSweepPolicy::initialize_generations() { _generations = NEW_C_HEAP_ARRAY3(GenerationSpecPtr, number_of_generations(), mtGC, 0, AllocFailStrategy::RETURN_NULL); - if (_generations == NULL) + if (_generations == NULL) { vm_exit_during_initialization("Unable to allocate gen spec"); + } if (UseParNewGC) { _generations[0] = new GenerationSpec(Generation::ParNew, _initial_gen0_size, _max_gen0_size); @@ -902,8 +880,9 @@ } _generations[1] = new GenerationSpec(Generation::MarkSweepCompact, _initial_gen1_size, _max_gen1_size); - if (_generations[0] == NULL || _generations[1] == NULL) + if (_generations[0] == NULL || _generations[1] == NULL) { vm_exit_during_initialization("Unable to allocate gen spec"); + } } void MarkSweepPolicy::initialize_gc_policy_counters() { --- old/src/share/vm/memory/collectorPolicy.hpp 2013-09-30 21:36:13.000000000 +0200 +++ new/src/share/vm/memory/collectorPolicy.hpp 2013-09-30 21:36:13.000000000 +0200 @@ -73,12 +73,13 @@ size_t _min_alignment; size_t _max_alignment; - // The sizing of the heap are controlled by a sizing policy. + // The sizing of the heap is controlled by a sizing policy. AdaptiveSizePolicy* _size_policy; // Set to true when policy wants soft refs cleared. // Reset to false by gc after it clears all soft refs. bool _should_clear_all_soft_refs; + // Set to true by the GC if the just-completed gc cleared all // softrefs. This is set to true whenever a gc clears all softrefs, and // set to false each time gc returns to the mutator. For example, in the @@ -101,17 +102,12 @@ // Return maximum heap alignment that may be imposed by the policy static size_t compute_max_alignment(); - void set_min_alignment(size_t align) { _min_alignment = align; } size_t min_alignment() { return _min_alignment; } - void set_max_alignment(size_t align) { _max_alignment = align; } size_t max_alignment() { return _max_alignment; } size_t initial_heap_byte_size() { return _initial_heap_byte_size; } - void set_initial_heap_byte_size(size_t v) { _initial_heap_byte_size = v; } size_t max_heap_byte_size() { return _max_heap_byte_size; } - void set_max_heap_byte_size(size_t v) { _max_heap_byte_size = v; } size_t min_heap_byte_size() { return _min_heap_byte_size; } - void set_min_heap_byte_size(size_t v) { _min_heap_byte_size = v; } enum Name { CollectorPolicyKind, @@ -182,7 +178,7 @@ size_t size, Metaspace::MetadataType mdtype); - // Performace Counter support + // Performance Counter support GCPolicyCounters* counters() { return _gc_policy_counters; } // Create the jstat counters for the GC policy. By default, policy's @@ -237,7 +233,7 @@ // Try to allocate space by expanding the heap. virtual HeapWord* expand_heap_and_allocate(size_t size, bool is_tlab); - // Scale the base_size by NewRation according to + // Scale the base_size by NewRatio according to // result = base_size / (NewRatio + 1) // and align by min_alignment() size_t scale_by_NewRatio_aligned(size_t base_size); @@ -248,16 +244,13 @@ public: // Accessors - size_t min_gen0_size() { return _min_gen0_size; } - void set_min_gen0_size(size_t v) { _min_gen0_size = v; } + size_t min_gen0_size() { return _min_gen0_size; } size_t initial_gen0_size() { return _initial_gen0_size; } - void set_initial_gen0_size(size_t v) { _initial_gen0_size = v; } - size_t max_gen0_size() { return _max_gen0_size; } - void set_max_gen0_size(size_t v) { _max_gen0_size = v; } + size_t max_gen0_size() { return _max_gen0_size; } virtual int number_of_generations() = 0; - virtual GenerationSpec **generations() { + virtual GenerationSpec **generations() { assert(_generations != NULL, "Sanity check"); return _generations; } @@ -302,19 +295,16 @@ public: // Accessors - size_t min_gen1_size() { return _min_gen1_size; } - void set_min_gen1_size(size_t v) { _min_gen1_size = v; } + size_t min_gen1_size() { return _min_gen1_size; } size_t initial_gen1_size() { return _initial_gen1_size; } - void set_initial_gen1_size(size_t v) { _initial_gen1_size = v; } - size_t max_gen1_size() { return _max_gen1_size; } - void set_max_gen1_size(size_t v) { _max_gen1_size = v; } + size_t max_gen1_size() { return _max_gen1_size; } // Inherited methods TwoGenerationCollectorPolicy* as_two_generation_policy() { return this; } - int number_of_generations() { return 2; } - BarrierSet::Name barrier_set_name() { return BarrierSet::CardTableModRef; } - GenRemSet::Name rem_set_name() { return GenRemSet::CardTable; } + int number_of_generations() { return 2; } + BarrierSet::Name barrier_set_name() { return BarrierSet::CardTableModRef; } + GenRemSet::Name rem_set_name() { return GenRemSet::CardTable; } virtual CollectorPolicy::Name kind() { return CollectorPolicy::TwoGenerationCollectorPolicyKind; --- old/src/share/vm/memory/genCollectedHeap.cpp 2013-09-30 21:36:14.000000000 +0200 +++ new/src/share/vm/memory/genCollectedHeap.cpp 2013-09-30 21:36:14.000000000 +0200 @@ -126,7 +126,7 @@ (HeapWord*)(heap_rs.base() + heap_rs.size())); // It is important to do this in a way such that concurrent readers can't - // temporarily think somethings in the heap. (Seen this happen in asserts.) + // temporarily think something is in the heap. (Seen this happen in asserts.) _reserved.set_word_size(0); _reserved.set_start((HeapWord*)heap_rs.base()); size_t actual_heap_size = heap_rs.size(); @@ -1053,12 +1053,6 @@ } } -void GenCollectedHeap::compute_new_generation_sizes(int collectedGen) { - for (int i = 0; i <= collectedGen; i++) { - _gens[i]->compute_new_size(); - } -} - GenCollectedHeap* GenCollectedHeap::heap() { assert(_gch != NULL, "Uninitialized access to GenCollectedHeap::heap()"); assert(_gch->kind() == CollectedHeap::GenCollectedHeap, "not a generational heap"); @@ -1273,7 +1267,7 @@ }; jlong GenCollectedHeap::millis_since_last_gc() { - // We need a monotonically non-deccreasing time in ms but + // We need a monotonically non-decreasing time in ms but // os::javaTimeMillis() does not guarantee monotonicity. jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; GenTimeOfLastGCClosure tolgc_cl(now); --- old/src/share/vm/memory/genCollectedHeap.hpp 2013-09-30 21:36:14.000000000 +0200 +++ new/src/share/vm/memory/genCollectedHeap.hpp 2013-09-30 21:36:14.000000000 +0200 @@ -86,10 +86,6 @@ NOT_PRODUCT(static size_t _skip_header_HeapWords;) protected: - // Directs each generation up to and including "collectedGen" to recompute - // its desired size. - void compute_new_generation_sizes(int collectedGen); - // Helper functions for allocation HeapWord* attempt_allocation(size_t size, bool is_tlab, --- old/src/share/vm/memory/genRemSet.cpp 2013-09-30 21:36:15.000000000 +0200 +++ new/src/share/vm/memory/genRemSet.cpp 2013-09-30 21:36:15.000000000 +0200 @@ -32,13 +32,8 @@ // enumeration.) uintx GenRemSet::max_alignment_constraint(Name nm) { - switch (nm) { - case GenRemSet::CardTable: - return CardTableRS::ct_max_alignment_constraint(); - default: - guarantee(false, "Unrecognized GenRemSet type."); - return (0); // Make Windows compiler happy - } + assert(nm == GenRemSet::CardTable, "Unrecognized GenRemSet type."); + return CardTableRS::ct_max_alignment_constraint(); } class HasAccumulatedModifiedOopsClosure : public KlassClosure { --- old/src/share/vm/memory/genRemSet.hpp 2013-09-30 21:36:15.000000000 +0200 +++ new/src/share/vm/memory/genRemSet.hpp 2013-09-30 21:36:15.000000000 +0200 @@ -65,7 +65,7 @@ // These are for dynamic downcasts. Unfortunately that it names the // possible subtypes (but not that they are subtypes!) Return NULL if - // the cast is invalide. + // the cast is invalid. virtual CardTableRS* as_CardTableRS() { return NULL; } // Return the barrier set associated with "this." --- old/src/share/vm/memory/universe.cpp 2013-09-30 21:36:16.000000000 +0200 +++ new/src/share/vm/memory/universe.cpp 2013-09-30 21:36:16.000000000 +0200 @@ -1021,7 +1021,7 @@ Universe::_virtual_machine_error_instance = InstanceKlass::cast(k)->allocate_instance(CHECK_false); - Universe::_vm_exception = InstanceKlass::cast(k)->allocate_instance(CHECK_false); + Universe::_vm_exception = InstanceKlass::cast(k)->allocate_instance(CHECK_false); if (!DumpSharedSpaces) { // These are the only Java fields that are currently set during shared space dumping. @@ -1101,7 +1101,7 @@ SystemDictionary::ProtectionDomain_klass(), m);; } - // The folowing is initializing converter functions for serialization in + // The following is initializing converter functions for serialization in // JVM.cpp. If we clean up the StrictMath code above we may want to find // a better solution for this as well. initialize_converter_functions(); @@ -1143,7 +1143,7 @@ if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; // CodeCache can only be updated by a thread_in_VM and they will all be - // stopped dring the safepoint so CodeCache will be safe to update without + // stopped during the safepoint so CodeCache will be safe to update without // holding the CodeCache_lock. KlassDepChange changes(dependee); @@ -1164,7 +1164,7 @@ if (CodeCache::number_of_nmethods_with_dependencies() == 0) return; // CodeCache can only be updated by a thread_in_VM and they will all be - // stopped dring the safepoint so CodeCache will be safe to update without + // stopped during the safepoint so CodeCache will be safe to update without // holding the CodeCache_lock. CallSiteDepChange changes(call_site(), method_handle()); --- old/src/share/vm/runtime/arguments.cpp 2013-09-30 21:36:17.000000000 +0200 +++ new/src/share/vm/runtime/arguments.cpp 2013-09-30 21:36:16.000000000 +0200 @@ -1306,7 +1306,7 @@ if (!FLAG_IS_DEFAULT(OldPLABSize)) { if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) { // OldPLABSize is not the default value but CMSParPromoteBlocksToClaim - // is. In this situtation let CMSParPromoteBlocksToClaim follow + // is. In this situation let CMSParPromoteBlocksToClaim follow // the value (either from the command line or ergonomics) of // OldPLABSize. Following OldPLABSize is an ergonomics decision. FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, OldPLABSize); @@ -2647,16 +2647,16 @@ FLAG_SET_CMDLINE(bool, BackgroundCompilation, false); // -Xmn for compatibility with other JVM vendors } else if (match_option(option, "-Xmn", &tail)) { - julong long_initial_eden_size = 0; - ArgsRange errcode = parse_memory_size(tail, &long_initial_eden_size, 1); + julong long_initial_young_size = 0; + ArgsRange errcode = parse_memory_size(tail, &long_initial_young_size, 1); if (errcode != arg_in_range) { jio_fprintf(defaultStream::error_stream(), - "Invalid initial eden size: %s\n", option->optionString); + "Invalid initial young generation size: %s\n", option->optionString); describe_range_error(errcode); return JNI_EINVAL; } - FLAG_SET_CMDLINE(uintx, MaxNewSize, (uintx)long_initial_eden_size); - FLAG_SET_CMDLINE(uintx, NewSize, (uintx)long_initial_eden_size); + FLAG_SET_CMDLINE(uintx, MaxNewSize, (uintx)long_initial_young_size); + FLAG_SET_CMDLINE(uintx, NewSize, (uintx)long_initial_young_size); // -Xms } else if (match_option(option, "-Xms", &tail)) { julong long_initial_heap_size = 0; --- old/src/share/vm/runtime/arguments.hpp 2013-09-30 21:36:17.000000000 +0200 +++ new/src/share/vm/runtime/arguments.hpp 2013-09-30 21:36:17.000000000 +0200 @@ -494,7 +494,7 @@ // -Xprof static bool has_profile() { return _has_profile; } - // -Xms, -Xmx + // -Xms static uintx min_heap_size() { return _min_heap_size; } static void set_min_heap_size(uintx v) { _min_heap_size = v; } --- old/src/share/vm/runtime/globals.hpp 2013-09-30 21:36:18.000000000 +0200 +++ new/src/share/vm/runtime/globals.hpp 2013-09-30 21:36:17.000000000 +0200 @@ -516,7 +516,7 @@ "Force NUMA optimizations on single-node/UMA systems") \ \ product(uintx, NUMAChunkResizeWeight, 20, \ - "Percentage (0-100) used to weigh the current sample when " \ + "Percentage (0-100) used to weight the current sample when " \ "computing exponentially decaying average for " \ "AdaptiveNUMAChunkSizing") \ \ @@ -538,7 +538,7 @@ product(intx, UseSSE, 99, \ "Highest supported SSE instructions set on x86/x64") \ \ - product(bool, UseAES, false, \ + product(bool, UseAES, false, \ "Control whether AES instructions can be used on x86/x64") \ \ product(uintx, LargePageSizeInBytes, 0, \ @@ -564,7 +564,7 @@ \ develop(bool, TraceLongCompiles, false, \ "Print out every time compilation is longer than " \ - "a given threashold") \ + "a given threshold") \ \ develop(bool, SafepointALot, false, \ "Generates a lot of safepoints. Works with " \ @@ -886,7 +886,7 @@ "Print compilations") \ \ diagnostic(bool, TraceNMethodInstalls, false, \ - "Trace nmethod intallation") \ + "Trace nmethod installation") \ \ diagnostic(intx, ScavengeRootsInCode, 2, \ "0: do not allow scavengable oops in the code cache; " \ @@ -958,7 +958,7 @@ "Omit backtraces for some 'hot' exceptions in optimized code") \ \ product(bool, ProfilerPrintByteCodeStatistics, false, \ - "Prints byte code statictics when dumping profiler output") \ + "Prints byte code statistics when dumping profiler output") \ \ product(bool, ProfilerRecordPC, false, \ "Collects tick for each 16 byte interval of compiled code") \ @@ -991,7 +991,7 @@ "references") \ \ develop(bool, IgnoreRewrites, false, \ - "Supress rewrites of bytecodes in the oopmap generator. " \ + "Suppress rewrites of bytecodes in the oopmap generator. " \ "This is unsafe!") \ \ develop(bool, PrintCodeCacheExtension, false, \ @@ -1273,7 +1273,7 @@ "Trace monitor matching failures during OopMapGeneration") \ \ develop(bool, TraceOopMapRewrites, false, \ - "Trace rewritting of method oops during oop map generation") \ + "Trace rewriting of method oops during oop map generation") \ \ develop(bool, TraceSafepoint, false, \ "Trace safepoint operations") \ @@ -1291,7 +1291,7 @@ "Trace setup time") \ \ develop(bool, TraceProtectionDomainVerification, false, \ - "Trace protection domain verifcation") \ + "Trace protection domain verification") \ \ develop(bool, TraceClearedExceptions, false, \ "Prints when an exception is forcibly cleared") \ @@ -1403,7 +1403,7 @@ \ product(bool, GCLockerInvokesConcurrent, false, \ "The exit of a JNI CS necessitating a scavenge also" \ - " kicks off a bkgrd concurrent collection") \ + " kicks off a background concurrent collection") \ \ product(uintx, GCLockerEdenExpansionPercent, 5, \ "How much the GC can expand the eden by while the GC locker " \ @@ -1498,10 +1498,10 @@ "Print (old gen) promotion labs sizing decisions") \ \ product(uintx, CMSOldPLABMin, 16, \ - "Min size of CMS gen promotion lab caches per worker per blksize")\ + "Min size of CMS gen promotion lab caches per worker per block size") \ \ product(uintx, CMSOldPLABMax, 1024, \ - "Max size of CMS gen promotion lab caches per worker per blksize")\ + "Max size of CMS gen promotion lab caches per worker per block size") \ \ product(uintx, CMSOldPLABNumRefills, 4, \ "Nominal number of refills of CMS gen promotion lab cache" \ @@ -1556,7 +1556,7 @@ \ product(uintx, CMS_FLSWeight, 75, \ "Percentage (0-100) used to weight the current sample when" \ - "computing exponentially decating averages for CMS FLS statistics.") \ + "computing exponentially decaying averages for CMS FLS statistics.") \ \ product(uintx, CMS_FLSPadding, 1, \ "The multiple of deviation from mean to use for buffering" \ @@ -1603,7 +1603,7 @@ \ product(uintx, CMS_SweepTimerThresholdMillis, 10, \ "Skip block flux-rate sampling for an epoch unless inter-sweep " \ - "duration exceeds this threhold in milliseconds") \ + "duration exceeds this threshold in milliseconds") \ \ develop(bool, CMSTraceIncrementalMode, false, \ "Trace CMS incremental mode") \ @@ -1664,19 +1664,15 @@ " we simulate overflow; a smaller number increases frequency") \ \ product(uintx, CMSMaxAbortablePrecleanLoops, 0, \ - "(Temporary, subject to experimentation)" \ "Maximum number of abortable preclean iterations, if > 0") \ \ product(intx, CMSMaxAbortablePrecleanTime, 5000, \ - "(Temporary, subject to experimentation)" \ "Maximum time in abortable preclean in ms") \ \ product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \ - "(Temporary, subject to experimentation)" \ "Nominal minimum work per abortable preclean iteration") \ \ manageable(intx, CMSAbortablePrecleanWaitMillis, 100, \ - "(Temporary, subject to experimentation)" \ " Time that we sleep between iterations when not given" \ " enough work per iteration") \ \ @@ -1700,7 +1696,7 @@ " enabled (effective only if CMSParallelRemarkEnabled)") \ \ product(bool, CMSPLABRecordAlways, true, \ - "Whether to always record survivor space PLAB bdries" \ + "Whether to always record survivor space PLAB boundaries" \ " (effective only if CMSParallelSurvivorRemarkEnabled)") \ \ product(bool, CMSEdenChunksRecordAlways, true, \ @@ -1849,7 +1845,7 @@ "denotes 'do constant GC cycles'.") \ \ product(bool, UseCMSInitiatingOccupancyOnly, false, \ - "Only use occupancy as a crierion for starting a CMS collection") \ + "Only use occupancy as a criterion for starting a CMS collection")\ \ product(uintx, CMSIsTooFullPercentage, 98, \ "An absolute ceiling above which CMS will always consider the " \ @@ -1888,13 +1884,13 @@ "(other young collectors) ") \ \ develop(uintx, PromotionFailureALotInterval, 5, \ - "Total collections between promotion failures alot") \ + "Total collections between promotion failures a lot") \ \ experimental(uintx, WorkStealingSleepMillis, 1, \ "Sleep time when sleep is used for yields") \ \ experimental(uintx, WorkStealingYieldsBeforeSleep, 5000, \ - "Number of yields before a sleep is done during workstealing") \ + "Number of yields before a sleep is done during work stealing") \ \ experimental(uintx, WorkStealingHardSpins, 4096, \ "Number of iterations in a spin loop between checks on " \ @@ -1912,14 +1908,14 @@ "MetadataAllocationFailALotInterval") \ \ develop(uintx, MetadataAllocationFailALotInterval, 1000, \ - "metadata allocation failure alot interval") \ + "metadata allocation failure a lot interval") \ \ develop(bool, MetaDataDeallocateALot, false, \ "Deallocation bunches of metadata at intervals controlled by " \ "MetaDataAllocateALotInterval") \ \ develop(uintx, MetaDataDeallocateALotInterval, 100, \ - "Metadata deallocation alot interval") \ + "Metadata deallocation a lot interval") \ \ develop(bool, TraceMetadataChunkAllocation, false, \ "Trace chunk metadata allocations") \ @@ -1939,7 +1935,7 @@ product_pd(bool, UseTLAB, "Use thread-local object allocation") \ \ product_pd(bool, ResizeTLAB, \ - "Dynamically resize tlab size for threads") \ + "Dynamically resize TLAB size for threads") \ \ product(bool, ZeroTLAB, false, \ "Zero out the newly created TLAB") \ @@ -1992,7 +1988,7 @@ "Use automatic collection selection policy") \ \ product(uintx, AutoGCSelectPauseMillis, 5000, \ - "Automatic GC selection pause threshhold in ms") \ + "Automatic GC selection pause threshold in ms") \ \ product(bool, UseAdaptiveSizePolicy, true, \ "Use adaptive generation sizing policies") \ @@ -2019,16 +2015,16 @@ "Resize the virtual spaces of the young or old generations") \ \ product(uintx, AdaptiveSizeThroughPutPolicy, 0, \ - "Policy for changeing generation size for throughput goals") \ + "Policy for changing generation size for throughput goals") \ \ product(uintx, AdaptiveSizePausePolicy, 0, \ "Policy for changing generation size for pause goals") \ \ develop(bool, PSAdjustTenuredGenForMinorPause, false, \ - "Adjust tenured generation to achive a minor pause goal") \ + "Adjust tenured generation to achieve a minor pause goal") \ \ develop(bool, PSAdjustYoungGenForMajorPause, false, \ - "Adjust young generation to achive a major pause goal") \ + "Adjust young generation to achieve a major pause goal") \ \ product(uintx, AdaptiveSizePolicyInitializingSteps, 20, \ "Number of steps where heuristics is used before data is used") \ @@ -3529,7 +3525,7 @@ product(uintx, MaxDirectMemorySize, 0, \ "Maximum total size of NIO direct-buffer allocations") \ \ - /* temporary developer defined flags */ \ + /* Flags used for temporary code during development */ \ \ diagnostic(bool, UseNewCode, false, \ "Testing Only: Use the new version while testing") \ --- old/src/share/vm/runtime/thread.cpp 2013-09-30 21:36:18.000000000 +0200 +++ new/src/share/vm/runtime/thread.cpp 2013-09-30 21:36:18.000000000 +0200 @@ -3321,7 +3321,7 @@ // Initialize system properties. Arguments::init_system_properties(); - // So that JDK version can be used as a discrimintor when parsing arguments + // So that JDK version can be used as a discriminator when parsing arguments JDK_Version_init(); // Update/Initialize System properties after JDK version number is known --- old/src/share/vm/runtime/virtualspace.cpp 2013-09-30 21:36:19.000000000 +0200 +++ new/src/share/vm/runtime/virtualspace.cpp 2013-09-30 21:36:19.000000000 +0200 @@ -544,10 +544,10 @@ // Determine which regions need to grow in this expand_by call. // If you are growing in the lower region, high() must be in that - // region so calcuate the size based on high(). For the middle and + // region so calculate the size based on high(). For the middle and // upper regions, determine the starting point of growth based on the // location of high(). By getting the MAX of the region's low address - // (or the prevoius region's high address) and high(), we can tell if it + // (or the previous region's high address) and high(), we can tell if it // is an intra or inter region growth. size_t lower_needs = 0; if (aligned_lower_new_high > lower_high()) { --- old/src/share/vm/utilities/globalDefinitions.hpp 2013-09-30 21:36:19.000000000 +0200 +++ new/src/share/vm/utilities/globalDefinitions.hpp 2013-09-30 21:36:19.000000000 +0200 @@ -149,7 +149,7 @@ // The larger HeapWordSize for 64bit requires larger heaps // for the same application running in 64bit. See bug 4967770. // The minimum alignment to a heap word size is done. Other -// parts of the memory system may required additional alignment +// parts of the memory system may require additional alignment // and are responsible for those alignments. #ifdef _LP64 #define ScaleForWordSize(x) align_size_down_((x) * 13 / 10, HeapWordSize)