< 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"

*** 693,10 ***
--- 694,15 ---
    //       called as part of error reporting, so handle native OOMs gracefully.
  
    // The last entry is the null entry.
    constexpr size_t length = (sizeof(flagTable) / sizeof(JVMFlag)) - 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]");

*** 722,10 ***
--- 728,12 ---
      if (bestFlag != nullptr) {
        bestFlag->print_on(out, withComments, printRanges);
        iteratorMarkers.at_put(bestFlagIndex, true);
      }
    }
+   if (xtty_owns(out))
+     xtty->tail(tag);
  }
  
  void JVMFlag::printError(bool verbose, const char* msg, ...) {
    if (verbose) {
      va_list listPointer;
< prev index next >