mmtk-openjdk icon indicating copy to clipboard operation
mmtk-openjdk copied to clipboard

Fix memory leak due to incorrect root scanning

Open wenyuzhao opened this issue 3 years ago • 2 comments

This PR fixes memory leaks caused by incorrect root scanning.

Pointers in CodeCache, StringTable and WeakProcessor are not treated as roots. The processing of these object storage is postponed to the end of tracing. Pointers in these object storages are either removed (if they are dead) or forwarded (if they're moved).

Note that some benchmarks still leak, due to the missing of weak-ref processing and class unloading. These are not addressed in this PR and is expected to be fixed in the future (we should already have issues for weak-ref and class unloading).

TODO: do a benchmark

wenyuzhao avatar Feb 22 '22 05:02 wenyuzhao

@qinsoon is it possible to trigger a benchmark github action here? like the ones we did to the mmtk-core PRs?

wenyuzhao avatar Feb 22 '22 06:02 wenyuzhao

@qinsoon is it possible to trigger a benchmark github action here? like the ones we did to the mmtk-core PRs?

Unfortunately we can't. Those are only set up for mmtk-core yet. I can set up performance CI for OpenJDK, as we are doing more development work for OpenJDK and it is probably necessary/worth to set up performance CI.

qinsoon avatar Feb 22 '22 22:02 qinsoon