Is there a JVM option (-XX
or otherwise) to log objects that are queued to be finalized? I'm debugging an application that has excessive finalizers which results in a huge amount of java.lang.ref.Finalizer
instances (as seen in YourKit Java Profiler). It's difficult from looking at YourKit profiler which root object's finalize
method is causing all the Finalizer
instances.
Asked
Active
Viewed 238 times
2

Steve Kuo
- 61,876
- 75
- 195
- 257
1 Answers
0
Do -verbose:gc, -XX:+PrintGCDetails and -XX:+PrintGCTimeStamps give you enough info?

daveb
- 74,111
- 6
- 45
- 51
-
No, those switches do not contain the specific objects being collected or finalized. – Steve Kuo Apr 03 '12 at 18:07
-
In that case, I think you'll have to put some code on those finalizers. – daveb Apr 04 '12 at 07:09