Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.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 | 9720d338b1d5 |
children | 1624a68007bd |
comparison
equal
deleted
inserted
replaced
12108:badf4244ceae | 12110:4c84d351cca9 |
---|---|
2004 // HeapWordSize). | 2004 // HeapWordSize). |
2005 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); | 2005 guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize"); |
2006 | 2006 |
2007 size_t init_byte_size = collector_policy()->initial_heap_byte_size(); | 2007 size_t init_byte_size = collector_policy()->initial_heap_byte_size(); |
2008 size_t max_byte_size = collector_policy()->max_heap_byte_size(); | 2008 size_t max_byte_size = collector_policy()->max_heap_byte_size(); |
2009 size_t heap_alignment = collector_policy()->max_alignment(); | |
2009 | 2010 |
2010 // Ensure that the sizes are properly aligned. | 2011 // Ensure that the sizes are properly aligned. |
2011 Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap"); | 2012 Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap"); |
2012 Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap"); | 2013 Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap"); |
2014 Universe::check_alignment(max_byte_size, heap_alignment, "g1 heap"); | |
2013 | 2015 |
2014 _cg1r = new ConcurrentG1Refine(this); | 2016 _cg1r = new ConcurrentG1Refine(this); |
2015 | 2017 |
2016 // Reserve the maximum. | 2018 // Reserve the maximum. |
2017 | 2019 |
2024 // base of the reserved heap may end up differing from the | 2026 // base of the reserved heap may end up differing from the |
2025 // address that was requested (i.e. the preferred heap base). | 2027 // address that was requested (i.e. the preferred heap base). |
2026 // If this happens then we could end up using a non-optimal | 2028 // If this happens then we could end up using a non-optimal |
2027 // compressed oops mode. | 2029 // compressed oops mode. |
2028 | 2030 |
2029 // Since max_byte_size is aligned to the size of a heap region (checked | |
2030 // above). | |
2031 Universe::check_alignment(max_byte_size, HeapRegion::GrainBytes, "g1 heap"); | |
2032 | |
2033 ReservedSpace heap_rs = Universe::reserve_heap(max_byte_size, | 2031 ReservedSpace heap_rs = Universe::reserve_heap(max_byte_size, |
2034 HeapRegion::GrainBytes); | 2032 heap_alignment); |
2035 | 2033 |
2036 // It is important to do this in a way such that concurrent readers can't | 2034 // It is important to do this in a way such that concurrent readers can't |
2037 // temporarily think something is in the heap. (I've actually seen this | 2035 // temporarily think something is in the heap. (I've actually seen this |
2038 // happen in asserts: DLD.) | 2036 // happen in asserts: DLD.) |
2039 _reserved.set_word_size(0); | 2037 _reserved.set_word_size(0); |