Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

export all String objects?

Moderators: Vladimir Kondratyev, Anton Katilin

export all String objects?

Postby JimF » Sat Mar 23, 2019 7:58 pm

Hi,
I have a heap dump with 300K instances of String objects. I'd like to use filter-on-string to see how many occurrences and total size, but UI seems to not show that information. Instead UI shows a short truncated list of search hits. I thought maybe I could export the non-truncated filtered Strings to a text file, but I don't see a way to do that.

Another solution might be to export the entire un-filtered content of all 300K strings to a text file, then use grep, etc. to filter. But I can't figure out how to export the entire set of String objects.

thanks, Jim
JimF
 
Posts: 11
Joined: Tue Jun 19, 2018 1:21 am

Re: export all String objects?

Postby Anton Katilin » Mon Mar 25, 2019 7:54 am

Hello Jim

Please use the offline export feature:

java -Dexport.strings -Dexport.txt -jar <profile directory>/lib/yourkit.jar -export <memory snapshot file> <output directory>

Best regards,
Anton
Anton Katilin
 
Posts: 5826
Joined: Wed Aug 11, 2004 8:37 am

Re: export all String objects?

Postby JimF » Tue Mar 26, 2019 7:39 pm

Thank you, using command line export helped me a lot.

Also it possible for me to change some setting so UI can show more occurrences when viewing a particular class name in Object Explorer? It seems to limit to showing only a few hundred objects.
JimF
 
Posts: 11
Joined: Tue Jun 19, 2018 1:21 am

Re: export all String objects?

Postby Anton Katilin » Fri Mar 29, 2019 7:23 am

Please add -Dyk.max.objects.to.show=N to <user home>/.yjp/ui.ini
The default N is 500.
Anton Katilin
 
Posts: 5826
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 20 guests

cron

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.