equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
401 #endif |
401 #endif |
402 |
402 |
403 st->cr(); |
403 st->cr(); |
404 |
404 |
405 } else if (!is_bool() && !is_ccstr()) { |
405 } else if (!is_bool() && !is_ccstr()) { |
406 |
406 st->print("%9s %-50s ", _type, _name); |
407 if (printRanges) { |
407 |
408 |
408 CommandLineFlagRangeList::print(_name, st, true); |
409 st->print("%9s %-50s ", _type, _name); |
409 |
410 |
410 st->print(" %-20s", " "); |
411 CommandLineFlagRangeList::print(_name, st, true); |
411 print_kind(st); |
412 |
|
413 st->print(" %-20s", " "); |
|
414 print_kind(st); |
|
415 |
412 |
416 #ifndef PRODUCT |
413 #ifndef PRODUCT |
417 if (withComments) { |
414 if (withComments) { |
418 st->print("%s", _doc); |
415 st->print("%s", _doc); |
419 } |
416 } |
420 #endif |
417 #endif |
421 |
418 |
422 st->cr(); |
419 st->cr(); |
423 |
|
424 } |
|
425 } |
420 } |
426 } |
421 } |
427 |
422 |
428 void Flag::print_kind(outputStream* st) { |
423 void Flag::print_kind(outputStream* st) { |
429 struct Data { |
424 struct Data { |
1253 assert(Arguments::check_vm_args_consistency(), "Some flag settings conflict"); |
1248 assert(Arguments::check_vm_args_consistency(), "Some flag settings conflict"); |
1254 } |
1249 } |
1255 |
1250 |
1256 #endif // PRODUCT |
1251 #endif // PRODUCT |
1257 |
1252 |
1258 #define ONLY_PRINT_PRODUCT_FLAGS |
|
1259 |
|
1260 void CommandLineFlags::printFlags(outputStream* out, bool withComments, bool printRanges) { |
1253 void CommandLineFlags::printFlags(outputStream* out, bool withComments, bool printRanges) { |
1261 // Print the flags sorted by name |
1254 // Print the flags sorted by name |
1262 // note: this method is called before the thread structure is in place |
1255 // note: this method is called before the thread structure is in place |
1263 // which means resource allocation cannot be used. |
1256 // which means resource allocation cannot be used. |
1264 |
1257 |
1279 out->print_cr("[Global flags ranges]"); |
1272 out->print_cr("[Global flags ranges]"); |
1280 } |
1273 } |
1281 |
1274 |
1282 for (size_t i = 0; i < length; i++) { |
1275 for (size_t i = 0; i < length; i++) { |
1283 if (array[i]->is_unlocked()) { |
1276 if (array[i]->is_unlocked()) { |
1284 #ifdef ONLY_PRINT_PRODUCT_FLAGS |
|
1285 if (!array[i]->is_notproduct() && !array[i]->is_develop()) |
|
1286 #endif // ONLY_PRINT_PRODUCT_FLAGS |
|
1287 array[i]->print_on(out, withComments, printRanges); |
1277 array[i]->print_on(out, withComments, printRanges); |
1288 } |
1278 } |
1289 } |
1279 } |
1290 FREE_C_HEAP_ARRAY(Flag*, array); |
1280 FREE_C_HEAP_ARRAY(Flag*, array); |
1291 } |
1281 } |