Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 22978:30e04eba9e29 hs25.60-b13
8077255: TracePageSizes output reports wrong page size on Windows with G1
Summary: Print selected page size, not alignment size chosen by ReservedSpace (which is the vm_allocation_granularity that is different to page size on Windows) in the message presented by TracePageSizes.
Reviewed-by: drwhite, jmasa
author | tschatzl |
---|---|
date | Thu, 09 Apr 2015 15:41:47 +0200 |
parents | 33e421924c67 |
children | cbc7c4c9e11c |
comparison
equal
deleted
inserted
replaced
22977:33e421924c67 | 22978:30e04eba9e29 |
---|---|
1905 } | 1905 } |
1906 | 1906 |
1907 G1RegionToSpaceMapper* G1CollectedHeap::create_aux_memory_mapper(const char* description, | 1907 G1RegionToSpaceMapper* G1CollectedHeap::create_aux_memory_mapper(const char* description, |
1908 size_t size, | 1908 size_t size, |
1909 size_t translation_factor) { | 1909 size_t translation_factor) { |
1910 size_t preferred_page_size = os::page_size_for_region_unaligned(size, 1); | |
1910 // Allocate a new reserved space, preferring to use large pages. | 1911 // Allocate a new reserved space, preferring to use large pages. |
1911 ReservedSpace rs(size, true); | 1912 ReservedSpace rs(size, preferred_page_size); |
1912 G1RegionToSpaceMapper* result = | 1913 G1RegionToSpaceMapper* result = |
1913 G1RegionToSpaceMapper::create_mapper(rs, | 1914 G1RegionToSpaceMapper::create_mapper(rs, |
1914 size, | 1915 size, |
1915 rs.alignment(), | 1916 rs.alignment(), |
1916 HeapRegion::GrainBytes, | 1917 HeapRegion::GrainBytes, |
1917 translation_factor, | 1918 translation_factor, |
1918 mtGC); | 1919 mtGC); |
1919 if (TracePageSizes) { | 1920 if (TracePageSizes) { |
1920 gclog_or_tty->print_cr("G1 '%s': pg_sz=" SIZE_FORMAT " base=" PTR_FORMAT " size=" SIZE_FORMAT " alignment=" SIZE_FORMAT " reqsize=" SIZE_FORMAT, | 1921 gclog_or_tty->print_cr("G1 '%s': pg_sz=" SIZE_FORMAT " base=" PTR_FORMAT " size=" SIZE_FORMAT " alignment=" SIZE_FORMAT " reqsize=" SIZE_FORMAT, |
1921 description, rs.alignment(), p2i(rs.base()), rs.size(), rs.alignment(), size); | 1922 description, preferred_page_size, p2i(rs.base()), rs.size(), rs.alignment(), size); |
1922 } | 1923 } |
1923 return result; | 1924 return result; |
1924 } | 1925 } |
1925 | 1926 |
1926 jint G1CollectedHeap::initialize() { | 1927 jint G1CollectedHeap::initialize() { |