comparison src/share/vm/runtime/globals.cpp @ 15805:dffc37fa7157

initialize HotSpotVMConfig fields efficiently from C++
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 20 May 2014 13:46:34 -0700
parents 4ca6dc0799b6
children 52b4284cb496
comparison
equal deleted inserted replaced
15804:bde6fbdbbe38 15805:dffc37fa7157
475 if (strlen(s) != (unsigned int) len) return false; 475 if (strlen(s) != (unsigned int) len) return false;
476 return strncmp(s, q, len) == 0; 476 return strncmp(s, q, len) == 0;
477 } 477 }
478 478
479 // Search the flag table for a named flag 479 // Search the flag table for a named flag
480 Flag* Flag::find_flag(const char* name, size_t length, bool allow_locked) { 480 Flag* Flag::find_flag(const char* name, size_t length, bool allow_locked, bool allow_constant) {
481 for (Flag* current = &flagTable[0]; current->_name != NULL; current++) { 481 for (Flag* current = &flagTable[0]; current->_name != NULL; current++) {
482 if (str_equal(current->_name, name, length)) { 482 if (str_equal(current->_name, name, length)) {
483 // Found a matching entry. 483 // Found a matching entry.
484 // Don't report notproduct and develop flags in product builds. 484 // Don't report notproduct and develop flags in product builds.
485 if (current->is_constant_in_binary()) { 485 if (current->is_constant_in_binary() && !allow_constant) {
486 return NULL; 486 return NULL;
487 } 487 }
488 // Report locked flags only if allowed. 488 // Report locked flags only if allowed.
489 if (!(current->is_unlocked() || current->is_unlocker())) { 489 if (!(current->is_unlocked() || current->is_unlocker())) {
490 if (!allow_locked) { 490 if (!allow_locked) {