Which is the definitive profiling tool for Eclipse 3.7? - java

I've just started using Eclipse 3.7. Previously with Eclipse 3.6 I used a tool called TPTP for execution-time profiling (It could do a lot else besides this, but that's all I needed it for).
I note that TPTP has now been sidelined, it's no longer an active Eclipse project.
Is there a new project which replaces TPTP? There does not seem to be an equivalent tool bundled with Eclipse, so I'm wondering which is the default go-to free profiler for Eclipse 3.7?
Extra points: The class I'm profiling makes use of a lot of JNI calls. I'm not expecting to get any meaningful insight about what happens in these native calls, but I do not want the fact that I use native calls to break the profiller. For some reason TPTP on Eclipse 3.6 couldnt handle this at all!

i m working with this tool:
http://code.google.com/a/eclipselabs.org/p/jvmmonitor/
Bye

If a commercial solution is an option for you, I can recommend
http://www.yourkit.com/
or
http://www.ej-technologies.com
Although the latter made my VM crash on OSX, when I last tried. Fortunately, there's a fully working trial version...

You can try VisualVM (is not an Eclipse tool, is included into the JDK 6 Update 7 and next)

You can use JVM Monitor, which is a free Eclipse plugin in pure Java.
https://code.google.com/a/eclipselabs.org/p/jvmmonitor/
It lets you monitor JVM applications, doesn't require any special launch configuration or preparation, and uses standard JVM APIs to connect and monitor. For me it just worked moderately OK, right out-of-the-box.
It includes profiling, targets your specified packages & includes 'total time' and call trees for method profiling. These were what I needed & couldn't get with JVisualVM.

Related

Memory leak in native java aplication

Hi all!
I have a Native Java application in linux and i want detect memory weak. I try used Valgrind but seem that don't work fine. Then I tried to also install dbx (Oracle Studio) but it seems that is not available for Ubuntu 14.04. Is there another solution that can be used to detect these leaks ?
In my opinion, the best tool you can use to detect memory leaks and performance problems is JProfiler
You can easily detect both of them and it has integrations with a lot of IDEs (Eclipse, STS, Netbeans, IntelliJ, etc...).
It's not free, but you can request an evaluation key to test the tool for about 10 days.
Eclipse MAT is a good tool to analyze memory for Java applications. They have good documentation for common use cases.
A similar question was asked here

A good Java Tool to monitor the heap

I have been searching, and see that there is Jstat, VisualJVM, and even Eclipse mat tools, but they all seem to have the JDK needing to be installed.
I have a third party tool used in my .NET application (separate server instance) that has a JRE installed with it. I don't have the JDK or any Java code, but can't seem to find a tool (like windows task manager), to monitor the Java heap.
Any good (and free) suggestions, with details on why its great, would be helpful.
The eG Innovations Java Monitoring tool - http://www.eginnovations.com/web/java-monitoring.htm

Eclipse plugin to know performance of a Java program

Preferably Eclipse Plugin
Is there any Eclipse plugin which can help me in looking at performance of a Java program?
or (in case Eclipse plugin is not available)
If there isn't any Eclipse plugin, is there any other way?
Update
What about mBProfiler?
I wouldn't use TPTP, as it is no longer maintained. If you're interested in profiling, have a look at JVM Monitor. It is very similar to (J)VisualVM, but with a better integration into Eclipse in my opinion. If you're more into micro benchmarking, JBenchX might be worth a look.
If you can, use jvisualvm in the Sun Java 6 JDK.
another tool is visualvm
You can use jvisualvm to analyze the code and find bottlenecks.
you can use Eclipse Test and Performance Tools Platform (TPTP) to profile your java application

spring insight with org.codehaus.paranamer

I have a java spring GWT web application. I need to use a profiler to view why is a certain function that slow (on server)... After some searching, seems that insight is a good way... tried it and it works... what I did is create a tc server instance (developer edition) with insight and add the project to it. It works.
The problem here is that I use maven plugin "org.codehaus.paranamer", that is a plugin that I use to get function paramater names... It works post-compilation to add a special private field in the class that holds the parameters names.
This is a problem with insight since it seems that it modifies the code too and that it works on the source code not the compiled version in the target folder.
What I can do to make this work? FYI, all I need is profile the app.. not necessarily with insight....
Edit:
I ended up using visualvm... It can help with profiling the app on the cpu level and the memory level... That is the way I can use the common remote profiling mechanism jerry was talking about.
For profile of JAVA apps(including tomcat instances), I strongly recommend the TPTP(Eclipse Test & Performance Tools Platform). You can read a lot here:
http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html
Especially for TPTP working with tomcat instance:
http://www.deepakgaikwad.net/index.php/2009/02/10/tutorialprofiling-with-tptp-and-tomcat.html
Some of the information in the above article may be outdated, but main workflow is the same.
For commercial profilers, I will recommend yourkit profiler: http://www.yourkit.com/
I don't know if there is a trial edition available now, but years ago, this profile is more user friendly than TPTP.

Is JVM open source code?

Is JVM open source code? If not, how can I get the code of JVM?
It depends entirely on which JVM you use.
If you use the OpenJDK JVM, then you can get the source code from here (or here from a list of OpenJDK projects).
If you use the Kaffe JVM, you can get the source from here.
If you use the Sun JVM version 6 or later, then you can get the source from here.
If you use a Sun JVM earlier than 6, then you can often get the source under an academic license. If you use an IBM, Oracle, HP, or other JVM, then the source is not open.
Update May 2013
The Version 6 source can still be accessed by the above link, or it can be accessed via this link. This latter link also includes a handy genealogy table that shows how the Oracle JDK and OpenJDK versions match with each other.
Additionally, a more up to date version of the Java 7 source can be found here. This also includes the fixes for the releases of Java 7 since GA.
And, of no surprise to anyone, the Java 8 sources can be found here.
Have a look at hotspot JVM here: http://openjdk.java.net/groups/hotspot/
The core part of the JVM is in the hotspot module of the OpenJDK. However what you need is more likely to be in src.zip.
The hotspot module apart of those classes is
mostly in C++
not always easy to understand. This has improved over the years and new code tends to be better as they are more aware that the code will have broader consumption.
often not what you are looking for.
For this reason if you want to know how the JVM runs it is best to look at the commonly used classes. For example, even something as low level as how lambdas really work at runtime is mostly in the src.zip not much is in the JVM.
Most of the source for the libraries come with the JDK in the src.zip file. Your IDE will use that automatically. You are much better off being familiar with the classes in these libraries than playing with the JDK itself.
There is no open source jvm even if there were you can't bypass Oracle's stupid classpath exception. In short openjdk is still tied to $$ driven scheme that forces you to contend with a comercial vm. No different from Microsoft really, you can work with C# under what ever os they even provide .net libraries free but maintain control over Visual Studio which practically forces the end user to make use of Windows as the chosen environment.

Categories