1.1 --- a/src/share/vm/runtime/globals.cpp Thu Jan 05 17:16:13 2012 -0500 1.2 +++ b/src/share/vm/runtime/globals.cpp Mon Jan 09 10:27:24 2012 +0100 1.3 @@ -488,7 +488,7 @@ 1.4 } 1.5 } 1.6 1.7 -void CommandLineFlags::printSetFlags() { 1.8 +void CommandLineFlags::printSetFlags(outputStream* out) { 1.9 // Print which flags were set on the command line 1.10 // note: this method is called before the thread structure is in place 1.11 // which means resource allocation cannot be used. 1.12 @@ -507,11 +507,11 @@ 1.13 // Print 1.14 for (int i = 0; i < length; i++) { 1.15 if (array[i]->origin /* naked field! */) { 1.16 - array[i]->print_as_flag(tty); 1.17 - tty->print(" "); 1.18 + array[i]->print_as_flag(out); 1.19 + out->print(" "); 1.20 } 1.21 } 1.22 - tty->cr(); 1.23 + out->cr(); 1.24 FREE_C_HEAP_ARRAY(Flag*, array); 1.25 } 1.26 1.27 @@ -524,7 +524,7 @@ 1.28 1.29 #endif // PRODUCT 1.30 1.31 -void CommandLineFlags::printFlags(bool withComments) { 1.32 +void CommandLineFlags::printFlags(outputStream* out, bool withComments) { 1.33 // Print the flags sorted by name 1.34 // note: this method is called before the thread structure is in place 1.35 // which means resource allocation cannot be used. 1.36 @@ -541,10 +541,10 @@ 1.37 qsort(array, length, sizeof(Flag*), compare_flags); 1.38 1.39 // Print 1.40 - tty->print_cr("[Global flags]"); 1.41 + out->print_cr("[Global flags]"); 1.42 for (int i = 0; i < length; i++) { 1.43 if (array[i]->is_unlocked()) { 1.44 - array[i]->print_on(tty, withComments); 1.45 + array[i]->print_on(out, withComments); 1.46 } 1.47 } 1.48 FREE_C_HEAP_ARRAY(Flag*, array);