< prev index next >

src/hotspot/share/runtime/flags/jvmFlag.cpp

Print this page
@@ -24,10 +24,11 @@
  
  #include "precompiled.hpp"
  #include "jfr/jfrEvents.hpp"
  #include "jvm_io.h"
  #include "memory/allocation.inline.hpp"
+ #include "memory/universe.hpp"
  #include "runtime/arguments.hpp"
  #include "runtime/flags/jvmFlag.hpp"
  #include "runtime/flags/jvmFlagAccess.hpp"
  #include "runtime/flags/jvmFlagLookup.hpp"
  #include "runtime/globals_extension.hpp"

@@ -702,10 +703,15 @@
    //       called as part of error reporting, so handle native OOMs gracefully.
  
    // The last entry is the null entry.
    const size_t length = JVMFlag::numFlags - 1;
  
+   const char* tag = 0;
+   if (xtty_owns(out))
+     xtty->head("%s", tag = !Universe::is_fully_initialized()
+                ? "vm_flags_initial" : "vm_flags_final");
+ 
    // Print
    if (!printRanges) {
      out->print_cr("[Global flags]");
    } else {
      out->print_cr("[Global flags ranges]");

@@ -731,10 +737,12 @@
        if (flagTable[i].is_unlocked() && !(skipDefaults && flagTable[i].is_default())) {
          flagTable[i].print_on(out, withComments, printRanges);
        }
      }
    }
+   if (xtty_owns(out))
+     xtty->tail(tag);
  }
  
  void JVMFlag::printError(bool verbose, const char* msg, ...) {
    if (verbose) {
      va_list listPointer;
< prev index next >