diff --git a/src/share/vm/memory/binaryTreeDictionary.cpp b/src/share/vm/memory/binaryTreeDictionary.cpp index 3f4a8a16ac5f8f401a59befcc5b3971293165a6f..08a9b03343224647f28d7249ccd3c44a27a09053 100644 --- a/src/share/vm/memory/binaryTreeDictionary.cpp +++ b/src/share/vm/memory/binaryTreeDictionary.cpp @@ -230,7 +230,7 @@ void TreeList::return_chunk_at_tail(TreeChunk* chunk) { link_tail(chunk); assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list"); - FreeList::increment_count(); + increment_count(); debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) assert(head() == NULL || head()->prev() == NULL, "list invariant"); assert(tail() == NULL || tail()->next() == NULL, "list invariant"); @@ -258,7 +258,7 @@ void TreeList::return_chunk_at_head(TreeChunk* chunk) { } head()->link_after(chunk); assert(!head() || size() == head()->size(), "Wrong sized chunk in list"); - FreeList::increment_count(); + increment_count(); debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) assert(head() == NULL || head()->prev() == NULL, "list invariant"); assert(tail() == NULL || tail()->next() == NULL, "list invariant"); @@ -909,6 +909,7 @@ class TreeCensusClosure : public StackObj { template class AscendTreeCensusClosure : public TreeCensusClosure { + using TreeCensusClosure::do_list; public: void do_tree(TreeList* tl) { if (tl != NULL) { @@ -921,6 +922,7 @@ class AscendTreeCensusClosure : public TreeCensusClosure { template class DescendTreeCensusClosure : public TreeCensusClosure { + using TreeCensusClosure::do_list; public: void do_tree(TreeList* tl) { if (tl != NULL) { @@ -987,6 +989,7 @@ class AscendTreeSearchClosure : public TreeSearchClosure { template class DescendTreeSearchClosure : public TreeSearchClosure { + using TreeSearchClosure::do_list; public: bool do_tree(TreeList* tl) { if (tl != NULL) { diff --git a/src/share/vm/memory/binaryTreeDictionary.hpp b/src/share/vm/memory/binaryTreeDictionary.hpp index 6d25852cb3ea6905a38bdad2d7852d3ab71f5baa..4b8c0d8141b6f29382268512ee16d8b9811cf924 100644 --- a/src/share/vm/memory/binaryTreeDictionary.hpp +++ b/src/share/vm/memory/binaryTreeDictionary.hpp @@ -60,13 +60,18 @@ class TreeList: public FreeList { TreeList* left() const { return _left; } TreeList* right() const { return _right; } - // Wrapper on call to base class, to get the template to compile. - Chunk* head() const { return FreeList::head(); } - Chunk* tail() const { return FreeList::tail(); } - void set_head(Chunk* head) { FreeList::set_head(head); } - void set_tail(Chunk* tail) { FreeList::set_tail(tail); } - - size_t size() const { return FreeList::size(); } + // Explicitly import these names into our namespace to fix name lookup with templates + using FreeList::head; + using FreeList::set_head; + + using FreeList::tail; + using FreeList::set_tail; + using FreeList::link_tail; + + using FreeList::increment_count; + NOT_PRODUCT(using FreeList::increment_returned_bytes_by;) + using FreeList::verify_chunk_in_free_list; + using FreeList::size; // Accessors for links in tree.