Database probes shows only few SQL statements

Questions about YourKit Java Profiler
Post Reply
dgloeckner
Posts: 2
Joined: Mon May 05, 2014 3:59 pm

Database probes shows only few SQL statements

Post by dgloeckner »

Hi,

Database probes are quite erratic for me. Some SQL statements are shown, others not. I can't really isolate a pattern here.

I've increased probetablelengthlimit via start up options but that didn't change anything.

I'm using the built-in database probes. Is there any kind of filtering in place which could explain why some SQL statements are shown and others are not?
Can I enable logging to dig down into this?

Many thanks,
Daniel
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Database probes shows only few SQL statements

Post by Anton Katilin »

Hello Daniel

Which version of the profiler do you use?

Do you start the application with the profiler or attach the profiler to a running JVM? If latter, JVM may not apply bytecode instrumentation to some classes. Start with the profiler agent instead if you need to use the profiling modes which depend on bytecode instrumentation, such as probes or CPU tracing.

Perhaps the problem is related with probe activity modes:
http://www.yourkit.com/docs/java/help/r ... probes.jsp
By default, the Databases probe mode is Auto, i.e. it is inactive until you start CPU profiling, sampling or tracing. If this is the case, the statements of connections created before CPU profiling started will be missed if you use the current released version 2013.

Version 2014 Early Access addresses this issue, and statements of connections opened when probes were inactive are recorded too. Please try it to see if it solves the problem:
http://www.yourkit.com/eap

Best regards,
Anton
dgloeckner
Posts: 2
Joined: Mon May 05, 2014 3:59 pm

Re: Database probes shows only few SQL statements

Post by dgloeckner »

Hi Anton,

You hit the nail on its head! Some DB connections were created at application start up, before enabling CPU profiling, sampling or tracing.

I'm now giving 2014 EA a try and it works just fine :)

Many thanks for your help!

Regards,
Daniel
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Database probes shows only few SQL statements

Post by Anton Katilin »

You're welcome :)
Post Reply