4

我已将堆转储加载到地图中。我发现了带有泄漏对象的哈希图。如何获取该哈希图中的键字段?我怀疑我在地图中有同一个对象的多个副本,名称如 joseph_0001, joseph_0002, ..., joseph_WXYZ 。

到目前为止,我已经尝试了以下陈述。

/* 41415459 is the object id. This just gives me back the hashmap */
SELECT * FROM OBJECTS 41415459


/* this gives me the hashmap's internal table */
SELECT o.table FROM OBJECTS 41415459 o 

/* this also gives the that hashmap's internal table
   but displayed in a prettier way */
SELECT * FROM OBJECTS 122490835

/* this doesn't return anything. i understand it doesn't make
   and sense because we're asking for the key of an array which
   an array doesn't have but I hope conveys what i'm trying to
   achieve */
SELECT o.key.displayName FROM OBJECTS 122490835 o 

/*
Problem reported: 
Sub-Select must return an object list: SELECT o FROM OBJECTS 122490835 o 
*/
SELECT n.key from (SELECT o FROM OBJECTS 122490835 o) n 

我想要每个键的 displayName 字段。

请注意 MAT 的 OQL 规范(http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.mat.ui.help%2Freference%2Foqlsyntax.html)与 VisualVM 不同。

4

0 回答 0