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

src/share/vm/memory/metaspace.cpp

Print this page

        

*** 809,823 **** // 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); --- 809,818 ----
*** 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 **** 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()); } - // 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()); --- 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()); } // 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 **** 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 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 --- 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) { ! 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
*** 2525,2535 **** index < NumberOfInUseLists; index = next_chunk_index(index)) { for (Metachunk* curr = chunks_in_use(index); curr != NULL; curr = curr->next()) { ! curr->mangle(); } } } #endif // PRODUCT --- 2518,2528 ---- index < NumberOfInUseLists; index = next_chunk_index(index)) { for (Metachunk* curr = chunks_in_use(index); curr != NULL; curr = curr->next()) { ! curr->mangle(uninitMetaWordVal); } } } #endif // PRODUCT
src/share/vm/memory/metaspace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File