I have a JVM running. For 2 different moments in time t0 and t1 I'd like to know how values for all static fields of all classes changed at t1 versus t0.
Solutions I had in mind:
- Monitor/debug/profile all static fields write access.
- Compare 2 memory snapshots, taken at t0 and t1, to find the diff in field values. I have access to Java VisualVM and YourKit profiler.
I wasn't able to find answers for either of the above.
What is the best way to achieve my goal if possible?