Profiling Java running by JNI calls
Asked Answered
F

2

10

I have a C++ code that upon execution:

Loads JVM (I have full control on how to load the JVM), and call Java methods (from loaded classes) using C JNI code. The Java code has no Main() and it is actually not a standard Java application. it is mainly a static code that compiled and compacted into Jar file, the code is being called by the C++ module.

Is it possible to profile this Java code being executed by YourKit (have license for it)? If so I'll be glad to know how.

Fancy answered 20/5, 2010 at 13:57 Comment(3)
I have managed to profile using YourKit. I just added the yourkit.com/docs/80/help/agent.jsp agnent VM flag and attach the profiler to the VM.Fancy
Please consider answering your own question :)Ennis
As antispam suggests - why don't you put your finding as an answer here?Goshawk
F
0

Answer for the mass demands,

I have managed to profile using YourKit. I just added the yourkit.com/docs/80/help/agent.jsp agnent VM flag and attach the profiler to the VM.

Fancy answered 16/5, 2011 at 8:44 Comment(0)
A
0

I'll throw this out there for C++ folks looking to profile Java: Java has a great visual profiler that automatically hooks up to the JVM called VisualVM. It is included with the jdk. Check it out here: http://visualvm.java.net/

To run visual vm look for the executable in your jdk bin folder.

Agreeable answered 26/4, 2011 at 21:57 Comment(0)
F
0

Answer for the mass demands,

I have managed to profile using YourKit. I just added the yourkit.com/docs/80/help/agent.jsp agnent VM flag and attach the profiler to the VM.

Fancy answered 16/5, 2011 at 8:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.