Index: trunk/vm/gcv4/src/block_store.cpp =================================================================== --- trunk/vm/gcv4/src/block_store.cpp (revision 488646) +++ trunk/vm/gcv4/src/block_store.cpp (working copy) @@ -30,6 +30,7 @@ #include "port_malloc.h" #include "port_sysinfo.h" #include "open/vm_gc.h" +#include "open/vm.h" // GC header files #include "gc_cout.h" @@ -253,8 +254,8 @@ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// _heap_compaction_ratio = GC_FRACTION_OF_HEAP_INCREMENTAL_COMPACTED_DURING_EACH_GC; min_compaction_increment_size = GC_MIN_COMPACTION_INCREMENT_SIZE; - const char *compaction_ratio = vm_get_property_value("heap_compaction_ratio"); - if (isdigit(compaction_ratio[0])) { + const char *compaction_ratio = get_property("heap_compaction_ratio", VM_PROPERTIES); + if (compaction_ratio && isdigit(compaction_ratio[0])) { _heap_compaction_ratio = strtoul(compaction_ratio, NULL, 0); INFO("The heap_compaction_ratio is set to " << _heap_compaction_ratio); } Index: trunk/vm/gcv4/src/gc_for_vm.cpp =================================================================== --- trunk/vm/gcv4/src/gc_for_vm.cpp (revision 488646) +++ trunk/vm/gcv4/src/gc_for_vm.cpp (working copy) @@ -30,6 +30,7 @@ #include "platform_lowlevel.h" #include "open/vm_gc.h" #include "open/gc.h" +#include "open/vm.h" #include "jit_intf.h" // GC header files @@ -159,7 +160,7 @@ } static bool get_property_value_boolean(char* name) { - const char* value = vm_get_property_value(name); + const char* value = get_property(name, VM_PROPERTIES); return (NULL != value && 0 != value[0] && strcmp("0", value) != 0 @@ -168,19 +169,19 @@ } static int get_property_value_int(char* name) { - const char* value = vm_get_property_value(name); + const char* value = get_property(name, VM_PROPERTIES); return (NULL == value) ? 0 : atoi(value); } static bool is_property_set(char* name) { - const char* value = vm_get_property_value(name); + const char* value = get_property(name, VM_PROPERTIES); return (NULL != value && 0 != value[0]); } static void parse_configuration_properties() { if (is_property_set("gc.ms")) { - long sz = parse_size_string(vm_get_property_value("gc.ms")); + long sz = parse_size_string(get_property("gc.ms", VM_PROPERTIES)); if (sz > 0) { initial_heap_size_bytes = sz; } else { @@ -189,7 +190,7 @@ } if (is_property_set("gc.mx")) { - long sz = parse_size_string(vm_get_property_value("gc.mx")); + long sz = parse_size_string(get_property("gc.mx", VM_PROPERTIES)); if (sz > 0) { final_heap_size_bytes = sz; } else { @@ -265,7 +266,7 @@ INFO2("gc.verify", "GC will verify the live heap thoroughly before and after GC"); if (is_property_set("gc.thread_number")) { - force_gc_worker_thread_number = atoi(vm_get_property_value("gc.thread_number")); + force_gc_worker_thread_number = atoi(get_property("gc.thread_number", VM_PROPERTIES)); INFO2("gc.threads", "GC will use " << force_gc_worker_thread_number << " thread" << (force_gc_worker_thread_number > 1 ? "s":"") << " for collection"); @@ -350,7 +351,7 @@ TRACE2("gc.sizeof", "GC_BLOCK_INFO_SIZE_BYTES = " << GC_BLOCK_INFO_SIZE_BYTES); assert(sizeof(block_info) <= GC_BLOCK_INFO_SIZE_BYTES); #ifdef _WIN32 - if (!vm_get_boolean_property_value_with_default("vm.assert_dialog")) + if (!get_boolean_property("vm.assert_dialog", false, VM_PROPERTIES)) { TRACE2("init", "disabling assertion dialogs in GC"); disable_assert_dialogs(); @@ -395,19 +396,8 @@ // These files can be "imported" to excel since they are comma delimited. // the characterize_heap.xls file is from excel and can be used to visualize these files and the data. // - if ((strcmp (vm_get_property_value("characterize_heap"), "on") == 0) || - (strcmp (vm_get_property_value("characterize_heap"), "ON") == 0)) { - INFO("-- -------------------------------------------------- Turning characterize_heap (and verify) code on."); - characterize_heap = true; // This only works with _DEBUG on - } - - if ((strcmp (vm_get_property_value("characterize_heap"), "off") == 0) || - (strcmp (vm_get_property_value("characterize_heap"), "OFF") == 0)) { - INFO("-- -------------------------------------------------- Turning characterize_heap code off."); - characterize_heap = false; - } + characterize_heap = get_boolean_property("characterize_heap", false, VM_PROPERTIES); - // The following flag will be set to true // (by the VM calling gc_vm_initialized) when the VM is fully initialized // Till then we can't do a stop-the-world. Index: trunk/vm/gcv4/src/gc_v4.cpp =================================================================== --- trunk/vm/gcv4/src/gc_v4.cpp (revision 488646) +++ trunk/vm/gcv4/src/gc_v4.cpp (working copy) @@ -145,7 +145,7 @@ gc_stats = is_info_enabled("gc.stats"); // object stats are dangerous (may crash), so enable only by a special request - object_stats = vm_get_property_value_boolean("gc.object_stats", false); + object_stats = get_boolean_property("gc.object_stats", false, VM_PROPERTIES); }