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.

Filtering Java proxy classes

Moderators: Vladimir Kondratyev, Anton Katilin

Filtering Java proxy classes

Postby nmishkin » Fri May 08, 2020 12:42 pm

I tried to add a filter with the pattern "com.sun.proxy.*" but it seemed to have no effect. Is there a way to filter out Java proxy classes?
nmishkin
 
Posts: 2
Joined: Fri May 08, 2020 12:37 pm

Re: Filtering Java proxy classes

Postby Anton Katilin » Fri May 08, 2020 3:45 pm

Could you please explain what you are doing and what you try to achieve.

Do you perform CPU profiling or analyze a memory snapshot?

Filters reduce the depth of call trees and length of stack traces, by skipping successive calls of methods from filtered classes, so you can more easily see the methods of the profiled application:
https://www.yourkit.com/docs/java/help/filters.jsp
Anton Katilin
 
Posts: 5922
Joined: Wed Aug 11, 2004 8:37 am

Re: Filtering Java proxy classes

Postby nmishkin » Mon May 11, 2020 4:02 pm

I'm new to YourKit so I might not be using it right and I might be using the terminology wrong, but in answer to your question: I'm doing CPU profiling and then capturing a performance snapshot. I'm then looking at the "Call tree - All threads merged" view and drilling into stack traces. Our application makes heavy use of the Spring Framework. Spring makes heavy use of Java proxy objects. As a result, the stack contains things like this:

Code: Select all
> BTProjectServiceImpl.java:591 com.belmonttech.service.impl.BTProjectServiceImpl.findPermissionsForUser(BTProject, String, String)
    > BTProjectServiceImpl.java:624 <...> com.sun.proxy.$Proxy268.findRolesByProjectAndUser(String, String)
        > BTProjectServiceImpl.java:624 <...> com.sun.proxy.$Proxy268.findRolesByProjectAndUser(String, String)


I tried adding com.sun.proxy.* to the list of filters but it appeared to have no effect.
nmishkin
 
Posts: 2
Joined: Fri May 08, 2020 12:37 pm

Re: Filtering Java proxy classes

Postby Anton Katilin » Mon May 11, 2020 6:03 pm

Thank you for the explanation. The UI works as intended. Filters collapse a sequence of filtered methods into a single call to the top method called from a non-filtered method. There is no way to totally eliminate some intermediate methods from call sequences.
Anton Katilin
 
Posts: 5922
Joined: Wed Aug 11, 2004 8:37 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.