Memory leak in native java aplication - java

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

Related

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

Profiling for java in eclipse juno

I have to optimize performance of a team project (in eclipse Juno).
To identify the bottle neck (timing) i'm searching for a tool or plugin.
There seems to be a good platform TPTP, but this is not supported anymore in Eclipse Juno.
JVM is a good start but seems not sufficient for a deeper analysis.
Did you have some good pratices for an integrated Plugin in Eclipse Juno?
If not maybe some standalone tool is succiecent as well.
There are several big solution in Java profiler world:
JProfiler
YourKit
JVisualVM, (Standart Oracle JDK tool)
JProfiler and YourKit are powerful tools for analyzing big EE application. Personally I most prefer YourKit. It has easy intergation with Eclipse. But it all is paid solution and not always you need to buy this one.
If you has not very complex application try to use JVisualVM at first. It should be enough to wide range of performance problem analyzing. To monitoring GC behavior it has great VisualGC plugin. With VIsualGC plugin, making heap dumps and analyzing it with MAT you are able to perfectly tune GC if you need.
I am a big fan of JProfiler and it has a Eclipse plugin too.
In this SO post you can find how it works.

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

Which is the definitive profiling tool for Eclipse 3.7?

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.

How to test the performance of a java application?

I've created a stand alone java desktop application using Netbeans. I want a way to test the performance of my application. I need some tool with the help of which my application can be evaluated. I heard about Software metrics, is this related to my context. Or is there any tool or plugin available in Netbeans through which I can test.
Have a look at the Netbeans Profiler:
http://netbeans.org/features/java/profiler.html
Netbeans has one of the best profilers going for Java apps, it runs well and provides as much detail as you want. Since you're using Netbeans I'd take advantage of it!
In terms of tutorials, there's one here about memory leaks and how to debug / discover them using the profiler. Once you get going with it the other features should come pretty easily.

Categories