Index: vm/em/src/DrlEMImpl.cpp =================================================================== --- vm/em/src/DrlEMImpl.cpp (revision 643905) +++ vm/em/src/DrlEMImpl.cpp (working copy) @@ -24,6 +24,7 @@ #include "EdgeProfileCollector.h" #include "NValueProfileCollector.h" +#include "open/vm_properties.h" #include "jit_import.h" #include "em_intf.h" #include "open/vm.h" @@ -193,9 +194,9 @@ std::string path = origPath; if (path.find('/') == path.npos && path.find('\\') == path.npos ) { - char* c_string_tmp_value = get_property(O_A_H_VM_VMDIR, JAVA_PROPERTIES); + char* c_string_tmp_value = vm_properties_get_value(O_A_H_VM_VMDIR, JAVA_PROPERTIES); std::string dir = c_string_tmp_value == NULL ? "" : c_string_tmp_value; - destroy_property_value(c_string_tmp_value); + vm_properties_destroy_value(c_string_tmp_value); if (libPrefix.length() > 0 && !startsWith(path, libPrefix)) { path = libPrefix + path; } @@ -278,15 +279,15 @@ } else if (startsWith(line, "-D") && (idx = line.find('=')) != std::string::npos) { std::string name = line.substr(2, idx-2); std::string value = line.substr(idx+1); - if (!is_property_set(name.c_str(), JAVA_PROPERTIES)) { - set_property(name.c_str(), value.c_str(), JAVA_PROPERTIES); + if (!vm_property_is_set(name.c_str(), JAVA_PROPERTIES)) { + vm_properties_set_value(name.c_str(), value.c_str(), JAVA_PROPERTIES); } continue; } else if (startsWith(line, "-XD") && (idx = line.find('=')) != std::string::npos) { std::string name = line.substr(3, idx-3); std::string value = line.substr(idx+1); - if (!is_property_set(name.c_str(),VM_PROPERTIES)) { - set_property(name.c_str(), value.c_str(), VM_PROPERTIES); + if (!vm_property_is_set(name.c_str(),VM_PROPERTIES)) { + vm_properties_set_value(name.c_str(), value.c_str(), VM_PROPERTIES); } continue; } else if (startsWith(line, "-XX:") && line.length() >= 5) { @@ -309,8 +310,8 @@ } } - if (!is_property_set(name.c_str(),VM_PROPERTIES)) { - set_property(name.c_str(), value.c_str(), VM_PROPERTIES); + if (!vm_property_is_set(name.c_str(),VM_PROPERTIES)) { + vm_properties_set_value(name.c_str(), value.c_str(), VM_PROPERTIES); } continue; } @@ -326,12 +327,12 @@ } std::string DrlEMImpl::readConfiguration() { - char* c_string_tmp_value = get_property("em.properties", VM_PROPERTIES); + char* c_string_tmp_value = vm_properties_get_value("em.properties", VM_PROPERTIES); std::string configFileName = c_string_tmp_value == NULL ? "" : c_string_tmp_value; - destroy_property_value(c_string_tmp_value); + vm_properties_destroy_value(c_string_tmp_value); if (configFileName.empty()) { - bool jitTiMode = get_boolean_property("vm.jvmti.enabled", FALSE, VM_PROPERTIES); - bool interpreterMode = get_boolean_property("vm.use_interpreter", FALSE, VM_PROPERTIES); + bool jitTiMode = vm_property_get_boolean("vm.jvmti.enabled", FALSE, VM_PROPERTIES); + bool interpreterMode = vm_property_get_boolean("vm.use_interpreter", FALSE, VM_PROPERTIES); configFileName = interpreterMode ? "interpreter" : (jitTiMode ? "ti" : "client"); } if (!endsWith(configFileName, EM_CONFIG_EXT)) { @@ -339,9 +340,9 @@ } if (configFileName.find('/') == configFileName.npos && configFileName.find('\\') == configFileName.npos ) { - c_string_tmp_value = get_property(O_A_H_VM_VMDIR, JAVA_PROPERTIES); + c_string_tmp_value = vm_properties_get_value(O_A_H_VM_VMDIR, JAVA_PROPERTIES); std::string defaultConfigDir = c_string_tmp_value == NULL ? "" : c_string_tmp_value; - destroy_property_value(c_string_tmp_value); + vm_properties_destroy_value(c_string_tmp_value); configFileName = defaultConfigDir + "/" + configFileName; } @@ -405,13 +406,13 @@ std::string DrlEMImpl::getJITLibFromCmdLine(const std::string& jitName) const { std::string propName = std::string("em.")+jitName+".jitPath"; - char* c_string_tmp_value = get_property(propName.c_str(), VM_PROPERTIES); + char* c_string_tmp_value = vm_properties_get_value(propName.c_str(), VM_PROPERTIES); std::string jitLib = c_string_tmp_value == NULL ? "" : c_string_tmp_value; - destroy_property_value(c_string_tmp_value); + vm_properties_destroy_value(c_string_tmp_value); if (jitLib.empty()) { - c_string_tmp_value = get_property("em.jitPath", VM_PROPERTIES); + c_string_tmp_value = vm_properties_get_value("em.jitPath", VM_PROPERTIES); jitLib = c_string_tmp_value == NULL ? "" : c_string_tmp_value; - destroy_property_value(c_string_tmp_value); + vm_properties_destroy_value(c_string_tmp_value); } return jitLib; } Index: vm/gc_gen/src/common/gc_for_vm.cpp =================================================================== --- vm/gc_gen/src/common/gc_for_vm.cpp (revision 643905) +++ vm/gc_gen/src/common/gc_for_vm.cpp (working copy) @@ -20,6 +20,7 @@ */ #include +#include "open/vm_properties.h" #include "port_sysinfo.h" #include "vm_threads.h" #include "jit_runtime_support.h" @@ -57,7 +58,7 @@ static void init_gc_helpers() { - set_property("vm.component.classpath.gc_gen", "gc_gen.jar", VM_PROPERTIES); + vm_properties_set_value("vm.component.classpath.gc_gen", "gc_gen.jar", VM_PROPERTIES); vm_helper_register_magic_helper(VM_RT_NEW_RESOLVED_USING_VTABLE_AND_SIZE, "org/apache/harmony/drlvm/gc_gen/GCHelper", "alloc"); vm_helper_register_magic_helper(VM_RT_NEW_VECTOR_USING_VTABLE, "org/apache/harmony/drlvm/gc_gen/GCHelper", "allocArray"); vm_helper_register_magic_helper(VM_RT_GC_HEAP_WRITE_REF, "org/apache/harmony/drlvm/gc_gen/GCHelper", "write_barrier_slot_rem"); Index: vm/gc_gen/src/common/gc_options.cpp =================================================================== --- vm/gc_gen/src/common/gc_options.cpp (revision 643905) +++ vm/gc_gen/src/common/gc_options.cpp (working copy) @@ -16,6 +16,7 @@ */ #include "gc_common.h" +#include "open/vm_properties.h" /* FIXME:: need refactoring this function to distribute the options interpretation to their respective modules. */ @@ -93,75 +94,37 @@ return gc; } -static int get_int_property(const char *property_name) +static int vm_property_get_integer(const char *property_name) { assert(property_name); - char *value = get_property(property_name, VM_PROPERTIES); - int return_value; - if (NULL != value) - { - return_value = atoi(value); - destroy_property_value(value); - }else{ + if(!vm_property_is_set(property_name, VM_PROPERTIES)) { DIE2("gc.base","Warning: property value "<generate_barrier = gc_is_gen_mode(); - if (is_property_set("gc.generate_barrier", VM_PROPERTIES) == 1) { - Boolean generate_barrier = get_boolean_property("gc.generate_barrier"); + if (vm_property_is_set("gc.generate_barrier", VM_PROPERTIES) == 1) { + Boolean generate_barrier = vm_property_get_boolean("gc.generate_barrier"); gc->generate_barrier = (generate_barrier || gc->generate_barrier); } @@ -239,8 +201,8 @@ POINTER_SIZE_INT max_heap_size = HEAP_SIZE_DEFAULT; POINTER_SIZE_INT min_heap_size = min_heap_size_bytes; - if (is_property_set("gc.mx", VM_PROPERTIES) == 1) { - max_heap_size = get_size_property("gc.mx"); + if (vm_property_is_set("gc.mx", VM_PROPERTIES) == 1) { + max_heap_size = vm_property_get_size("gc.mx"); if (max_heap_size < min_heap_size){ max_heap_size = min_heap_size; @@ -258,8 +220,8 @@ } } - if (is_property_set("gc.ms", VM_PROPERTIES) == 1) { - min_heap_size = get_size_property("gc.ms"); + if (vm_property_is_set("gc.ms", VM_PROPERTIES) == 1) { + min_heap_size = vm_property_get_size("gc.ms"); if (min_heap_size < min_heap_size_bytes){ min_heap_size = min_heap_size_bytes; WARN2("gc.base","Warning: Min heap size you set is too small, reset to "<generate_barrier = TRUE; } - if (is_property_set("gc.heap_iteration", VM_PROPERTIES) == 1) { - JVMTI_HEAP_ITERATION = get_boolean_property("gc.heap_iteration"); + if (vm_property_is_set("gc.heap_iteration", VM_PROPERTIES) == 1) { + JVMTI_HEAP_ITERATION = vm_property_get_boolean("gc.heap_iteration"); } - if (is_property_set("gc.ignore_vtable_tracing", VM_PROPERTIES) == 1) { - IGNORE_VTABLE_TRACING = get_boolean_property("gc.ignore_vtable_tracing"); + if (vm_property_is_set("gc.ignore_vtable_tracing", VM_PROPERTIES) == 1) { + IGNORE_VTABLE_TRACING = vm_property_get_boolean("gc.ignore_vtable_tracing"); } - if (is_property_set("gc.use_large_page", VM_PROPERTIES) == 1){ - char* value = get_property("gc.use_large_page", VM_PROPERTIES); + if (vm_property_is_set("gc.use_large_page", VM_PROPERTIES) == 1){ + char* value = vm_properties_get_value("gc.use_large_page", VM_PROPERTIES); large_page_hint = strdup(value); - destroy_property_value(value); + vm_properties_destroy_value(value); } - if (is_property_set("gc.concurrent_gc", VM_PROPERTIES) == 1){ - Boolean use_all_concurrent_phase= get_boolean_property("gc.concurrent_gc"); + if (vm_property_is_set("gc.concurrent_gc", VM_PROPERTIES) == 1){ + Boolean use_all_concurrent_phase= vm_property_get_boolean("gc.concurrent_gc"); if(use_all_concurrent_phase){ USE_CONCURRENT_ENUMERATION = TRUE; USE_CONCURRENT_MARK = TRUE; @@ -355,24 +317,24 @@ } } - if (is_property_set("gc.concurrent_enumeration", VM_PROPERTIES) == 1){ - USE_CONCURRENT_ENUMERATION= get_boolean_property("gc.concurrent_enumeration"); + if (vm_property_is_set("gc.concurrent_enumeration", VM_PROPERTIES) == 1){ + USE_CONCURRENT_ENUMERATION= vm_property_get_boolean("gc.concurrent_enumeration"); if(USE_CONCURRENT_ENUMERATION){ USE_CONCURRENT_GC = TRUE; gc->generate_barrier = TRUE; } } - if (is_property_set("gc.concurrent_mark", VM_PROPERTIES) == 1){ - USE_CONCURRENT_MARK= get_boolean_property("gc.concurrent_mark"); + if (vm_property_is_set("gc.concurrent_mark", VM_PROPERTIES) == 1){ + USE_CONCURRENT_MARK= vm_property_get_boolean("gc.concurrent_mark"); if(USE_CONCURRENT_MARK){ USE_CONCURRENT_GC = TRUE; gc->generate_barrier = TRUE; } } - if (is_property_set("gc.concurrent_sweep", VM_PROPERTIES) == 1){ - USE_CONCURRENT_SWEEP= get_boolean_property("gc.concurrent_sweep"); + if (vm_property_is_set("gc.concurrent_sweep", VM_PROPERTIES) == 1){ + USE_CONCURRENT_SWEEP= vm_property_get_boolean("gc.concurrent_sweep"); if(USE_CONCURRENT_SWEEP){ USE_CONCURRENT_GC = TRUE; } @@ -380,39 +342,39 @@ char* concurrent_algo = NULL; - if (is_property_set("gc.concurrent_algorithm", VM_PROPERTIES) == 1) { - concurrent_algo = get_property("gc.concurrent_algorithm", VM_PROPERTIES); + if (vm_property_is_set("gc.concurrent_algorithm", VM_PROPERTIES) == 1) { + concurrent_algo = vm_properties_get_value("gc.concurrent_algorithm", VM_PROPERTIES); } gc_decide_concurrent_algorithm(concurrent_algo); #if defined(ALLOC_ZEROING) && defined(ALLOC_PREFETCH) - if(is_property_set("gc.prefetch",VM_PROPERTIES) ==1) { - PREFETCH_ENABLED = get_boolean_property("gc.prefetch"); + if(vm_property_is_set("gc.prefetch",VM_PROPERTIES) ==1) { + PREFETCH_ENABLED = vm_property_get_boolean("gc.prefetch"); } - if(is_property_set("gc.prefetch_distance",VM_PROPERTIES)==1) { - PREFETCH_DISTANCE = get_size_property("gc.prefetch_distance"); + if(vm_property_is_set("gc.prefetch_distance",VM_PROPERTIES)==1) { + PREFETCH_DISTANCE = vm_property_get_size("gc.prefetch_distance"); if(!PREFETCH_ENABLED) { WARN2("gc.prefetch_distance","Warning: Prefetch distance set with Prefetch disabled!"); } } - if(is_property_set("gc.prefetch_stride",VM_PROPERTIES)==1) { - PREFETCH_STRIDE = get_size_property("gc.prefetch_stride"); + if(vm_property_is_set("gc.prefetch_stride",VM_PROPERTIES)==1) { + PREFETCH_STRIDE = vm_property_get_size("gc.prefetch_stride"); if(!PREFETCH_ENABLED) { WARN2("gc.prefetch_stride","Warning: Prefetch stride set with Prefetch disabled!"); } } - if(is_property_set("gc.zeroing_size",VM_PROPERTIES)==1) { - ZEROING_SIZE = get_size_property("gc.zeroing_size"); + if(vm_property_is_set("gc.zeroing_size",VM_PROPERTIES)==1) { + ZEROING_SIZE = vm_property_get_size("gc.zeroing_size"); } #endif #ifdef PREFETCH_SUPPORTED - if(is_property_set("gc.mark_prefetch",VM_PROPERTIES) ==1) { - mark_prefetch = get_boolean_property("gc.mark_prefetch"); + if(vm_property_is_set("gc.mark_prefetch",VM_PROPERTIES) ==1) { + mark_prefetch = vm_property_get_boolean("gc.mark_prefetch"); } #endif Index: vm/include/open/types.h =================================================================== --- vm/include/open/types.h (revision 643905) +++ vm/include/open/types.h (working copy) @@ -96,11 +96,4 @@ typedef void *GC_Enumeration_Handle; -//tmp location -typedef enum { - VM_PROPERTIES = 0, - JAVA_PROPERTIES = 1 - } PropertyTable; - - #endif //!_VM_TYPES_H_ Index: vm/include/open/vm_properties.h =================================================================== --- vm/include/open/vm_properties.h (revision 0) +++ vm/include/open/vm_properties.h (revision 0) @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef __PROPERTIES_H__ +#define __PROPERTIES_H__ + +#include +#include "open/common.h" +#include "open/platform_types.h" + +typedef enum { VM_PROPERTIES = 0, JAVA_PROPERTIES = 1 } PropertyTable; + +/** + * Sets the property for table_number property table. NULL value is supported. + */ +DECLARE_OPEN(void, vm_properties_set_value, (const char* key, const char* value, PropertyTable table_number)); + +/** + * @return The value of the property from table_number property table if it + * has been set by vm_properties_set_value function. Otherwise NULL. + */ +DECLARE_OPEN(char*, vm_properties_get_value, (const char* key, PropertyTable table_number)); + +/** + * Safety frees memory of value returned by vm_properties_get_value function. + */ +DECLARE_OPEN(void, vm_properties_destroy_value, (char* value)); + +/** + * Checks if the property is set. + * + * @return -1 if table_number is incorrect.
+ * 1 if property is set in table_number property table.
+ * 0 otherwise. + */ +DECLARE_OPEN(int, vm_property_is_set, (const char* key, PropertyTable table_number)); + +/** + * @return An array of keys from table_number properties table. + */ +DECLARE_OPEN(char**, vm_properties_get_keys, (PropertyTable table_number)); + +/** + * @return An array of keys which start with specified prefix from + * table_number properties table. + */ +DECLARE_OPEN(char**, vm_properties_get_keys_starting_with, (const char* prefix, PropertyTable table_number)); + +/** + * Safety frees array of keys memory which returned by vm_properties_get_keys + * or vm_properties_get_keys_starting_with functions. + */ +DECLARE_OPEN(void, vm_properties_destroy_keys, (char** keys)); + +/** + * Tries to interpret property value as Boolean and returns it. + * In case of failure returns default_value. + */ +DECLARE_OPEN(BOOLEAN, vm_property_get_boolean, (const char* property, BOOLEAN default_value, PropertyTable table_number)); + +/** + * Tries to interpret property value as int and returns it. In case of failure + * returns default_value. + */ +DECLARE_OPEN(int, vm_property_get_integer, (const char *property_name, int default_value, PropertyTable table_number)); + +/** + * Tries to interpret property value as int and returns it. + * In case of failure returns default_value. + * Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes + * (for example, 32k is the same as 32768). + */ +DECLARE_OPEN(size_t, vm_property_get_size, (const char *property_name, size_t default_value, PropertyTable table_number)); + +#endif Property changes on: vm/include/open/vm_properties.h ___________________________________________________________________ Name: svn:executable + * Index: vm/include/open/vm_interface.h =================================================================== --- vm/include/open/vm_interface.h (revision 643905) +++ vm/include/open/vm_interface.h (working copy) @@ -117,14 +117,6 @@ PROTOTYPE_WITH_NAME(UDATA , vm_tls_is_fast, (void));//UDATA VMCALL hythread_uses_fast_tls PROTOTYPE_WITH_NAME(IDATA , vm_get_tls_offset_in_segment, (void));//IDATA VMCALL hythread_get_hythread_offset_in_tls(void) - -PROTOTYPE_WITH_NAME(void , vm_properties_destroy_keys, (char** keys));//void destroy_properties_keys(char** keys) -PROTOTYPE_WITH_NAME(void , vm_properties_destroy_value, (char* value));//void destroy_property_value(char* value) -PROTOTYPE_WITH_NAME(char** , vm_properties_get_keys, (PropertyTable table_number));//char** get_properties_keys(PropertyTable table_number); -PROTOTYPE_WITH_NAME(char** , vm_properties_get_keys_starting_with, (const char* prefix, PropertyTable table_number));//get_properties_keys_staring_with -PROTOTYPE_WITH_NAME(char* , vm_properties_get_value, (const char* key, PropertyTable table_number));//char* get_property(const char* key, PropertyTable table_number) - - PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_object_class, ()); // get_system_object_class PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_class_class, ()); // get_system_class_class PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_string_class, ()); // get_system_string_class Index: vm/include/open/vm.h =================================================================== --- vm/include/open/vm.h (revision 643905) +++ vm/include/open/vm.h (working copy) @@ -567,76 +567,6 @@ VMEXPORT unsigned vm_get_vtable_ptr_size(); /** - * Sets the property for table_number property table. NULL value is supported. - */ -VMEXPORT void set_property(const char* key, const char* value, PropertyTable table_number); - -/** - * @return The value of the property from table_number property table if it - * has been set by set_property function. Otherwise NULL. - */ -VMEXPORT char* get_property(const char* key, PropertyTable table_number); - -/** - * Safety frees memory of value returned by get_property function. - */ -VMEXPORT void destroy_property_value(char* value); - -/** - * Checks if the property is set. - * - * @return -1 if table_number is incorrect.
- * 1 if property is set in table_number property table.
- * 0 otherwise. - */ -VMEXPORT int is_property_set(const char* key, PropertyTable table_number); - -/** - * Unsets the property in table_number property table. - */ -VMEXPORT void unset_property(const char* key, PropertyTable table_number); - -/** - * @return An array of keys from table_number properties table. - */ -VMEXPORT char** get_properties_keys(PropertyTable table_number); - -/** - * @return An array of keys which start with specified prefix from - * table_number properties table. - */ -VMEXPORT char** get_properties_keys_staring_with(const char* prefix, PropertyTable table_number); - -/** - * Safety frees array of keys memory which returned by get_properties_keys - * or get_properties_keys_staring_with functions. - */ -VMEXPORT void destroy_properties_keys(char** keys); - -/** - * Tries to interpret property value as Boolean and returns it. - * In case of failure returns default_value. - */ -VMEXPORT Boolean get_boolean_property(const char* property, Boolean default_value, PropertyTable table_number); - -/** - * Tries to interpret property value as int and returns it. In case of failure - * returns default_value. - */ -VMEXPORT int get_int_property(const char *property_name, int default_value, PropertyTable table_number); - -/** - * Tries to interpret property value as int and returns it. In case of failure - * returns default_value. - */ -VMEXPORT size_t get_size_property(const char *property_name, size_t default_value, PropertyTable table_number); - - -//Tries to interpret property value as int and returns it. In case of failure returns default_value. -// Numbers can include 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes (for example, 32k is the same as 32768). -VMEXPORT int64 get_numerical_property(const char *property_name, int64 default_value, PropertyTable table_number); - -/** * Returns the address of the global flag that specifies whether * MethodEntry event is enabled. JIT should call this function in case * a method is compiled with exe_notify_method_entry flag set. Index: vm/vmcore/build/vmcore.exp =================================================================== --- vm/vmcore/build/vmcore.exp (revision 643905) +++ vm/vmcore/build/vmcore.exp (working copy) @@ -91,8 +91,8 @@ class_cp_get_method_descriptor; class_cp_get_method_name; curr_arg; - destroy_properties_keys; - destroy_property_value; + vm_properties_destroy_keys; + vm_properties_destroy_value; field_get_address; field_get_class; field_get_class_of_field_type; @@ -121,18 +121,17 @@ gc_max_memory; gc_time_since_last_gc; gc_total_memory; - get_boolean_property; + vm_property_get_boolean; get_curr_arg_class; get_file_and_line; - get_int_property; + vm_property_get_integer; get_jvalue_arg_array; get_method_entry_flag_address; get_method_exit_flag_address; - get_numerical_property; - get_properties_keys; - get_properties_keys_staring_with; - get_property; - get_size_property; + vm_properties_get_keys; + vm_properties_get_keys_starting_with; + vm_properties_get_value; + vm_property_get_size; get_system_class_class; get_system_object_class; get_system_string_class; @@ -144,7 +143,7 @@ is_info_enabled; is_it_finalize_thread; is_log_enabled; - is_property_set; + vm_property_is_set; is_trace_enabled; is_warn_enabled; Java_java_lang_ClassLoader_defineClass0; @@ -546,7 +545,7 @@ set_native_finalizer_thread_flag; set_native_ref_enqueue_thread_flag; set_out; - set_property; + vm_properties_set_value; set_thread_specific_out; set_threshold; shutdown_log_system; @@ -569,7 +568,6 @@ type_info_is_vector; type_info_is_void; uncompress_compressed_reference; - unset_property; vector_first_element_offset; vector_first_element_offset_class_handle; vector_first_element_offset_unboxed; Index: vm/vmcore/src/jvmti/jvmti.cpp =================================================================== --- vm/vmcore/src/jvmti/jvmti.cpp (revision 643905) +++ vm/vmcore/src/jvmti/jvmti.cpp (working copy) @@ -30,10 +30,10 @@ #include "jvmti.h" #include "jvmti_internal.h" #include "jvmti_utils.h" +#include "open/vm_properties.h" #include "open/vm_util.h" #include "environment.h" #include -#include "properties.h" #include "jvmti_break_intf.h" #include "interpreter_exports.h" @@ -317,11 +317,11 @@ !strncmp(option, "-Xrun", 5)) { TRACE2("jvmti", "Enabling EM JVMTI mode"); - set_property("vm.jvmti.enabled", "true", VM_PROPERTIES); + vm_properties_set_value("vm.jvmti.enabled", "true", VM_PROPERTIES); break; } } - if (TRUE == get_boolean_property("vm.jvmti.enabled", FALSE, VM_PROPERTIES)) { + if (TRUE == vm_property_get_boolean("vm.jvmti.enabled", FALSE, VM_PROPERTIES)) { p_env->TI->setEnabled(); } } @@ -517,14 +517,14 @@ const char *lib_name, char **p_path1, char **p_path2) { - char *vm_libs = vm->vm_env->JavaProperties()->get("vm.boot.library.path"); + char *vm_libs = vm_properties_get_value("vm.boot.library.path", JAVA_PROPERTIES); assert(vm_libs); char *path1 = apr_pstrdup(pool, vm_libs); char *path2 = port_dso_name_decorate(lib_name, pool); path1 = port_filepath_merge(path1, path2, pool); *p_path1 = path1; *p_path2 = path2; - vm->vm_env->VmProperties()->destroy(vm_libs); + vm_properties_destroy_value(vm_libs); } jint load_agentlib(Agent *agent, const char *str, JavaVM_Internal *vm) @@ -656,7 +656,7 @@ { status = true; - cml_report_inlined = (bool) get_boolean_property( + cml_report_inlined = (bool) vm_property_get_boolean( "vm.jvmti.compiled_method_load.inlined", FALSE, VM_PROPERTIES); Index: vm/vmcore/src/jvmti/jvmti_property.cpp =================================================================== --- vm/vmcore/src/jvmti/jvmti_property.cpp (revision 643905) +++ vm/vmcore/src/jvmti/jvmti_property.cpp (working copy) @@ -24,6 +24,7 @@ #include +#include "open/vm_properties.h" #include "jvmti_direct.h" #include "jvmti_utils.h" #include "environment.h" @@ -78,7 +79,7 @@ const char* bcp_property = XBOOTCLASSPATH_A; // get bootclasspath property - char *bcp_prop = get_property(bcp_property, VM_PROPERTIES); + char *bcp_prop = vm_properties_get_value(bcp_property, VM_PROPERTIES); size_t len_bcp = 0; @@ -94,17 +95,17 @@ strcpy(new_bcp + len_bcp + 1, segment); // update bootclasspath property - set_property(bcp_property, new_bcp, VM_PROPERTIES); - set_property(bcp_property, new_bcp, JAVA_PROPERTIES); + vm_properties_set_value(bcp_property, new_bcp, VM_PROPERTIES); + vm_properties_set_value(bcp_property, new_bcp, JAVA_PROPERTIES); STD_FREE(new_bcp); } else { // update bootclasspath property - set_property(bcp_property, segment, VM_PROPERTIES); - set_property(bcp_property, segment, JAVA_PROPERTIES); + vm_properties_set_value(bcp_property, segment, VM_PROPERTIES); + vm_properties_set_value(bcp_property, segment, JAVA_PROPERTIES); } - destroy_property_value(bcp_prop); + vm_properties_destroy_value(bcp_prop); return JVMTI_ERROR_NONE; } @@ -145,7 +146,7 @@ jint properties_count = 0; - char** keys = get_properties_keys(JAVA_PROPERTIES); + char** keys = vm_properties_get_keys(JAVA_PROPERTIES); while(keys[properties_count] != NULL) properties_count++; @@ -164,7 +165,7 @@ for (int jjj = 0; jjj < iii; jjj++) _deallocate((unsigned char *)prop_names_array[iii]); _deallocate((unsigned char *)prop_names_array); - destroy_properties_keys(keys); + vm_properties_destroy_keys(keys); return errorCode; } strcpy(prop_names_array[iii], keys[iii]); @@ -172,7 +173,7 @@ *count_ptr = properties_count; *property_ptr = prop_names_array; - destroy_properties_keys(keys); + vm_properties_destroy_keys(keys); return JVMTI_ERROR_NONE; } @@ -201,7 +202,7 @@ if (NULL == property || NULL == value_ptr) return JVMTI_ERROR_NULL_POINTER; - char *value = get_property(property, JAVA_PROPERTIES); + char *value = vm_properties_get_value(property, JAVA_PROPERTIES); if (NULL == value) return JVMTI_ERROR_NOT_AVAILABLE; @@ -211,7 +212,7 @@ strcpy(ret, value); *value_ptr = ret; } - destroy_property_value(value); + vm_properties_destroy_value(value); return errorCode; } @@ -244,7 +245,7 @@ return JVMTI_ERROR_NOT_AVAILABLE; Global_Env *vm_env = ((TIEnv*)env)->vm->vm_env; - set_property(property, value, JAVA_PROPERTIES); + vm_properties_set_value(property, value, JAVA_PROPERTIES); return JVMTI_ERROR_NONE; } Index: vm/vmcore/src/class_support/C_Interface.cpp =================================================================== --- vm/vmcore/src/class_support/C_Interface.cpp (revision 643905) +++ vm/vmcore/src/class_support/C_Interface.cpp (working copy) @@ -22,6 +22,7 @@ #define LOG_DOMAIN "vm.core" #include "cxxlog.h" +#include "open/vm_properties.h" #include "classloader.h" #include "lock_manager.h" #include "compile.h" @@ -2231,7 +2232,7 @@ return CC_Vm; } //vm_managed_calling_convention -void set_property(const char* key, const char* value, PropertyTable table_number) +void vm_properties_set_value(const char* key, const char* value, PropertyTable table_number) { assert(key); switch(table_number) { @@ -2246,7 +2247,7 @@ } } -char* get_property(const char* key, PropertyTable table_number) +char* vm_properties_get_value(const char* key, PropertyTable table_number) { assert(key); char* value; @@ -2264,7 +2265,7 @@ return value; } -void destroy_property_value(char* value) +void vm_properties_destroy_value(char* value) { if (value) { @@ -2273,7 +2274,7 @@ } } -int is_property_set(const char* key, PropertyTable table_number) +int vm_property_is_set(const char* key, PropertyTable table_number) { int value; assert(key); @@ -2291,23 +2292,8 @@ return value; } -void unset_property(const char* key, PropertyTable table_number) +char** vm_properties_get_keys(PropertyTable table_number) { - assert(key); - switch(table_number) { - case JAVA_PROPERTIES: - VM_Global_State::loader_env->JavaProperties()->unset(key); - break; - case VM_PROPERTIES: - VM_Global_State::loader_env->VmProperties()->unset(key); - break; - default: - ASSERT(0, "Unknown property table: " << table_number); - } -} - -char** get_properties_keys(PropertyTable table_number) -{ char** value; switch(table_number) { case JAVA_PROPERTIES: @@ -2323,7 +2309,7 @@ return value; } -char** get_properties_keys_staring_with(const char* prefix, PropertyTable table_number) +char** vm_properties_get_keys_starting_with(const char* prefix, PropertyTable table_number) { assert(prefix); char** value; @@ -2341,7 +2327,7 @@ return value; } -void destroy_properties_keys(char** keys) +void vm_properties_destroy_keys(char** keys) { if (keys) { @@ -2350,49 +2336,23 @@ } } -int get_int_property(const char *property_name, int default_value, PropertyTable table_number) +int vm_property_get_integer(const char *property_name, int default_value, PropertyTable table_number) { assert(property_name); - char *value = get_property(property_name, table_number); + char *value = vm_properties_get_value(property_name, table_number); int return_value = default_value; if (NULL != value) { return_value = atoi(value); - destroy_property_value(value); + vm_properties_destroy_value(value); } return return_value; } -int64 get_numerical_property(const char *property_name, int64 default_value, PropertyTable table_number) +BOOLEAN vm_property_get_boolean(const char *property_name, BOOLEAN default_value, PropertyTable table_number) { assert(property_name); - char *value = get_property(property_name, table_number); - int64 return_value = default_value; - if (NULL != value) - { - int64 size = atol(value); - int sizeModifier = tolower(value[strlen(value) - 1]); - destroy_property_value(value); - - size_t unit = 1; - switch (sizeModifier) { - case 'k': unit = 1024; break; - case 'm': unit = 1024 * 1024; break; - case 'g': unit = 1024 * 1024 * 1024;break; - } - - return_value = size * unit; - if (return_value / unit != size) { - /* overflow happened */ - return_value = default_value; - } - } - return return_value; -} -Boolean get_boolean_property(const char *property_name, Boolean default_value, PropertyTable table_number) -{ - assert(property_name); - char *value = get_property(property_name, table_number); + char *value = vm_properties_get_value(property_name, table_number); if (NULL == value) { return default_value; @@ -2412,18 +2372,18 @@ { return_value = TRUE; } - destroy_property_value(value); + vm_properties_destroy_value(value); return return_value; } -size_t get_size_property(const char *property_name, size_t default_value, PropertyTable table_number) +size_t vm_property_get_size(const char *property_name, size_t default_value, PropertyTable table_number) { char* size_string; size_t size; int sizeModifier; size_t unit = 1; - size_string = get_property(property_name, table_number); + size_string = vm_properties_get_value(property_name, table_number); if (size_string == NULL) { return default_value; @@ -2431,7 +2391,7 @@ size = atol(size_string); sizeModifier = tolower(size_string[strlen(size_string) - 1]); - destroy_property_value(size_string); + vm_properties_destroy_value(size_string); switch (sizeModifier) { case 'k': unit = 1024; break; Index: vm/vmcore/src/class_support/Environment.cpp =================================================================== --- vm/vmcore/src/class_support/Environment.cpp (revision 643905) +++ vm/vmcore/src/class_support/Environment.cpp (working copy) @@ -22,6 +22,7 @@ #define LOG_DOMAIN util::CLASS_LOGGER #include "cxxlog.h" +#include "open/vm_properties.h" #include "environment.h" #include "Package.h" #include "String_Pool.h" @@ -312,13 +313,13 @@ } static size_t parse_size_prop(const char* name, size_t default_size) { - if(!is_property_set(name, VM_PROPERTIES)) { + if(!vm_property_is_set(name, VM_PROPERTIES)) { return default_size; } - char* value = get_property(name, VM_PROPERTIES); + char* value = vm_properties_get_value(name, VM_PROPERTIES); size_t size = parse_size(value); - destroy_property_value(value); + vm_properties_destroy_value(value); return size; } Index: vm/vmcore/src/class_support/classloader.cpp =================================================================== --- vm/vmcore/src/class_support/classloader.cpp (revision 643905) +++ vm/vmcore/src/class_support/classloader.cpp (working copy) @@ -26,6 +26,7 @@ #include #include "open/vm_method_access.h" +#include "open/vm_properties.h" #include "classloader.h" #include "object_layout.h" #include "String_Pool.h" @@ -1647,7 +1648,7 @@ STD_FREE(vmboot); // check if vm.bootclasspath.appendclasspath property is set to true - if( TRUE == get_boolean_property("vm.bootclasspath.appendclasspath", FALSE, VM_PROPERTIES) ) { + if( TRUE == vm_property_get_boolean("vm.bootclasspath.appendclasspath", FALSE, VM_PROPERTIES) ) { // append classpath to bootclasspath char * cp = m_env->JavaProperties()->get("java.class.path"); SetClasspathFromString(cp, tmp_pool); Index: vm/vmcore/src/interpreter/interp_exports.cpp =================================================================== --- vm/vmcore/src/interpreter/interp_exports.cpp (revision 643905) +++ vm/vmcore/src/interpreter/interp_exports.cpp (working copy) @@ -19,6 +19,7 @@ * @version $Revision: 1.1.2.1.4.3 $ */ #include +#include "open/vm_properties.h" #include "mon_enter_exit.h" #include "interpreter.h" #include "interpreter_exports.h" @@ -40,7 +41,7 @@ static bool val; if (!inited) { val = interp_enabled && - get_boolean_property("vm.use_interpreter", FALSE, VM_PROPERTIES); + vm_property_get_boolean("vm.use_interpreter", FALSE, VM_PROPERTIES); inited = true; INFO2("init", "Use interpreter = " << val); } Index: vm/vmcore/src/init/vm_init.cpp =================================================================== --- vm/vmcore/src/init/vm_init.cpp (revision 643905) +++ vm/vmcore/src/init/vm_init.cpp (working copy) @@ -24,6 +24,7 @@ #include #include "port_dso.h" +#include "open/vm_properties.h" #include "open/gc.h" #include "open/hythread_ext.h" #include "open/jthread.h" // this is for jthread_self() @@ -185,15 +186,15 @@ } else if (strcmp(func_name,"vm_compiled_method_load") == 0) { return (void*)compiled_method_load; } else if (strcmp(func_name,"vm_properties_destroy_keys") == 0) { - return (void*)destroy_properties_keys; + return (void*)vm_properties_destroy_keys; } else if (strcmp(func_name,"vm_properties_destroy_value") == 0) { - return (void*)destroy_property_value; + return (void*)vm_properties_destroy_value; } else if (strcmp(func_name,"vm_properties_get_keys") == 0) { - return (void*)get_properties_keys; + return (void*)vm_properties_get_keys; } else if (strcmp(func_name,"vm_properties_get_keys_starting_with") == 0) { - return (void*)get_properties_keys_staring_with; + return (void*)vm_properties_get_keys_starting_with; } else if (strcmp(func_name,"vm_properties_get_value") == 0) { - return (void*)get_property; + return (void*)vm_properties_get_value; } else { return NULL; } @@ -287,11 +288,11 @@ return JNI_OK; } - int64 ms = get_numerical_property("gc.ms", 0, VM_PROPERTIES); - int64 mx = get_numerical_property("gc.mx", 0, VM_PROPERTIES); + size_t ms = vm_property_get_size("gc.ms", 0, VM_PROPERTIES); + size_t mx = vm_property_get_size("gc.mx", 0, VM_PROPERTIES); // Currently 4Gb is maximum for compressed mode // If GC cannot allocate heap up to 4Gb, gc_init() will fail - int64 max_size = ((int64)4096)*1024*1024; + size_t max_size = ((int64)4096)*1024*1024; #ifdef REFS_USE_COMPRESSED if (ms >= max_size || mx >= max_size) @@ -302,7 +303,7 @@ #elif defined(REFS_USE_RUNTIME_SWITCH) if (ms >= max_size || mx >= max_size) { // Large heap; use uncompressed references - set_property("vm.compress_references", "false", VM_PROPERTIES); + vm_properties_set_value("vm.compress_references", "false", VM_PROPERTIES); vm_env->compress_references = false; return JNI_OK; } @@ -827,21 +828,21 @@ return JNI_ERR; } - tm_properties->use_soft_unreservation = get_boolean_property("thread.soft_unreservation", FALSE, VM_PROPERTIES); + tm_properties->use_soft_unreservation = vm_property_get_boolean("thread.soft_unreservation", FALSE, VM_PROPERTIES); parse_vm_arguments2(vm_env); - vm_env->verify = get_boolean_property("vm.use_verifier", TRUE, VM_PROPERTIES); + vm_env->verify = vm_property_get_boolean("vm.use_verifier", TRUE, VM_PROPERTIES); #ifdef REFS_USE_RUNTIME_SWITCH - vm_env->compress_references = get_boolean_property("vm.compress_references", TRUE, VM_PROPERTIES); + vm_env->compress_references = vm_property_get_boolean("vm.compress_references", TRUE, VM_PROPERTIES); #endif // use platform default values for field sorting and field compaction // if these values are not specifed on command line // see Global_Env::Global_Env for defaults - vm_env->sort_fields = get_boolean_property("vm.sort_fields", vm_env->sort_fields, VM_PROPERTIES); - vm_env->compact_fields = get_boolean_property("vm.compact_fields", vm_env->compact_fields, VM_PROPERTIES); - vm_env->use_common_jar_cache = get_boolean_property("vm.common_jar_cache", TRUE, VM_PROPERTIES); - vm_env->map_bootsrtap_jars = get_boolean_property("vm.map_bootstrap_jars", FALSE, VM_PROPERTIES); + vm_env->sort_fields = vm_property_get_boolean("vm.sort_fields", vm_env->sort_fields, VM_PROPERTIES); + vm_env->compact_fields = vm_property_get_boolean("vm.compact_fields", vm_env->compact_fields, VM_PROPERTIES); + vm_env->use_common_jar_cache = vm_property_get_boolean("vm.common_jar_cache", TRUE, VM_PROPERTIES); + vm_env->map_bootsrtap_jars = vm_property_get_boolean("vm.map_bootstrap_jars", FALSE, VM_PROPERTIES); vm_env->init_pools(); @@ -858,7 +859,7 @@ parse_jit_arguments(&vm_env->vm_arguments); vm_env->pin_interned_strings = - (bool)get_boolean_property("vm.pin_interned_strings", FALSE, VM_PROPERTIES); + (bool)vm_property_get_boolean("vm.pin_interned_strings", FALSE, VM_PROPERTIES); initialize_verify_stack_enumeration(); @@ -1059,7 +1060,7 @@ hythread_suspend_enable(); - if (get_boolean_property("vm.finalize", TRUE, VM_PROPERTIES)) { + if (vm_property_get_boolean("vm.finalize", TRUE, VM_PROPERTIES)) { // Load and initialize finalizer thread. vm_env->java_lang_FinalizerThread_Class = preload_class(vm_env, "java/lang/FinalizerThread"); Index: vm/vmcore/src/thread/verify_stack_enumeration.cpp =================================================================== --- vm/vmcore/src/thread/verify_stack_enumeration.cpp (revision 643905) +++ vm/vmcore/src/thread/verify_stack_enumeration.cpp (working copy) @@ -30,8 +30,9 @@ #include #define LOG_DOMAIN "verify.rse" +#include "cxxlog.h" #include "open/gc.h" -#include "cxxlog.h" +#include "open/vm_properties.h" #include "root_set_enum_internal.h" #include "verify_stack_enumeration.h" @@ -209,15 +210,15 @@ void initialize_verify_stack_enumeration() { - verify_stack_enumeration_flag = get_boolean_property("verify.rse", false, VM_PROPERTIES); + verify_stack_enumeration_flag = vm_property_get_boolean("verify.rse", false, VM_PROPERTIES); if (verify_stack_enumeration_flag) { INFO("verify stack enumeration mode"); - int n = get_int_property("verify.rse.after", 0, VM_PROPERTIES); + int n = vm_property_get_integer("verify.rse.after", 0, VM_PROPERTIES); if (n > 0) verify_stack_enumeration_counter = n; INFO(">verify after " << verify_stack_enumeration_counter); - n = get_int_property("verify.rse.period", 0, VM_PROPERTIES); + n = vm_property_get_integer("verify.rse.period", 0, VM_PROPERTIES); if (n > 0) verify_stack_enumeration_period = n; INFO(">verify each " << verify_stack_enumeration_period << num_suffix(verify_stack_enumeration_period) << " iteration"); Index: vm/vmcore/src/thread/thread_java_basic.cpp =================================================================== --- vm/vmcore/src/thread/thread_java_basic.cpp (revision 643905) +++ vm/vmcore/src/thread/thread_java_basic.cpp (working copy) @@ -22,6 +22,7 @@ #include #include +#include "open/vm_properties.h" #include "vm_threads.h" #include "jni.h" @@ -240,7 +241,7 @@ static size_t default_stacksize; if (0 == default_stacksize) { - size_t stack_size = get_size_property("thread.stacksize", 0, VM_PROPERTIES); + size_t stack_size = vm_property_get_size("thread.stacksize", 0, VM_PROPERTIES); default_stacksize = stack_size ? stack_size : TM_DEFAULT_STACKSIZE; } Index: vm/vmcore/src/util/crash_dump.cpp =================================================================== --- vm/vmcore/src/util/crash_dump.cpp (revision 643905) +++ vm/vmcore/src/util/crash_dump.cpp (working copy) @@ -17,6 +17,7 @@ //#include +#include "open/vm_properties.h" #include "port_dso.h" #include "port_modules.h" #include "port_crash_handler.h" @@ -308,10 +309,10 @@ #ifdef PLATFORM_POSIX bool call_dbg = (VM_Global_State::loader_env == NULL) || - get_boolean_property("vm.crash_handler", FALSE, VM_PROPERTIES); + vm_property_get_boolean("vm.crash_handler", FALSE, VM_PROPERTIES); #else // WIN bool call_dbg = (VM_Global_State::loader_env == NULL) || - get_boolean_property("vm.assert_dialog", TRUE, VM_PROPERTIES); + vm_property_get_boolean("vm.assert_dialog", TRUE, VM_PROPERTIES); #endif if (!call_dbg) flags &= ~PORT_CRASH_CALL_DEBUGGER; Index: vm/vmi/src/vmi.cpp =================================================================== --- vm/vmi/src/vmi.cpp (revision 643905) +++ vm/vmi/src/vmi.cpp (working copy) @@ -20,6 +20,7 @@ */ #include +#include "open/vm_properties.h" #include "open/hythread.h" #include "platform_lowlevel.h" @@ -146,9 +147,9 @@ vmiError JNICALL GetSystemProperty(VMInterface *vmi, char *key, char **valuePtr) { - char* value = get_property(key, JAVA_PROPERTIES); + char* value = vm_properties_get_value(key, JAVA_PROPERTIES); *valuePtr = value ? strdup(value) : NULL; - destroy_property_value(value); + vm_properties_destroy_value(value); return VMI_ERROR_NONE; } @@ -158,13 +159,13 @@ if (!value || !key) { return VMI_ERROR_ILLEGAL_ARG; } - set_property(key, value, JAVA_PROPERTIES); + vm_properties_set_value(key, value, JAVA_PROPERTIES); return VMI_ERROR_NONE; } vmiError JNICALL CountSystemProperties(VMInterface *vmi, int *countPtr) { - char** keys = get_properties_keys(JAVA_PROPERTIES); + char** keys = vm_properties_get_keys(JAVA_PROPERTIES); int count = 0; while(keys[count] != NULL) { @@ -172,29 +173,29 @@ } *countPtr = count; - destroy_properties_keys(keys); + vm_properties_destroy_keys(keys); return VMI_ERROR_NONE; } vmiError JNICALL IterateSystemProperties(VMInterface *vmi, vmiSystemPropertyIterator iterator, void *userData) { - char** keys = get_properties_keys(JAVA_PROPERTIES); + char** keys = vm_properties_get_keys(JAVA_PROPERTIES); int count = 0; while(keys[count] != NULL) { - char* value = get_property(keys[count], JAVA_PROPERTIES); + char* value = vm_properties_get_value(keys[count], JAVA_PROPERTIES); /* * FIXME: possible inconsistency between iterator and * properties count. */ if (value) { iterator((char*)strdup(keys[count]), (char*)strdup(value), userData); - destroy_property_value(value); + vm_properties_destroy_value(value); } count++; } - destroy_properties_keys(keys); + vm_properties_destroy_keys(keys); return VMI_ERROR_NONE; } Index: vm/jitrino/src/jet/compiler.cpp =================================================================== --- vm/jitrino/src/jet/compiler.cpp (revision 643905) +++ vm/jitrino/src/jet/compiler.cpp (working copy) @@ -30,6 +30,7 @@ #endif #include "open/vm.h" +#include "open/vm_properties.h" #include "open/hythread_ext.h" #include "open/vm_class_info.h" #include "open/vm_type_access.h" @@ -1477,7 +1478,7 @@ VTBL_BASE = (const char*)vm_get_vtable_base(); NULL_REF = g_refs_squeeze ? OBJ_BASE : NULL; - g_jvmtiMode = (bool)get_boolean_property("vm.jvmti.enabled", false, VM_PROPERTIES); + g_jvmtiMode = (bool)vm_property_get_boolean("vm.jvmti.enabled", false, VM_PROPERTIES); rt_helper_monitor_enter = (char*)vm_helper_get_addr(VM_RT_MONITOR_ENTER); Index: vm/jitrino/src/vm/VMInterface.cpp =================================================================== --- vm/jitrino/src/vm/VMInterface.cpp (revision 643905) +++ vm/jitrino/src/vm/VMInterface.cpp (working copy) @@ -24,6 +24,7 @@ #define DYNAMIC_OPEN #include "VMInterface.h" +#include "open/vm_properties.h" #include "open/vm_class_info.h" #include "open/vm_type_access.h" #include "open/vm_field_access.h" @@ -196,11 +197,11 @@ static vm_tls_is_fast_t vm_tls_is_fast = 0;//UDATA VMCALL hythread_uses_fast_tls static vm_get_tls_offset_in_segment_t vm_get_tls_offset_in_segment = 0;//IDATA VMCALL hythread_get_hythread_offset_in_tls(void) -static vm_properties_destroy_keys_t vm_properties_destroy_keys = 0;//void destroy_properties_keys(char** keys) -static vm_properties_destroy_value_t vm_properties_destroy_value = 0;//void destroy_property_value(char* value) -static vm_properties_get_keys_t vm_properties_get_keys = 0;//char** get_properties_keys(PropertyTable table_number); +static vm_properties_destroy_keys_t vm_properties_destroy_keys = 0;//void vm_properties_destroy_keys(char** keys) +static vm_properties_destroy_value_t vm_properties_destroy_value = 0;//void vm_properties_destroy_value(char* value) +static vm_properties_get_keys_t vm_properties_get_keys = 0;//char** vm_properties_get_keys(PropertyTable table_number); static vm_properties_get_keys_starting_with_t vm_properties_get_keys_starting_with = 0; -static vm_properties_get_value_t vm_properties_get_value = 0;//char* get_property(const char* key, PropertyTable table_number) +static vm_properties_get_value_t vm_properties_get_value = 0;//char* vm_properties_get_value(const char* key, PropertyTable table_number) static vm_get_system_object_class_t vm_get_system_object_class = 0; // get_system_object_class