--- old/src/share/vm/interpreter/oopMapCache.hpp 2017-08-11 11:30:27.389394971 -0400 +++ new/src/share/vm/interpreter/oopMapCache.hpp 2017-08-11 11:30:27.123191451 -0400 @@ -144,17 +144,19 @@ }; class OopMapCache : public CHeapObj { + static OopMapCacheEntry* volatile _old_entries; private: enum { _size = 32, // Use fixed size for now _probe_depth = 3 // probe depth in case of collisions }; - OopMapCacheEntry* _array; + OopMapCacheEntry* volatile* _array; unsigned int hash_value_for(const methodHandle& method, int bci) const; OopMapCacheEntry* entry_at(int i) const; + bool put_at(int i, OopMapCacheEntry* entry, OopMapCacheEntry* old); - mutable Mutex _mut; + static void enqueue_for_cleanup(OopMapCacheEntry* entry); void flush(); @@ -167,13 +169,11 @@ // Returns the oopMap for (method, bci) in parameter "entry". // Returns false if an oop map was not found. - void lookup(const methodHandle& method, int bci, InterpreterOopMap* entry) const; + void lookup(const methodHandle& method, int bci, InterpreterOopMap* entry); // Compute an oop map without updating the cache or grabbing any locks (for debugging) static void compute_one_oop_map(const methodHandle& method, int bci, InterpreterOopMap* entry); - - // Returns total no. of bytes allocated as part of OopMapCache's - static long memory_usage() PRODUCT_RETURN0; + static void cleanup_old_entries(); }; #endif // SHARE_VM_INTERPRETER_OOPMAPCACHE_HPP