< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page
rev 54061 : 8244847: Linux/PPC: runtime/CompressedOops/CompressedClassPointers: smallHeapTest fails
Reviewed-by: stuefe, mdoerr

*** 1044,1059 **** assert_is_aligned(compressed_class_space_size(), _reserve_alignment); // Don't use large pages for the class space. bool large_pages = false; ! #if !(defined(AARCH64) || defined(AIX)) ReservedSpace metaspace_rs = ReservedSpace(compressed_class_space_size(), _reserve_alignment, large_pages, requested_addr); ! #else // AARCH64 ReservedSpace metaspace_rs; // Our compressed klass pointers may fit nicely into the lower 32 // bits. if ((uint64_t)requested_addr + compressed_class_space_size() < 4*G) { --- 1044,1060 ---- assert_is_aligned(compressed_class_space_size(), _reserve_alignment); // Don't use large pages for the class space. bool large_pages = false; ! #if !(defined(AARCH64) || defined(PPC64)) ReservedSpace metaspace_rs = ReservedSpace(compressed_class_space_size(), _reserve_alignment, large_pages, requested_addr); ! #else // AARCH64 || PPC64 ! ReservedSpace metaspace_rs; // Our compressed klass pointers may fit nicely into the lower 32 // bits. if ((uint64_t)requested_addr + compressed_class_space_size() < 4*G) {
*** 1067,1076 **** --- 1068,1084 ---- // Aarch64: Try to align metaspace so that we can decode a compressed // klass with a single MOVK instruction. We can do this iff the // compressed class base is a multiple of 4G. // Aix: Search for a place where we can find memory. If we need to load // the base, 4G alignment is helpful, too. + // PPC64: smaller heaps up to 2g will be mapped just below 4g. Then the + // attempt to place the compressed class space just after the heap fails on + // Linux 4.1.42 and higher because the launcher is loaded at 4g + // (ELF_ET_DYN_BASE). In that case we reach here and search the address space + // below 32g to get a zerobased CCS. For simplicity we reuse the search + // strategy for AARCH64. + size_t increment = AARCH64_ONLY(4*)G; for (char *a = align_up(requested_addr, increment); a < (char*)(1024*G); a += increment) { if (a == (char *)(32*G)) {
*** 1098,1108 **** if (metaspace_rs.is_reserved()) break; } } ! #endif // AARCH64 if (!metaspace_rs.is_reserved()) { #if INCLUDE_CDS if (UseSharedSpaces) { size_t increment = align_up(1*G, _reserve_alignment); --- 1106,1116 ---- if (metaspace_rs.is_reserved()) break; } } ! #endif // AARCH64 || PPC64 if (!metaspace_rs.is_reserved()) { #if INCLUDE_CDS if (UseSharedSpaces) { size_t increment = align_up(1*G, _reserve_alignment);
< prev index next >