문제

I am using VisualVM to analyze a core dump. I suspect some XML objects to be causing the leak but there are way too many String objects to go through one by one.

Can I use OQL to search String that begin with 'GH' ?

thanks for any help.

도움이 되었습니까?

해결책

Try this: select {instance: s, content: s.toString()} from java.lang.String s where s.count>2 && s.toString().substring(0,2)=="GH"

다른 팁

under JDK 1.8.20 a more simple variant works:

select s from java.lang.String s where s.toString().startsWith("GH")
heap.objects('java.lang.String', false, "it.toString().startsWith('GH')")

select c.attr_name.toString() from a.b.c.MyClass c where c.attr_name.toString().startsWith("GH")

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top