Avoid LinkedBlockingQueue.take and similar methods

Questions about YourKit Java Profiler
Post Reply
Jesse
Posts: 3
Joined: Thu Apr 17, 2025 9:29 pm

Avoid LinkedBlockingQueue.take and similar methods

Post by Jesse »

Hello,

I'm trying to filter out methods that are simply blocking from the Call Tree view - All Threads merged when CPU Sampling.

CPU Sampling Settings: "time=cpu"
I tried setting filters to filter them out. Neither seem to work.

Image
Image

Am I missing something? How can I eliminate this? Running latest version.

Thank you
Jesse
Vladimir Kondratyev
Posts: 1669
Joined: Tue Aug 10, 2004 7:52 pm

Re: Avoid LinkedBlockingQueue.take and similar methods

Post by Vladimir Kondratyev »

Are filters enabled in "Settings > Apply Filters"?

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Jesse
Posts: 3
Joined: Thu Apr 17, 2025 9:29 pm

Re: Avoid LinkedBlockingQueue.take and similar methods

Post by Jesse »

Vladimir Kondratyev wrote: Tue Apr 22, 2025 8:20 am Are filters enabled in "Settings > Apply Filters"?
Yes they are enabled! You can see in my screenshot that the "Apply Filters" radio button in checked, but it is also checked in the dropdown menu too.
Vladimir Kondratyev
Posts: 1669
Joined: Tue Aug 10, 2004 7:52 pm

Re: Avoid LinkedBlockingQueue.take and similar methods

Post by Vladimir Kondratyev »

1) Please send your filter configuration to support@yourkit.com for further investigation. The filters are located in the file ~/.yjp/config/filters-j2006.xml.

2) After a quick look at the take() method, I can say that it should not be filtered out. It is a single filtered method within a method chain. Filtering does not mean the method is excluded entirely. The profiler always displays the first and last methods in a chain of sequentially filtered method calls.
For example, if you have a filtered method chain like a() -> b() -> c() -> d(), the profiler will show a() -> d() to preserve context—indicating that you entered the filtered method chain at a() and exited at d().

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Jesse
Posts: 3
Joined: Thu Apr 17, 2025 9:29 pm

Re: Avoid LinkedBlockingQueue.take and similar methods

Post by Jesse »

Okay, I will contact support@yourkit.com. I guess the main thing I'm looking for is to exclude blocking methods (and their entire chain) like Thread.sleep entirely so that I get an accurate measure of what's actually consuming processing power. I had thought that the "time=cpu" versus wall-time measuring was the way to do this, but it does not seem to make a difference. I will mention this when I contact support.
Post Reply