--- old/src/hotspot/share/memory/metaspaceClosure.hpp 2018-11-16 19:18:36.537963408 -0800 +++ new/src/hotspot/share/memory/metaspaceClosure.hpp 2018-11-16 19:18:36.269953208 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -29,7 +29,7 @@ #include "memory/allocation.hpp" #include "oops/array.hpp" #include "utilities/growableArray.hpp" -#include "utilities/resourceHash.hpp" +#include "utilities/hashtable.inline.hpp" // The metadata hierarchy is separate from the oop hierarchy class MetaspaceObj; // no C++ vtable @@ -264,19 +264,10 @@ public: // Gets called the first time we discover an object. virtual void do_unique_ref(Ref* ref, bool read_only) = 0; + UniqueMetaspaceClosure() : _has_been_visited(15889) {} + private: - static unsigned my_hash(const address& a) { - return primitive_hash
(a); - } - static bool my_equals(const address& a0, const address& a1) { - return primitive_equals
(a0, a1); - } - ResourceHashtable< - address, bool, - UniqueMetaspaceClosure::my_hash, // solaris compiler doesn't like: primitive_hash
- UniqueMetaspaceClosure::my_equals, // solaris compiler doesn't like: primitive_equals
- 15889, // prime number - ResourceObj::C_HEAP> _has_been_visited; + KVHashtable _has_been_visited; }; #endif // SHARE_VM_MEMORY_METASPACE_ITERATOR_HPP