--- a/src/hotspot/share/runtime/flags/jvmFlag.cpp Mon May 21 17:38:46 2018 +0200
+++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp Mon May 21 11:09:58 2018 -0500
@@ -1474,7 +1474,7 @@
#endif // PRODUCT
-void JVMFlag::printFlags(outputStream* out, bool withComments, bool printRanges) {
+void JVMFlag::printFlags(outputStream* out, bool withComments, bool printRanges, bool skipDefaults) {
// Print the flags sorted by name
// note: this method is called before the thread structure is in place
// which means resource allocation cannot be used.
@@ -1497,7 +1497,7 @@
}
for (size_t i = 0; i < length; i++) {
- if (array[i]->is_unlocked()) {
+ if (array[i]->is_unlocked() && !(skipDefaults && array[i]->is_default())) {
array[i]->print_on(out, withComments, printRanges);
}
}