hotspot/src/share/vm/gc/g1/g1_globals.hpp
changeset 33144 c56850e328fc
parent 32613 73bec9f941d7
child 33771 b7ff176071ec
equal deleted inserted replaced
33143:2083f82acec8 33144:c56850e328fc
    24 
    24 
    25 #ifndef SHARE_VM_GC_G1_G1_GLOBALS_HPP
    25 #ifndef SHARE_VM_GC_G1_G1_GLOBALS_HPP
    26 #define SHARE_VM_GC_G1_G1_GLOBALS_HPP
    26 #define SHARE_VM_GC_G1_G1_GLOBALS_HPP
    27 
    27 
    28 #include "runtime/globals.hpp"
    28 #include "runtime/globals.hpp"
       
    29 #include <float.h> // for DBL_MAX
    29 //
    30 //
    30 // Defines all globals flags used by the garbage-first compiler.
    31 // Defines all globals flags used by the garbage-first compiler.
    31 //
    32 //
    32 
    33 
    33 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, range, constraint) \
    34 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, range, constraint) \
    59   diagnostic(intx, G1SummarizeRSetStatsPeriod, 0,                           \
    60   diagnostic(intx, G1SummarizeRSetStatsPeriod, 0,                           \
    60           "The period (in number of GCs) at which we will generate "        \
    61           "The period (in number of GCs) at which we will generate "        \
    61           "update buffer processing info "                                  \
    62           "update buffer processing info "                                  \
    62           "(0 means do not periodically generate this info); "              \
    63           "(0 means do not periodically generate this info); "              \
    63           "it also requires -XX:+G1SummarizeRSetStats")                     \
    64           "it also requires -XX:+G1SummarizeRSetStats")                     \
       
    65           range(0, max_intx)                                                \
    64                                                                             \
    66                                                                             \
    65   diagnostic(bool, G1TraceConcRefinement, false,                            \
    67   diagnostic(bool, G1TraceConcRefinement, false,                            \
    66           "Trace G1 concurrent refinement")                                 \
    68           "Trace G1 concurrent refinement")                                 \
    67                                                                             \
    69                                                                             \
    68   experimental(bool, G1TraceStringSymbolTableScrubbing, false,              \
    70   experimental(bool, G1TraceStringSymbolTableScrubbing, false,              \
    69           "Trace information string and symbol table scrubbing.")           \
    71           "Trace information string and symbol table scrubbing.")           \
    70                                                                             \
    72                                                                             \
    71   product(double, G1ConcMarkStepDurationMillis, 10.0,                       \
    73   product(double, G1ConcMarkStepDurationMillis, 10.0,                       \
    72           "Target duration of individual concurrent marking steps "         \
    74           "Target duration of individual concurrent marking steps "         \
    73           "in milliseconds.")                                               \
    75           "in milliseconds.")                                               \
    74           range(1.0, (double)max_uintx)                                     \
    76           range(1.0, DBL_MAX)                                               \
    75                                                                             \
    77                                                                             \
    76   product(intx, G1RefProcDrainInterval, 10,                                 \
    78   product(intx, G1RefProcDrainInterval, 10,                                 \
    77           "The number of discovered reference objects to process before "   \
    79           "The number of discovered reference objects to process before "   \
    78           "draining concurrent marking work queues.")                       \
    80           "draining concurrent marking work queues.")                       \
    79           range(1, max_intx)                                                \
    81           range(1, max_intx)                                                \
    87                "percent.")                                                  \
    89                "percent.")                                                  \
    88                range(0.001, 100.0)                                          \
    90                range(0.001, 100.0)                                          \
    89                                                                             \
    91                                                                             \
    90   product(size_t, G1SATBBufferSize, 1*K,                                    \
    92   product(size_t, G1SATBBufferSize, 1*K,                                    \
    91           "Number of entries in an SATB log buffer.")                       \
    93           "Number of entries in an SATB log buffer.")                       \
       
    94           range(1, max_uintx)                                               \
    92                                                                             \
    95                                                                             \
    93   develop(intx, G1SATBProcessCompletedThreshold, 20,                        \
    96   develop(intx, G1SATBProcessCompletedThreshold, 20,                        \
    94           "Number of completed buffers that triggers log processing.")      \
    97           "Number of completed buffers that triggers log processing.")      \
       
    98           range(0, max_jint)                                                \
    95                                                                             \
    99                                                                             \
    96   product(uintx, G1SATBBufferEnqueueingThresholdPercent, 60,                \
   100   product(uintx, G1SATBBufferEnqueueingThresholdPercent, 60,                \
    97           "Before enqueueing them, each mutator thread tries to do some "   \
   101           "Before enqueueing them, each mutator thread tries to do some "   \
    98           "filtering on the SATB buffers it generates. If post-filtering "  \
   102           "filtering on the SATB buffers it generates. If post-filtering "  \
    99           "the percentage of retained entries is over this threshold "      \
   103           "the percentage of retained entries is over this threshold "      \
   112             "Prints the liveness information for all regions in the heap "  \
   116             "Prints the liveness information for all regions in the heap "  \
   113             "at the end of a marking cycle.")                               \
   117             "at the end of a marking cycle.")                               \
   114                                                                             \
   118                                                                             \
   115   product(size_t, G1UpdateBufferSize, 256,                                  \
   119   product(size_t, G1UpdateBufferSize, 256,                                  \
   116           "Size of an update buffer")                                       \
   120           "Size of an update buffer")                                       \
       
   121           range(1, NOT_LP64(32*M) LP64_ONLY(1*G))                           \
   117                                                                             \
   122                                                                             \
   118   product(intx, G1ConcRefinementYellowZone, 0,                              \
   123   product(intx, G1ConcRefinementYellowZone, 0,                              \
   119           "Number of enqueued update buffers that will "                    \
   124           "Number of enqueued update buffers that will "                    \
   120           "trigger concurrent processing. Will be selected ergonomically "  \
   125           "trigger concurrent processing. Will be selected ergonomically "  \
   121           "by default.")                                                    \
   126           "by default.")                                                    \
       
   127           range(0, max_intx)                                                \
   122                                                                             \
   128                                                                             \
   123   product(intx, G1ConcRefinementRedZone, 0,                                 \
   129   product(intx, G1ConcRefinementRedZone, 0,                                 \
   124           "Maximum number of enqueued update buffers before mutator "       \
   130           "Maximum number of enqueued update buffers before mutator "       \
   125           "threads start processing new ones instead of enqueueing them. "  \
   131           "threads start processing new ones instead of enqueueing them. "  \
   126           "Will be selected ergonomically by default. Zero will disable "   \
   132           "Will be selected ergonomically by default. Zero will disable "   \
   127           "concurrent processing.")                                         \
   133           "concurrent processing.")                                         \
       
   134           range(0, max_intx)                                                \
   128                                                                             \
   135                                                                             \
   129   product(intx, G1ConcRefinementGreenZone, 0,                               \
   136   product(intx, G1ConcRefinementGreenZone, 0,                               \
   130           "The number of update buffers that are left in the queue by the " \
   137           "The number of update buffers that are left in the queue by the " \
   131           "concurrent processing threads. Will be selected ergonomically "  \
   138           "concurrent processing threads. Will be selected ergonomically "  \
   132           "by default.")                                                    \
   139           "by default.")                                                    \
       
   140           range(0, max_intx)                                                \
   133                                                                             \
   141                                                                             \
   134   product(intx, G1ConcRefinementServiceIntervalMillis, 300,                 \
   142   product(intx, G1ConcRefinementServiceIntervalMillis, 300,                 \
   135           "The last concurrent refinement thread wakes up every "           \
   143           "The last concurrent refinement thread wakes up every "           \
   136           "specified number of milliseconds to do miscellaneous work.")     \
   144           "specified number of milliseconds to do miscellaneous work.")     \
       
   145           range(0, max_jint)                                                \
   137                                                                             \
   146                                                                             \
   138   product(intx, G1ConcRefinementThresholdStep, 0,                           \
   147   product(intx, G1ConcRefinementThresholdStep, 0,                           \
   139           "Each time the rset update queue increases by this amount "       \
   148           "Each time the rset update queue increases by this amount "       \
   140           "activate the next refinement thread if available. "              \
   149           "activate the next refinement thread if available. "              \
   141           "Will be selected ergonomically by default.")                     \
   150           "Will be selected ergonomically by default.")                     \
   142                                                                             \
   151                                                                             \
   143   product(intx, G1RSetUpdatingPauseTimePercent, 10,                         \
   152   product(intx, G1RSetUpdatingPauseTimePercent, 10,                         \
   144           "A target percentage of time that is allowed to be spend on "     \
   153           "A target percentage of time that is allowed to be spend on "     \
   145           "process RS update buffers during the collection pause.")         \
   154           "process RS update buffers during the collection pause.")         \
       
   155           range(0, 100)                                                     \
   146                                                                             \
   156                                                                             \
   147   product(bool, G1UseAdaptiveConcRefinement, true,                          \
   157   product(bool, G1UseAdaptiveConcRefinement, true,                          \
   148           "Select green, yellow and red zones adaptively to meet the "      \
   158           "Select green, yellow and red zones adaptively to meet the "      \
   149           "the pause requirements.")                                        \
   159           "the pause requirements.")                                        \
   150                                                                             \
   160                                                                             \
   156           "The threshold that defines (>=) a hot card.")                    \
   166           "The threshold that defines (>=) a hot card.")                    \
   157           range(0, max_jubyte)                                              \
   167           range(0, max_jubyte)                                              \
   158                                                                             \
   168                                                                             \
   159   develop(intx, G1RSetRegionEntriesBase, 256,                               \
   169   develop(intx, G1RSetRegionEntriesBase, 256,                               \
   160           "Max number of regions in a fine-grain table per MB.")            \
   170           "Max number of regions in a fine-grain table per MB.")            \
       
   171           range(1, max_jint/wordSize)                                       \
   161                                                                             \
   172                                                                             \
   162   product(intx, G1RSetRegionEntries, 0,                                     \
   173   product(intx, G1RSetRegionEntries, 0,                                     \
   163           "Max number of regions for which we keep bitmaps."                \
   174           "Max number of regions for which we keep bitmaps."                \
   164           "Will be set ergonomically by default")                           \
   175           "Will be set ergonomically by default")                           \
       
   176           range(0, max_jint/wordSize)                                       \
       
   177           constraint(G1RSetRegionEntriesConstraintFunc,AfterErgo)           \
   165                                                                             \
   178                                                                             \
   166   develop(intx, G1RSetSparseRegionEntriesBase, 4,                           \
   179   develop(intx, G1RSetSparseRegionEntriesBase, 4,                           \
   167           "Max number of entries per region in a sparse table "             \
   180           "Max number of entries per region in a sparse table "             \
   168           "per MB.")                                                        \
   181           "per MB.")                                                        \
       
   182           range(1, max_jint/wordSize)                                       \
   169                                                                             \
   183                                                                             \
   170   product(intx, G1RSetSparseRegionEntries, 0,                               \
   184   product(intx, G1RSetSparseRegionEntries, 0,                               \
   171           "Max number of entries per region in a sparse table."             \
   185           "Max number of entries per region in a sparse table."             \
   172           "Will be set ergonomically by default.")                          \
   186           "Will be set ergonomically by default.")                          \
       
   187           range(0, max_jint/wordSize)                                       \
       
   188           constraint(G1RSetSparseRegionEntriesConstraintFunc,AfterErgo)     \
   173                                                                             \
   189                                                                             \
   174   develop(bool, G1RecordHRRSOops, false,                                    \
   190   develop(bool, G1RecordHRRSOops, false,                                    \
   175           "When true, record recent calls to rem set operations.")          \
   191           "When true, record recent calls to rem set operations.")          \
   176                                                                             \
   192                                                                             \
   177   develop(bool, G1RecordHRRSEvents, false,                                  \
   193   develop(bool, G1RecordHRRSEvents, false,                                  \
   178           "When true, record recent calls to rem set operations.")          \
   194           "When true, record recent calls to rem set operations.")          \
   179                                                                             \
   195                                                                             \
   180   develop(intx, G1MaxVerifyFailures, -1,                                    \
   196   develop(intx, G1MaxVerifyFailures, -1,                                    \
   181           "The maximum number of verification failures to print.  "         \
   197           "The maximum number of verification failures to print.  "         \
   182           "-1 means print all.")                                            \
   198           "-1 means print all.")                                            \
       
   199           range(-1, max_jint)                                               \
   183                                                                             \
   200                                                                             \
   184   develop(bool, G1ScrubRemSets, true,                                       \
   201   develop(bool, G1ScrubRemSets, true,                                       \
   185           "When true, do RS scrubbing after cleanup.")                      \
   202           "When true, do RS scrubbing after cleanup.")                      \
   186                                                                             \
   203                                                                             \
   187   develop(bool, G1RSScrubVerbose, false,                                    \
   204   develop(bool, G1RSScrubVerbose, false,                                    \
   191           "print out the survival rate of young regions according to age.") \
   208           "print out the survival rate of young regions according to age.") \
   192                                                                             \
   209                                                                             \
   193   develop(intx, G1YoungSurvRateNumRegionsSummary, 0,                        \
   210   develop(intx, G1YoungSurvRateNumRegionsSummary, 0,                        \
   194           "the number of regions for which we'll print a surv rate "        \
   211           "the number of regions for which we'll print a surv rate "        \
   195           "summary.")                                                       \
   212           "summary.")                                                       \
       
   213           range(0, max_intx)                                                \
       
   214           constraint(G1YoungSurvRateNumRegionsSummaryConstraintFunc,AfterErgo)\
   196                                                                             \
   215                                                                             \
   197   product(uintx, G1ReservePercent, 10,                                      \
   216   product(uintx, G1ReservePercent, 10,                                      \
   198           "It determines the minimum reserve we should have in the heap "   \
   217           "It determines the minimum reserve we should have in the heap "   \
   199           "to minimize the probability of promotion failure.")              \
   218           "to minimize the probability of promotion failure.")              \
   200           range(0, 100)                                                     \
   219           range(0, 50)                                                      \
   201                                                                             \
   220                                                                             \
   202   diagnostic(bool, G1PrintHeapRegions, false,                               \
   221   diagnostic(bool, G1PrintHeapRegions, false,                               \
   203           "If set G1 will print information on which regions are being "    \
   222           "If set G1 will print information on which regions are being "    \
   204           "allocated and which are reclaimed.")                             \
   223           "allocated and which are reclaimed.")                             \
   205                                                                             \
   224                                                                             \
   213           "When set, G1 will fail when it encounters an FP 'error', "       \
   232           "When set, G1 will fail when it encounters an FP 'error', "       \
   214           "so as to allow debugging")                                       \
   233           "so as to allow debugging")                                       \
   215                                                                             \
   234                                                                             \
   216   product(size_t, G1HeapRegionSize, 0,                                      \
   235   product(size_t, G1HeapRegionSize, 0,                                      \
   217           "Size of the G1 regions.")                                        \
   236           "Size of the G1 regions.")                                        \
       
   237           range(0, 32*M)                                                    \
       
   238           constraint(G1HeapRegionSizeConstraintFunc,AfterMemoryInit)        \
   218                                                                             \
   239                                                                             \
   219   product(uintx, G1ConcRefinementThreads, 0,                                \
   240   product(uintx, G1ConcRefinementThreads, 0,                                \
   220           "If non-0 is the number of parallel rem set update threads, "     \
   241           "If non-0 is the number of parallel rem set update threads, "     \
   221           "otherwise the value is determined ergonomically.")               \
   242           "otherwise the value is determined ergonomically.")               \
       
   243           range(0, (max_jint-1)/wordSize)                                   \
   222                                                                             \
   244                                                                             \
   223   develop(bool, G1VerifyCTCleanup, false,                                   \
   245   develop(bool, G1VerifyCTCleanup, false,                                   \
   224           "Verify card table cleanup.")                                     \
   246           "Verify card table cleanup.")                                     \
   225                                                                             \
   247                                                                             \
   226   product(size_t, G1RSetScanBlockSize, 64,                                  \
   248   product(size_t, G1RSetScanBlockSize, 64,                                  \
   227           "Size of a work unit of cards claimed by a worker thread"         \
   249           "Size of a work unit of cards claimed by a worker thread"         \
   228           "during RSet scanning.")                                          \
   250           "during RSet scanning.")                                          \
       
   251           range(1, max_uintx)                                               \
   229                                                                             \
   252                                                                             \
   230   develop(uintx, G1SecondaryFreeListAppendLength, 5,                        \
   253   develop(uintx, G1SecondaryFreeListAppendLength, 5,                        \
   231           "The number of regions we will add to the secondary free list "   \
   254           "The number of regions we will add to the secondary free list "   \
   232           "at every append operation")                                      \
   255           "at every append operation")                                      \
   233                                                                             \
   256                                                                             \
   260           constraint(G1MaxNewSizePercentConstraintFunc,AfterErgo)           \
   283           constraint(G1MaxNewSizePercentConstraintFunc,AfterErgo)           \
   261                                                                             \
   284                                                                             \
   262   experimental(uintx, G1NewSizePercent, 5,                                  \
   285   experimental(uintx, G1NewSizePercent, 5,                                  \
   263           "Percentage (0-100) of the heap size to use as default "          \
   286           "Percentage (0-100) of the heap size to use as default "          \
   264           "minimum young gen size.")                                        \
   287           "minimum young gen size.")                                        \
       
   288           range(0, 100)                                                     \
   265           constraint(G1NewSizePercentConstraintFunc,AfterErgo)              \
   289           constraint(G1NewSizePercentConstraintFunc,AfterErgo)              \
   266                                                                             \
   290                                                                             \
   267   experimental(uintx, G1MixedGCLiveThresholdPercent, 85,                    \
   291   experimental(uintx, G1MixedGCLiveThresholdPercent, 85,                    \
   268           "Threshold for regions to be considered for inclusion in the "    \
   292           "Threshold for regions to be considered for inclusion in the "    \
   269           "collection set of mixed GCs. "                                   \
   293           "collection set of mixed GCs. "                                   \