comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 12110:4c84d351cca9

8007074: SIGSEGV at ParMarkBitMap::verify_clear() Summary: Replace the broken large pages implementation on Linux. New flag: -XX:+UseTransparentHugePages - Linux specific flag to turn on transparent huge page hinting with madvise(..., MAP_HUGETLB). Changed behavior: -XX:+UseLargePages - tries to use -XX:+UseTransparentHugePages before trying other large pages implementations (on Linux). Changed behavior: -XX:+UseHugeTLBFS - Use upfront allocation of Large Pages instead of using the broken implementation to dynamically committing large pages. Changed behavior: -XX:LargePageSizeInBytes - Turned off the ability to use this flag on Linux and provides warning to user if set to a value different than the OS chosen large page size. Changed behavior: Setting no large page size - Now defaults to use -XX:UseTransparentHugePages if the OS supports it. Previously, -XX:+UseHugeTLBFS was chosen if the OS was configured to use large pages. Reviewed-by: tschatzl, dcubed, brutisso
author stefank
date Fri, 16 Aug 2013 13:22:32 +0200
parents f4311079200c
children 84683e78e713
comparison
equal deleted inserted replaced
12108:badf4244ceae 12110:4c84d351cca9
311 } 311 }
312 312
313 void G1CollectorPolicy::initialize_flags() { 313 void G1CollectorPolicy::initialize_flags() {
314 set_min_alignment(HeapRegion::GrainBytes); 314 set_min_alignment(HeapRegion::GrainBytes);
315 size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name()); 315 size_t card_table_alignment = GenRemSet::max_alignment_constraint(rem_set_name());
316 set_max_alignment(MAX2(card_table_alignment, min_alignment())); 316 size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
317 set_max_alignment(MAX3(card_table_alignment, min_alignment(), page_size));
317 if (SurvivorRatio < 1) { 318 if (SurvivorRatio < 1) {
318 vm_exit_during_initialization("Invalid survivor ratio specified"); 319 vm_exit_during_initialization("Invalid survivor ratio specified");
319 } 320 }
320 CollectorPolicy::initialize_flags(); 321 CollectorPolicy::initialize_flags();
321 } 322 }