--- old/src/share/vm/memory/binaryTreeDictionary.hpp 2017-07-06 10:37:32.731301413 +0200 +++ new/src/share/vm/memory/binaryTreeDictionary.hpp 2017-07-06 10:37:32.619296763 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ #ifndef SHARE_VM_MEMORY_BINARYTREEDICTIONARY_HPP #define SHARE_VM_MEMORY_BINARYTREEDICTIONARY_HPP -#include "memory/freeBlockDictionary.hpp" #include "memory/freeList.hpp" /* @@ -172,9 +171,8 @@ void assert_is_mangled() const; }; - template -class BinaryTreeDictionary: public FreeBlockDictionary { +class BinaryTreeDictionary: public CHeapObj { friend class VMStructs; size_t _total_size; size_t _total_free_blocks; @@ -182,8 +180,8 @@ // private accessors void set_total_size(size_t v) { _total_size = v; } - virtual void inc_total_size(size_t v); - virtual void dec_total_size(size_t v); + void inc_total_size(size_t v); + void dec_total_size(size_t v); void set_total_free_blocks(size_t v) { _total_free_blocks = v; } TreeList* root() const { return _root; } void set_root(TreeList* v) { _root = v; } @@ -198,7 +196,7 @@ // return it. If the chunk // is the last chunk of that size, remove the node for that size // from the tree. - TreeChunk* get_chunk_from_tree(size_t size, enum FreeBlockDictionary::Dither dither); + TreeChunk* get_chunk_from_tree(size_t size); // Remove this chunk from the tree. If the removal results // in an empty list in the tree, remove the empty list. TreeChunk* remove_chunk_from_tree(TreeChunk* tc); @@ -257,23 +255,21 @@ // Return a chunk of size "size" or greater from // the tree. - Chunk_t* get_chunk(size_t size, enum FreeBlockDictionary::Dither dither) { - FreeBlockDictionary::verify_par_locked(); - Chunk_t* res = get_chunk_from_tree(size, dither); + Chunk_t* get_chunk(size_t size) { + verify_par_locked(); + Chunk_t* res = get_chunk_from_tree(size); assert(res == NULL || res->is_free(), "Should be returning a free chunk"); - assert(dither != FreeBlockDictionary::exactly || - res == NULL || res->size() == size, "Not correct size"); return res; } void return_chunk(Chunk_t* chunk) { - FreeBlockDictionary::verify_par_locked(); + verify_par_locked(); insert_chunk_in_tree(chunk); } void remove_chunk(Chunk_t* chunk) { - FreeBlockDictionary::verify_par_locked(); + verify_par_locked(); remove_chunk_from_tree((TreeChunk*)chunk); assert(chunk->is_free(), "Should still be a free chunk"); } @@ -338,6 +334,10 @@ void report_statistics(outputStream* st) const; void verify() const; + + Mutex* par_lock() const PRODUCT_RETURN0; + void set_par_lock(Mutex* lock) PRODUCT_RETURN; + void verify_par_locked() const PRODUCT_RETURN; }; #endif // SHARE_VM_MEMORY_BINARYTREEDICTIONARY_HPP