VM properties proposal ====================== The general purpose of VM Properties subcomponent is to provide centralized access to a common properties table. A property is meant as a pair of and . The properties stored in VM Properties table represent configuration settings for a separate component (such as VMCore, GC, JIT etc) or for the whole system. Another use case for the properties is communication between different components. Requirements ============ 1) The and are represented as string (i.e. char*). On each operation, a copy is made, so that the callers should free the strings that they got or gave. 2) NULL values are allowed. 3) VM Properties subcomponent exports its interface as part of VM Core. 4) There are two kind of properties * Public properties are properties visible both to all VM components and to Java applications (by means of java.lang.System.getProperties() method). * Hidden properties are used for VM components communication only, not accessible from Java side. 5) There is a way to set hidden properties through non standard command line option ( -XD=). 6) There is a way to get a list of defined properties which keys begin with a particular prefix. 7) Properties table should be thread safe. VM Properties usage scenario ============================ Components can define properties and lookup them by name. When setting the property it can be marked either public or hidden. A property should be marked as hidden if it is intended internal usage only. Public properties are supposed to be visible from Java side also. In the same time it is possible to obtain a list of all public properties to pass them to Java side. Defined Interface functions =========================== void set_property(const char * key, const char * value, unsigned table_number) - Sets the property. NULL values are supported. const char * get_property(const char * key, unsigned table_number) - Returns the value of the property if it has been set by set_property function. Otherwise returns NULL. int is_property_set(const char * key, unsigned table_number) - Checks if the property is set. Return -1 if table_number is incorrect. 1 if property is set. 0 otherwise. void unset_property(const char * key, unsigned table_number) - Unsets the property. char * * get_properties_keys(unsigned table_number) - Returns an array of keys from "table_number" properties table. char * * get_properties_keys_staring_with(const char * prefix, unsigned table_number) - Returns an array of keys start with specified prefix from "table_number" properties table.