Amrish Pandey
Amrish Pandey

Reputation: 816

How to find out code creating garbage objects

Application is creating 3GB of garbage objects and this gets garbage collected. This process of creating garbage and it's subsequent collection repeats every 30 mins. I took heap dump and could identify Unreachable Objects but there is no way to identify code creating these UnReachable objects. Please let me know if there is a way to find out code responsible for this without buying Jprofiler / YourKit.

Upvotes: 1

Views: 459

Answers (2)

LhasaDad
LhasaDad

Reputation: 2153

You might try taking a heap dump and feeding it to the Memory Analysis Tool: https://eclipse.org/mat/ It should give you some ideas of what you have a lot of and possibly where they came from.

Upvotes: 0

Chetan Naik
Chetan Naik

Reputation: 53

You can always Java Flight recorder and Java Mission Control instead of Jprofiler/YourKit. It is supported from version Oracle JDK 7 Update 40 (7u40) onwards. Unless you are not on versions lower than this.

http://www.oracle.com/technetwork/java/javaseproducts/mission-control/java-mission-control-1998576.html

https://docs.oracle.com/javacomponents/jmc.htm

Upvotes: 1

Related Questions