On Wed, Aug 31, 2011 at 10:00 AM, Maucci, Cyrille <[email protected]> wrote:
> Hey gents,
>
> I probably have a dumb question (if there are dumb questions...).
>
> I always thought that system level profiling tools/framework like perf-events 
> or Oprofile or Caliper ... being used to profile java based applications were 
> only good to show the high-level breakdown between CPU time exec'ed in java 
> code and CPU time exec'ed in 'native' (JNI) code, i.e. something like
> 20% spent exec'ing JNI code vs. 80% spent in exec'ing pure java code.
>
> But if you want the breakdown of the 80% spent in java code, i.e. the perf 
> java methods breakdown, etc.... You need to use a java profiler (Jrockit 
> Mission Control, Jprofiler, etc...) and can't expect this information to be 
> provided by perf-events / Oprofile / Caliper /etc...
>
> Comments ?

Tools like Oprofile and perf can collect program counter samples.  If
the JVM provides information on where native code blocks live in
memory, it is possible to map them back to the actual Java methods
that live there.  For each sample you look up the PC in the mapping
structure that the JVM has provided for the profiler.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to