RFR(s): 8066822: Remove PSMarkSweep::set_reference_processor

Kim Barrett kim.barrett at oracle.com
Thu Dec 11 19:37:11 UTC 2014


On Dec 11, 2014, at 1:52 PM, Bengt Rutisson <bengt.rutisson at oracle.com> wrote:
> 
>> This counters() method seems to be a common thread through all of the parallelScavange collector classes.  There are no callers of any of those public accessors.  The Generation class provides a similar virtual counters() function.  I didn’t discover users of that function either, but might not have looked hard enough.  It might be that Generation::counters() *is* used, and that the bug is that the parallelScavange collector counters are not hooked into the same mechanism.   It might instead be that nobody presently uses any of them, but they can provide useful information for development.  Or this might all be vestigial code that should be eliminated.  Given the broader scope of enquiry and potential code changes, I’d like to keep the counters() stuff separate from the small localized change under review.
> 
> The counters are being used but it is not that easy to track down. The counters are of class, CollectorCounters and if you look at the constructor for that class, CollectorCounters::CollectorCounters(), you see that it registers itself with the PerfDataManager. The is a way to expose some "perf counters" to consumers outside of the JVM. I am not 100% sure of all uses, but I think there are for example MBeans to ask for these values.

Thanks for the explanation.  I found some of that but stopped looking once I realized the scope of exploration was getting well beyond this one little change.

> Thus, I don't think we can remove the counters instances. But I think we could clean up the access methods and exposure of the counters. However, I'm fine with doing that at another time.

OK.  I’ll file an RFE to look into cleaning this up.



More information about the hotspot-gc-dev mailing list