src/share/vm/memory/metaspace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/memory/metaspace.cpp	Mon Mar 14 20:37:46 2016
--- new/src/share/vm/memory/metaspace.cpp	Mon Mar 14 20:37:46 2016

*** 809,823 **** --- 809,818 ---- // BlockFreelist methods BlockFreelist::BlockFreelist() : _dictionary(new BlockTreeDictionary()) {} BlockFreelist::~BlockFreelist() { LogHandle(gc, metaspace, freelist) log; if (log.is_trace()) { ResourceMark rm; dictionary()->print_free_lists(log.trace_stream()); } delete _dictionary; } void BlockFreelist::return_block(MetaWord* p, size_t word_size) { Metablock* free_chunk = ::new (p) Metablock(word_size);
*** 2143,2152 **** --- 2138,2148 ---- cur->container()->dec_container_count(); // Capture the next link before it is changed // by the call to return_chunk_at_head(); Metachunk* next = cur->next(); DEBUG_ONLY(cur->set_is_tagged_free(true);) + NOT_PRODUCT(cur->mangle(badMetaWordVal);) list->return_chunk_at_head(cur); cur = next; } }
*** 2167,2181 **** --- 2163,2175 ---- LogHandle(gc, metaspace, freelist) log; if (log.is_trace()) { log.trace("~SpaceManager(): " PTR_FORMAT, p2i(this)); ResourceMark rm; locked_print_chunks_in_use_on(log.trace_stream()); + block_freelists()->print_on(log.trace_stream()); } // Do not mangle freed Metachunks. The chunk size inside Metachunks // is during the freeing of a VirtualSpaceNodes. // Have to update before the chunks_in_use lists are emptied // below. chunk_manager()->inc_free_chunks_total(allocated_chunks_words(), sum_count_in_chunks_in_use());
*** 2204,2216 **** --- 2198,2209 ---- log.trace("Humongous chunk dictionary: "); // Humongous chunks are never the current chunk. Metachunk* humongous_chunks = chunks_in_use(HumongousIndex); while (humongous_chunks != NULL) { #ifdef ASSERT humongous_chunks->set_is_tagged_free(true); #endif + DEBUG_ONLY(humongous_chunks->set_is_tagged_free(true);) + NOT_PRODUCT(humongous_chunks->mangle(badMetaWordVal);) log.trace(PTR_FORMAT " (" SIZE_FORMAT ") ", p2i(humongous_chunks), humongous_chunks->word_size()); assert(humongous_chunks->word_size() == (size_t) align_size_up(humongous_chunks->word_size(), smallest_chunk_size()), "Humongous chunk size is wrong: word size " SIZE_FORMAT

src/share/vm/memory/metaspace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File