8203292: Print complete set of flags in the hs_err file
Prints non-default flags to hs_err file Reviewed-by: gziemski, dholmes
This commit is contained in:
parent
cffef5d38c
commit
48fb34d596
@ -1474,7 +1474,7 @@ void JVMFlag::verify() {
|
||||
|
||||
#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 @@ void JVMFlag::printFlags(outputStream* out, bool withComments, bool printRanges)
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ public:
|
||||
static void printSetFlags(outputStream* out);
|
||||
|
||||
// printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
|
||||
static void printFlags(outputStream* out, bool withComments, bool printRanges = false);
|
||||
static void printFlags(outputStream* out, bool withComments, bool printRanges = false, bool skipDefaults = false);
|
||||
|
||||
static void verify() PRODUCT_RETURN;
|
||||
};
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "runtime/vmThread.hpp"
|
||||
#include "runtime/vm_operations.hpp"
|
||||
#include "runtime/vm_version.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/decoder.hpp"
|
||||
@ -911,6 +912,17 @@ void VMError::report(outputStream* st, bool _verbose) {
|
||||
st->cr();
|
||||
}
|
||||
|
||||
STEP("printing flags")
|
||||
|
||||
if (_verbose) {
|
||||
JVMFlag::printFlags(
|
||||
st,
|
||||
true, // with comments
|
||||
false, // no ranges
|
||||
true); // skip defaults
|
||||
st->cr();
|
||||
}
|
||||
|
||||
STEP("printing warning if internal testing API used")
|
||||
|
||||
if (WhiteBox::used()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user