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

500 elements limit for arrays in "Object explorer"

Moderators: Vladimir Kondratyev, Anton Katilin

500 elements limit for arrays in "Object explorer"

Postby wantosz » Tue Sep 04, 2007 8:38 pm

Let say I have an array of size 600. I would like to be able to inspect, for example, the last element. The "Object explorer" lists first 500 only and shows "and more..." below, but there appears no way for me to either advance to next 500 or view element at specific index. Am I missing something?

(PS. I am viewing an HPROF dump)
wantosz
 
Posts: 1
Joined: Tue Sep 04, 2007 8:29 pm

Postby Anton Katilin (YourKit) » Tue Sep 04, 2007 8:46 pm

Hello,

This number is hardcoded.

We'll add ability to advance to next 500 or similar means to browse more elements in future version.

Could you please provide more detail on why you need to manually browse content of such big array. I hope I'll be able to suggest suitable workaround and/or an alternate approach.

Best regards,
Anton
Anton Katilin (YourKit)
 
Posts: 157
Joined: Wed Aug 15, 2007 9:09 pm

Postby zenkar » Thu Mar 20, 2008 10:09 pm

I have same issue.

I have two lists of instances for a given class in two snapshots. The lists are about 4800 items long. They differ in ONE instance. I need to know which one it is and all I get is "and more..." at the end of the list.
zenkar
 
Posts: 1
Joined: Thu Mar 20, 2008 10:06 pm

Postby Anton Katilin » Fri Mar 21, 2008 10:28 am

You can try "Memory | Retained Objects..." (Shift+F4) for each of the lists, and then analyze content of a new tab which will open.
Anton Katilin
 
Posts: 6025
Joined: Wed Aug 11, 2004 8:37 am

Re:

Postby Yannis » Wed Nov 30, 2016 10:48 am

Anton Katilin (YourKit) wrote:We'll add ability to advance to next 500 or similar means to browse more elements in future version.

Hi !

Any news on this since 2007 ? ;-)

We are currently trying to address the memory retention issue that using File.deleteOnExit() causes (cf. https://bugs.openjdk.java.net/browse/JDK-4872014) and we would like to export all the strings that the LinkedHashSet of java.io.DeleteOnExitHook holds, in order to figure out which file name patterns are the most offending and whether a punctual fix would be enough in the short term.

As of YourKit 2016.02-b43, the "Open collection elements in a new tab" link only shows the 500 first (?) elements, with no way to display more elements, or export them, etc.

How could we do that (or something similar) ?

Thanks in advance for your answer !
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Anton Katilin » Wed Nov 30, 2016 5:27 pm

There is no dedicated UI for this purpose yet, sorry.

As a workaround, please specify the property (with even bigger value, if necessary) -Dyjp.max.objects.to.show=100000 in <user home>/.yjp/ui.ini
Anton Katilin
 
Posts: 6025
Joined: Wed Aug 11, 2004 8:37 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Mon Dec 05, 2016 2:15 pm

Seems to work like a charm, and a parameter is fine enough : thanks !
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Thu Apr 08, 2021 1:24 pm

Hi !
It looks like this parameter is longer working, and it has been so for at least the past 2 years... Or did I miss something ?
How can we increase the number of displayed elements, nowadays ?
Thanks in advance for your answer !
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Thu Apr 08, 2021 3:17 pm

Yannis wrote:this parameter is longer working

Grmpf... I meant NO longer working! ;-)
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Anton Katilin » Thu Apr 08, 2021 3:18 pm

Hello Yannis,

The property has been renamed. Please use -Dyk.max.objects.to.show=N instead.

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

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Fri Apr 09, 2021 7:53 am

That works !
What about adding some interactive [load more...] hyperlink, or something like that ? ;-)
Thanks for your answer !
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Anton Katilin » Fri Apr 09, 2021 9:10 am

Thank you for the confirmation.

What about adding some interactive [load more...] hyperlink, or something like that ?

Would it be practically useful to manually inspect thousands of individual objects in the "Object explorer" list?

The UI offers different ways to reduce the object set to browse. For example, the filter field above the list. Normally you have a few objects to browse only.

Could you please describe your case. What kind of objects do you want to browse as a list? Did you pre-filter them somehow e.g. by class, field value etc? How do you find among them the object(s) of interest?
Anton Katilin
 
Posts: 6025
Joined: Wed Aug 11, 2004 8:37 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Fri Apr 09, 2021 2:43 pm

Well, I'm currently analyzing an excessive RSS size of several times the heap (=> same default value for -XX:MaxDirectMemorySize and the equivalent for Netty's own allocator), so I wanted to check whether all of these DirectMemoryBuffers all had the same capacity, which could hint towards an issue with Netty...
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Anton Katilin » Fri Apr 09, 2021 4:57 pm

I think that the following features might be helpful in this case:
1. The memory inspection "NIO direct buffers native memory usage".
2. Opening all java.nio.DirectByteBuffer in Object explorer (Ctrl+N) and sorting by the "Name" column in different directions to see the maximal and minimal value.
3. Action "Memory | Objects by Field Value" (Ctrl+Shift+F) with given range of "capacity" to see how the number of found objects corresponds to the total number of the buffers.
Anton Katilin
 
Posts: 6025
Joined: Wed Aug 11, 2004 8:37 am

Re: 500 elements limit for arrays in "Object explorer"

Postby Yannis » Tue Apr 27, 2021 10:03 am

I haven't had the opportunity to check your recommendations but thanks for them : I'll keep that in mind !
Yannis
 
Posts: 20
Joined: Wed Oct 02, 2013 10:07 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

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.