export all String objects?

Questions about YourKit Java Profiler
Post Reply
JimF
Posts: 11
Joined: Tue Jun 19, 2018 1:21 am

export all String objects?

Post by JimF »

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
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: export all String objects?

Post by Anton Katilin »

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
JimF
Posts: 11
Joined: Tue Jun 19, 2018 1:21 am

Re: export all String objects?

Post by JimF »

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.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: export all String objects?

Post by Anton Katilin »

Please add -Dyk.max.objects.to.show=N to <user home>/.yjp/ui.ini
The default N is 500.
Post Reply