355 bool is_unlocker() const;
356 bool is_unlocked() const;
357 bool is_writeable() const;
358 bool is_external() const;
359
360 bool is_unlocker_ext() const;
361 bool is_unlocked_ext() const;
362 bool is_writeable_ext() const;
363 bool is_external_ext() const;
364
365 void unlock_diagnostic();
366
367 void get_locked_message(char*, int) const;
368 void get_locked_message_ext(char*, int) const;
369
370 // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
371 void print_on(outputStream* st, bool withComments = false, bool printRanges = false);
372 void print_kind(outputStream* st);
373 void print_as_flag(outputStream* st);
374
375 static const char* flag_error_str(Flag::Error error) {
376 switch (error) {
377 case Flag::MISSING_NAME: return "MISSING_NAME";
378 case Flag::MISSING_VALUE: return "MISSING_VALUE";
379 case Flag::NON_WRITABLE: return "NON_WRITABLE";
380 case Flag::OUT_OF_BOUNDS: return "OUT_OF_BOUNDS";
381 case Flag::VIOLATES_CONSTRAINT: return "VIOLATES_CONSTRAINT";
382 case Flag::INVALID_FLAG: return "INVALID_FLAG";
383 case Flag::ERR_OTHER: return "ERR_OTHER";
384 case Flag::SUCCESS: return "SUCCESS";
385 default: return "NULL";
386 }
387 }
388 };
389
390 // debug flags control various aspects of the VM and are global accessible
391
392 // use FlagSetting to temporarily change some debug flag
393 // e.g. FlagSetting fs(DebugThisAndThat, true);
394 // restored to previous value upon leaving scope
395 class FlagSetting {
396 bool val;
397 bool* flag;
398 public:
399 FlagSetting(bool& fl, bool newValue) { flag = &fl; val = fl; fl = newValue; }
400 ~FlagSetting() { *flag = val; }
401 };
402
403
404 class CounterSetting {
405 intx* counter;
406 public:
407 CounterSetting(intx* cnt) { counter = cnt; (*counter)++; }
1555 \
1556 product(uintx, ParallelOldDeadWoodLimiterStdDev, 80, \
1557 "The standard deviation used by the parallel compact dead wood " \
1558 "limiter (a number between 0-100)") \
1559 range(0, 100) \
1560 \
1561 product(uint, ParallelGCThreads, 0, \
1562 "Number of parallel threads parallel gc will use") \
1563 \
1564 product(bool, UseDynamicNumberOfGCThreads, false, \
1565 "Dynamically choose the number of parallel threads " \
1566 "parallel gc will use") \
1567 \
1568 diagnostic(bool, ForceDynamicNumberOfGCThreads, false, \
1569 "Force dynamic selection of the number of " \
1570 "parallel threads parallel gc will use to aid debugging") \
1571 \
1572 product(size_t, HeapSizePerGCThread, ScaleForWordSize(64*M), \
1573 "Size of heap (bytes) per GC thread used in calculating the " \
1574 "number of GC threads") \
1575 range((uintx)os::vm_page_size(), max_uintx) \
1576 \
1577 product(bool, TraceDynamicGCThreads, false, \
1578 "Trace the dynamic GC thread usage") \
1579 \
1580 develop(bool, ParallelOldGCSplitALot, false, \
1581 "Provoke splitting (copying data from a young gen space to " \
1582 "multiple destination spaces)") \
1583 \
1584 develop(uintx, ParallelOldGCSplitInterval, 3, \
1585 "How often to provoke splitting a young gen space") \
1586 range(0, max_uintx) \
1587 \
1588 product(uint, ConcGCThreads, 0, \
1589 "Number of threads concurrent gc will use") \
1590 \
1591 product(size_t, YoungPLABSize, 4096, \
1592 "Size of young gen promotion LAB's (in HeapWords)") \
1593 constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit) \
1594 \
1595 product(size_t, OldPLABSize, 1024, \
1836 \
1837 product(uintx, CMSIndexedFreeListReplenish, 4, \
1838 "Replenish an indexed free list with this number of chunks") \
1839 \
1840 product(bool, CMSReplenishIntermediate, true, \
1841 "Replenish all intermediate free-list caches") \
1842 \
1843 product(bool, CMSSplitIndexedFreeListBlocks, true, \
1844 "When satisfying batched demand, split blocks from the " \
1845 "IndexedFreeList whose size is a multiple of requested size") \
1846 \
1847 product(bool, CMSLoopWarn, false, \
1848 "Warn in case of excessive CMS looping") \
1849 \
1850 develop(bool, CMSOverflowEarlyRestoration, false, \
1851 "Restore preserved marks early") \
1852 \
1853 product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M), \
1854 "Size of marking stack") \
1855 \
1856 product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M), \
1857 "Maximum size of marking stack") \
1858 range(1, (max_jint - 1)) \
1859 \
1860 notproduct(bool, CMSMarkStackOverflowALot, false, \
1861 "Simulate frequent marking stack / work queue overflow") \
1862 \
1863 notproduct(uintx, CMSMarkStackOverflowInterval, 1000, \
1864 "An \"interval\" counter that determines how frequently " \
1865 "to simulate overflow; a smaller number increases frequency") \
1866 \
1867 product(uintx, CMSMaxAbortablePrecleanLoops, 0, \
1868 "Maximum number of abortable preclean iterations, if > 0") \
1869 \
1870 product(intx, CMSMaxAbortablePrecleanTime, 5000, \
1871 "Maximum time in abortable preclean (in milliseconds)") \
1872 \
1873 product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \
1874 "Nominal minimum work per abortable preclean iteration") \
1875 \
|
355 bool is_unlocker() const;
356 bool is_unlocked() const;
357 bool is_writeable() const;
358 bool is_external() const;
359
360 bool is_unlocker_ext() const;
361 bool is_unlocked_ext() const;
362 bool is_writeable_ext() const;
363 bool is_external_ext() const;
364
365 void unlock_diagnostic();
366
367 void get_locked_message(char*, int) const;
368 void get_locked_message_ext(char*, int) const;
369
370 // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
371 void print_on(outputStream* st, bool withComments = false, bool printRanges = false);
372 void print_kind(outputStream* st);
373 void print_as_flag(outputStream* st);
374
375 static const char* flag_error_str(Flag::Error error);
376 };
377
378 // debug flags control various aspects of the VM and are global accessible
379
380 // use FlagSetting to temporarily change some debug flag
381 // e.g. FlagSetting fs(DebugThisAndThat, true);
382 // restored to previous value upon leaving scope
383 class FlagSetting {
384 bool val;
385 bool* flag;
386 public:
387 FlagSetting(bool& fl, bool newValue) { flag = &fl; val = fl; fl = newValue; }
388 ~FlagSetting() { *flag = val; }
389 };
390
391
392 class CounterSetting {
393 intx* counter;
394 public:
395 CounterSetting(intx* cnt) { counter = cnt; (*counter)++; }
1543 \
1544 product(uintx, ParallelOldDeadWoodLimiterStdDev, 80, \
1545 "The standard deviation used by the parallel compact dead wood " \
1546 "limiter (a number between 0-100)") \
1547 range(0, 100) \
1548 \
1549 product(uint, ParallelGCThreads, 0, \
1550 "Number of parallel threads parallel gc will use") \
1551 \
1552 product(bool, UseDynamicNumberOfGCThreads, false, \
1553 "Dynamically choose the number of parallel threads " \
1554 "parallel gc will use") \
1555 \
1556 diagnostic(bool, ForceDynamicNumberOfGCThreads, false, \
1557 "Force dynamic selection of the number of " \
1558 "parallel threads parallel gc will use to aid debugging") \
1559 \
1560 product(size_t, HeapSizePerGCThread, ScaleForWordSize(64*M), \
1561 "Size of heap (bytes) per GC thread used in calculating the " \
1562 "number of GC threads") \
1563 range((size_t)os::vm_page_size(), (size_t)max_uintx) \
1564 \
1565 product(bool, TraceDynamicGCThreads, false, \
1566 "Trace the dynamic GC thread usage") \
1567 \
1568 develop(bool, ParallelOldGCSplitALot, false, \
1569 "Provoke splitting (copying data from a young gen space to " \
1570 "multiple destination spaces)") \
1571 \
1572 develop(uintx, ParallelOldGCSplitInterval, 3, \
1573 "How often to provoke splitting a young gen space") \
1574 range(0, max_uintx) \
1575 \
1576 product(uint, ConcGCThreads, 0, \
1577 "Number of threads concurrent gc will use") \
1578 \
1579 product(size_t, YoungPLABSize, 4096, \
1580 "Size of young gen promotion LAB's (in HeapWords)") \
1581 constraint(YoungPLABSizeConstraintFunc,AfterMemoryInit) \
1582 \
1583 product(size_t, OldPLABSize, 1024, \
1824 \
1825 product(uintx, CMSIndexedFreeListReplenish, 4, \
1826 "Replenish an indexed free list with this number of chunks") \
1827 \
1828 product(bool, CMSReplenishIntermediate, true, \
1829 "Replenish all intermediate free-list caches") \
1830 \
1831 product(bool, CMSSplitIndexedFreeListBlocks, true, \
1832 "When satisfying batched demand, split blocks from the " \
1833 "IndexedFreeList whose size is a multiple of requested size") \
1834 \
1835 product(bool, CMSLoopWarn, false, \
1836 "Warn in case of excessive CMS looping") \
1837 \
1838 develop(bool, CMSOverflowEarlyRestoration, false, \
1839 "Restore preserved marks early") \
1840 \
1841 product(size_t, MarkStackSize, NOT_LP64(32*K) LP64_ONLY(4*M), \
1842 "Size of marking stack") \
1843 \
1844 /* where does the range max value of (max_jint - 1) come from? */ \
1845 product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M), \
1846 "Maximum size of marking stack") \
1847 range(1, (max_jint - 1)) \
1848 \
1849 notproduct(bool, CMSMarkStackOverflowALot, false, \
1850 "Simulate frequent marking stack / work queue overflow") \
1851 \
1852 notproduct(uintx, CMSMarkStackOverflowInterval, 1000, \
1853 "An \"interval\" counter that determines how frequently " \
1854 "to simulate overflow; a smaller number increases frequency") \
1855 \
1856 product(uintx, CMSMaxAbortablePrecleanLoops, 0, \
1857 "Maximum number of abortable preclean iterations, if > 0") \
1858 \
1859 product(intx, CMSMaxAbortablePrecleanTime, 5000, \
1860 "Maximum time in abortable preclean (in milliseconds)") \
1861 \
1862 product(uintx, CMSAbortablePrecleanMinWorkPerIteration, 100, \
1863 "Nominal minimum work per abortable preclean iteration") \
1864 \
|