You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a heap dump with an internal cache held in a ConcurrentHashMap. This map has 6648 entries, but has contended access so the size is recored as follows
map
baseCount = 836
counterCells
16803
-10991
If I navigate to this object in the heap dump and Use Java Collections -> Hash Entries then I get the expected 6648 entries. If I do an OQL query like SELECT ${h}[0:-1] FROM OBJECTS 951406 h (where 951406 is the object id of my concurrent hash map) then I only get 836 entries. I notice that KnownCollectionInfo.java has two cases for concurrent hash maps
// FIXME This is only approximate and just works for some// small maps.newCollectionExtractionInfo("java.util.concurrent.ConcurrentHashMap", JdkVersion.of(JAVA18, IBM18, JAVA19, IBM19, JAVA_11), newHashMapCollectionExtractor("baseCount", "table", "key", "val")), // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$newCollectionExtractionInfo("java.util.concurrent.ConcurrentHashMap", JdkVersion.except(JAVA18, IBM18, JAVA19, IBM19, JAVA_11), newConcurrentHashMapCollectionExtractor("segments", "key", "value")), // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
So, I'm not entirely surprised it isn't working, but it would be nice to either get an error or have it be consistent.
The text was updated successfully, but these errors were encountered:
I have a heap dump with an internal cache held in a
ConcurrentHashMap
. This map has 6648 entries, but has contended access so the size is recored as followsIf I navigate to this object in the heap dump and Use Java Collections -> Hash Entries then I get the expected 6648 entries. If I do an OQL query like
SELECT ${h}[0:-1] FROM OBJECTS 951406 h
(where 951406 is the object id of my concurrent hash map) then I only get 836 entries. I notice thatKnownCollectionInfo.java
has two cases for concurrent hash mapsSo, I'm not entirely surprised it isn't working, but it would be nice to either get an error or have it be consistent.
The text was updated successfully, but these errors were encountered: