Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 13819:49db2c1e3bee
added support for co-existing GPU backends (JBS:GRAAL-1)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 30 Jan 2014 00:52:33 +0100 |
parents | 02f27ecb4f3a |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
13818:d2f520f46180 | 13819:49db2c1e3bee |
---|---|
129 SystemProperty *Arguments::_sun_boot_library_path = NULL; | 129 SystemProperty *Arguments::_sun_boot_library_path = NULL; |
130 SystemProperty *Arguments::_java_library_path = NULL; | 130 SystemProperty *Arguments::_java_library_path = NULL; |
131 SystemProperty *Arguments::_java_home = NULL; | 131 SystemProperty *Arguments::_java_home = NULL; |
132 SystemProperty *Arguments::_java_class_path = NULL; | 132 SystemProperty *Arguments::_java_class_path = NULL; |
133 SystemProperty *Arguments::_sun_boot_class_path = NULL; | 133 SystemProperty *Arguments::_sun_boot_class_path = NULL; |
134 #ifdef GRAAL | |
135 SystemProperty *Arguments::_graal_gpu_isalist = NULL; | |
136 #endif | |
137 | 134 |
138 char* Arguments::_meta_index_path = NULL; | 135 char* Arguments::_meta_index_path = NULL; |
139 char* Arguments::_meta_index_dir = NULL; | 136 char* Arguments::_meta_index_dir = NULL; |
140 | 137 |
141 // Check if head of 'option' matches 'name', and sets 'tail' remaining part of option string | 138 // Check if head of 'option' matches 'name', and sets 'tail' remaining part of option string |
195 _java_library_path = new SystemProperty("java.library.path", NULL, true); | 192 _java_library_path = new SystemProperty("java.library.path", NULL, true); |
196 _java_home = new SystemProperty("java.home", NULL, true); | 193 _java_home = new SystemProperty("java.home", NULL, true); |
197 _sun_boot_class_path = new SystemProperty("sun.boot.class.path", NULL, true); | 194 _sun_boot_class_path = new SystemProperty("sun.boot.class.path", NULL, true); |
198 | 195 |
199 _java_class_path = new SystemProperty("java.class.path", "", true); | 196 _java_class_path = new SystemProperty("java.class.path", "", true); |
200 #ifdef GRAAL | |
201 _graal_gpu_isalist = new SystemProperty("graal.gpu.isalist", NULL, true); | |
202 #endif | |
203 | 197 |
204 // Add to System Property list. | 198 // Add to System Property list. |
205 PropertyList_add(&_system_properties, _java_ext_dirs); | 199 PropertyList_add(&_system_properties, _java_ext_dirs); |
206 PropertyList_add(&_system_properties, _java_endorsed_dirs); | 200 PropertyList_add(&_system_properties, _java_endorsed_dirs); |
207 PropertyList_add(&_system_properties, _sun_boot_library_path); | 201 PropertyList_add(&_system_properties, _sun_boot_library_path); |
208 PropertyList_add(&_system_properties, _java_library_path); | 202 PropertyList_add(&_system_properties, _java_library_path); |
209 PropertyList_add(&_system_properties, _java_home); | 203 PropertyList_add(&_system_properties, _java_home); |
210 PropertyList_add(&_system_properties, _java_class_path); | 204 PropertyList_add(&_system_properties, _java_class_path); |
211 PropertyList_add(&_system_properties, _sun_boot_class_path); | 205 PropertyList_add(&_system_properties, _sun_boot_class_path); |
212 #ifdef GRAAL | |
213 PropertyList_add(&_system_properties, _graal_gpu_isalist); | |
214 #endif | |
215 | 206 |
216 // Set OS specific system properties values | 207 // Set OS specific system properties values |
217 os::init_system_properties_values(); | 208 os::init_system_properties_values(); |
218 } | 209 } |
219 | 210 |
3842 if (!set) { | 3833 if (!set) { |
3843 FLAG_SET_DEFAULT(PauseAtExit, true); | 3834 FLAG_SET_DEFAULT(PauseAtExit, true); |
3844 } | 3835 } |
3845 } | 3836 } |
3846 | 3837 |
3847 #ifdef GRAAL | |
3848 if (_graal_gpu_isalist->value() == NULL) { | |
3849 // Initialize the graal.gpu.isalist system property if | |
3850 // a) it was not explicitly defined by the user and | |
3851 // b) at least one GPU is available. | |
3852 // GPU offload can be disabled by setting the property | |
3853 // to the empty string on the command line | |
3854 if (gpu::is_available() && gpu::has_gpu_linkage()) { | |
3855 if (gpu::get_target_il_type() == gpu::PTX) { | |
3856 _graal_gpu_isalist->append_value("PTX"); | |
3857 } | |
3858 if (gpu::get_target_il_type() == gpu::HSAIL) { | |
3859 _graal_gpu_isalist->append_value("HSAIL"); | |
3860 } | |
3861 } | |
3862 } | |
3863 #endif | |
3864 | |
3865 return JNI_OK; | 3838 return JNI_OK; |
3866 } | 3839 } |
3867 | 3840 |
3868 jint Arguments::adjust_after_os() { | 3841 jint Arguments::adjust_after_os() { |
3869 #if INCLUDE_ALL_GCS | 3842 #if INCLUDE_ALL_GCS |