Currently, in class `GCProfiler.VMSupport`, the method `newListener` initializes the field `churn` which seems not sensible when considering its name `newListener`.
And the methods `startChurnProfile` and `finishChurnProfile use the field `listener` to mark whether the profiler has started. It will create a new `Listener` each time the profiler starts and will set it to `null` when finished. Actually it is not necessary to do such instantiation because the listener don't need to be changed. And if such instantiation happens frequently, the GC may suffer from it. I know if the profiler runs only one time, the current code can reduce the space of the listener. It is a balance between time and space here, and I think it is better to save the time (instantiation time and GC time).
And the methods `startChurnProfile` and `finishChurnProfile use the field `listener` to mark whether the profiler has started. It will create a new `Listener` each time the profiler starts and will set it to `null` when finished. Actually it is not necessary to do such instantiation because the listener don't need to be changed. And if such instantiation happens frequently, the GC may suffer from it. I know if the profiler runs only one time, the current code can reduce the space of the listener. It is a balance between time and space here, and I think it is better to save the time (instantiation time and GC time).