Make several HotSpot flags manageable

Srinivas Ramakrishna ysr1729 at gmail.com
Tue Feb 10 10:36:08 UTC 2015


Thanks Kirk, David, Staffan for yr advice and feedback. I'll keep these in mind and look at the JEP as well. I'm traveling at the moment and won't get back to this for at least a week, but will be in touch when I start work. Will do the work incrementally while keeping careful track of perf impacts.

Thanks!
-- ramki


ysr1729

> On Feb 9, 2015, at 13:27, Staffan Larsen <staffan.larsen at oracle.com> wrote:
> 
> Hi Ramki,
> 
> This is a very worthwhile effort and I would appreciate your contribution. As you point out, every flag is different and needs its own consideration (both functionally and performance wise). Therefore, I would suggest any resulting patches are for one flag at a time.
> 
> Also, you might want to keep an eye on JEP 158: Unified JVM Logging [1] which includes the ability to turn on and off specific logging at runtime.  Over time all JVM logging will move to this framework and this may be good place to make that transition for some of the flags. Also, turning on and off JVM logging does not change the “external exported interface” as the addition of a manageable flag would do.
> 
> (BTW, the bug tracker of choice is JBS, not Bugzilla: https://bugs.openjdk.java.net/)
> 
> Thanks,
> /Staffan 
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8046148
> 
>> On 7 feb 2015, at 03:04, Srinivas Ramakrishna <ysr1729 at gmail.com> wrote:
>> 
>> There are a bunch of Hotspot flags (several of them in GC, but also non-GC
>> ones) that switch on various printing options.
>> These started out historically as product flags but it might make sense to
>> make them manageable to allow greater field
>> serviceability of the VM in order to manually switch on verbose print
>> options for debugging running JVM operation.
>> If there is interest, I'd like to open (if one isn't already open) a bug on
>> openjdk bugzilla and offer a patch.
>> 
>> A prime example is SafepointDelay and PrintSafepointDelay, but there are a
>> whole bunch of more such options, for example,
>> the following from a syntactic filter to catch a sample. The idea isn't to
>> only touch those flags which control the emission
>> of logging/stats from the jvm, not alter its behaviour otherwise in any
>> manner.
>> 
>> Is there appetite for this kind of change? In most cases nothing would be
>> needed other than to flip the flag from product to
>> manageable. In other cases, one would need to make sure to use a
>> periodically taken snapshot of the flag to allow cosistency
>> in the work done in various routines involved in one "round" of
>> logging/stats.
>> 
>> The following is a syntactic sample, and more work would be needed to go
>> over these flags and others to determine the specific
>> change needed. I plan to do that and produce the patch once there is some
>> agreement that this would be a positive step.
>> 
>> Please let me know your thoughts/reactions/comments etc., but it would
>> improve HotSpot's field debuggability/serviceability story
>> by quite a bit to do this.
>> 
>> thanks, and have a good weekend!
>> -- ramki (openjdk: ysr)
>> 
>> % $currentjdk/bin/java -XX:+PrintFlagsFinal -version | grep -v manag | grep
>> -i print
>> 
>>     bool CMSPrintChunksInDump                      = false
>>              {product}
>> 
>>     bool CMSPrintEdenSurvivorChunks                = false
>>              {product}
>> 
>>     bool CMSPrintObjectsInDump                     = false
>>              {product}
>> 
>>     bool PrintAdaptiveSizePolicy                   = false
>>              {product}
>> 
>>     bool PrintCMSInitiationStatistics              = false
>>              {product}
>> 
>>     intx PrintCMSStatistics                        = 0
>>              {product}
>> 
>>     bool PrintCodeCache                            = false
>>              {product}
>> 
>>     bool PrintCodeCacheOnCompilation               = false
>>              {product}
>> 
>>     bool PrintCommandLineFlags                     = false
>>              {product}
>> 
>>     bool PrintCompilation                          = false
>>              {product}
>> 
>>     intx PrintFLSCensus                            = 0
>>              {product}
>> 
>>     intx PrintFLSStatistics                        = 0
>>              {product}
>> 
>>     bool PrintFlagsFinal                          := true
>>              {product}
>> 
>>     bool PrintFlagsInitial                         = false
>>              {product}
>> 
>>     bool PrintGCApplicationConcurrentTime          = false
>>              {product}
>> 
>>     bool PrintGCApplicationStoppedTime             = false
>>              {product}
>> 
>>     bool PrintGCCause                              = true
>>              {product}
>> 
>>     bool PrintGCTaskTimeStamps                     = false
>>              {product}
>> 
>>     bool PrintHeapAtGC                             = false
>>              {product rw}
>> 
>>     bool PrintHeapAtGCExtended                     = false
>>              {product rw}
>> 
>>     bool PrintHeapAtSIGBREAK                       = true
>>              {product}
>> 
>>     bool PrintJNIGCStalls                          = false
>>              {product}
>> 
>>     bool PrintJNIResolving                         = false
>>              {product}
>> 
>>     bool PrintOldPLAB                              = false
>>              {product}
>> 
>>     bool PrintOopAddress                           = false
>>              {product}
>> 
>>     bool PrintPLAB                                 = false
>>              {product}
>> 
>>     bool PrintParallelOldGCPhaseTimes              = false
>>              {product}
>> 
>>     bool PrintPromotionFailure                     = false
>>              {product}
>> 
>>     bool PrintReferenceGC                          = false
>>              {product}
>> 
>>     bool PrintSafepointStatistics                  = false
>>              {product}
>> 
>>     intx PrintSafepointStatisticsCount             = 300
>>              {product}
>> 
>>     intx PrintSafepointStatisticsTimeout           = -1
>>              {product}
>> 
>>     bool PrintSharedSpaces                         = false
>>              {product}
>> 
>>     bool PrintStringDeduplicationStatistics        = false
>>              {product}
>> 
>>     bool PrintStringTableStatistics                = false
>>              {product}
>> 
>>     bool PrintTLAB                                 = false
>>              {product}
>> 
>>     bool PrintTenuringDistribution                 = false
>>              {product}
>> 
>>     bool PrintTieredEvents                         = false
>>              {product}
>> 
>>     bool PrintVMOptions                            = false
>>              {product}
>> 
>>     bool PrintVMQWaitTime                          = false
>>              {product}
>> 
>>     bool PrintWarnings                             = true
>>              {product}
>> 
>>     bool ProfilerPrintByteCodeStatistics           = false
>>              {product}
>> 
>> 
>> I know not all of the following or those above can necessarily be made
>> manageable, but this is a possible
>> 
>> starting point for the work/investigation.....
>> 
>> % $currentjdk/bin/java -XX:+PrintFlagsFinal -version | grep -v manag | grep
>> -i trace | grep produc
>> 
>> ...
>> 
>>     intx BCEATraceLevel                            = 0
>>              {product}
>> 
>>     bool DTraceAllocProbes                         = false
>>              {product}
>> 
>>     bool DTraceMethodProbes                        = false
>>              {product}
>> 
>>     bool DTraceMonitorProbes                       = false
>>              {product}
>> 
>>     bool ExtendedDTraceProbes                      = false
>>              {product}
>> 
>>     bool JavaMonitorsInStackTrace                  = true
>>              {product}
>> 
>>     intx MaxJavaStackTraceDepth                    = 1024
>>              {product}
>> 
>>     bool OmitStackTraceInFastThrow                 = true
>>              {product}
>> 
>>     bool StackTraceInThrowable                     = true
>>              {product}
>> 
>>     bool TraceBiasedLocking                        = false
>>              {product}
>> 
>>     bool TraceClassLoading                         = false
>>              {product rw}
>> 
>>     bool TraceClassLoadingPreorder                 = false
>>              {product}
>> 
>>     bool TraceClassResolution                      = false
>>              {product}
>> 
>>     bool TraceClassUnloading                       = false
>>              {product rw}
>> 
>>     bool TraceDynamicGCThreads                     = false
>>              {product}
>> 
>>     bool TraceGen0Time                             = false
>>              {product}
>> 
>>     bool TraceGen1Time                             = false
>>              {product}
>> 
>>    ccstr TraceJVMTI                                =
>>              {product}
>> 
>>     bool TraceLoaderConstraints                    = false
>>              {product rw}
>> 
>>     bool TraceMetadataHumongousAllocation          = false
>>              {product}
>> 
>>     bool TraceMonitorInflation                     = false
>>              {product}
>> 
>>     bool TraceParallelOldGCTasks                   = false
>>              {product}
>> 
>>     intx TraceRedefineClasses                      = 0
>>              {product}
>> 
>>     bool TraceSafepointCleanupTime                 = false
>>              {product}
>> 
>>     bool TraceSuspendWaitFailures                  = false
>>              {product}
> 


More information about the hotspot-dev mailing list