RFR: 8025856 - Fix typos in the GC code

Kirk Pepperdine kirk at kodewerk.com
Sun Oct 13 20:59:42 UTC 2013


Hi Bengt,


>> Hi,
>> 
>> In gcCause.cpp I have this...
>> 
>>     case _java_lang_system_gc:
>>       return "System.gc()";
>> 
>> This use to simply be System. Again, the arbitrary change does create added parsing difficulties when dealing with different versions of GC logs. Can I request that this string be reverted back to "System" ?
> 
> This code has been the same since revision 0:
> 
> http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/annotate/f2110083203d/src/share/vm/gc_interface/gcCause.cpp
> 
> So, to avoid the kind of log parsing issues that you mention I suggestion that we don't change this now.
> 
> I think you are referring to the fact that until a change that was made 1.5 years ago the collectors were not consistent in how they logged the GC cause when the GC was started by a call to System.gc(). The ParallelGC logged just System while the others logged System.gc(). Now that all collectors use the GC cause string they are all consistent, which I think should make parsing the logs simpler not more difficult.

Sorry but I've yet to see a System.gc() logged in the dozens upon dozens of GC logs that I've collected over the last 1.5 years. However, I've plenty that say "System". Add in that OpenJDK on OSX seems to be logging differently and quite frankly these seemingly little insignificant changes add up to a huge mess. Given that in the field we have to deal with logs from all versions of JVMs I would say that the norm in the field is "System". As such I would strongly prefer *not* to continue with "System.gc()". And best of all, it's 5 bytes shorter while conveying the same information. I think it's best that this little change can be made before 8 is released when cause will be printed by default.

I'm happy to supply the patch.

Regards,
Kirk




More information about the hotspot-gc-dev mailing list