src/share/vm/runtime/arguments.cpp

changeset 1132
922aedc96ef5
parent 1130
becb17ad5e51
parent 1128
2c1dbb844832
child 1147
6e33bfd4139b
equal deleted inserted replaced
1131:f18338cf04b0 1132:922aedc96ef5
850 FreeHeap(key); 850 FreeHeap(key);
851 if (eq != NULL) { 851 if (eq != NULL) {
852 FreeHeap(value); 852 FreeHeap(value);
853 } 853 }
854 return true; 854 return true;
855 } 855 } else if (strcmp(key, "sun.java.command") == 0) {
856 else if (strcmp(key, "sun.java.command") == 0) {
857
858 _java_command = value; 856 _java_command = value;
859 857
860 // don't add this property to the properties exposed to the java application 858 // don't add this property to the properties exposed to the java application
861 FreeHeap(key); 859 FreeHeap(key);
862 return true; 860 return true;
863 } 861 } else if (strcmp(key, "sun.java.launcher.pid") == 0) {
864 else if (strcmp(key, "sun.java.launcher.pid") == 0) {
865 // launcher.pid property is private and is processed 862 // launcher.pid property is private and is processed
866 // in process_sun_java_launcher_properties(); 863 // in process_sun_java_launcher_properties();
867 // the sun.java.launcher property is passed on to the java application 864 // the sun.java.launcher property is passed on to the java application
868 FreeHeap(key); 865 FreeHeap(key);
869 if (eq != NULL) { 866 if (eq != NULL) {
870 FreeHeap(value); 867 FreeHeap(value);
871 } 868 }
872 return true; 869 return true;
873 } 870 } else if (strcmp(key, "java.vendor.url.bug") == 0) {
874 else if (strcmp(key, "java.vendor.url.bug") == 0) {
875 // save it in _java_vendor_url_bug, so JVM fatal error handler can access 871 // save it in _java_vendor_url_bug, so JVM fatal error handler can access
876 // its value without going through the property list or making a Java call. 872 // its value without going through the property list or making a Java call.
877 _java_vendor_url_bug = value; 873 _java_vendor_url_bug = value;
878 } 874 } else if (strcmp(key, "sun.boot.library.path") == 0) {
879 875 PropertyList_unique_add(&_system_properties, key, value, true);
876 return true;
877 }
880 // Create new property and add at the end of the list 878 // Create new property and add at the end of the list
881 PropertyList_unique_add(&_system_properties, key, value); 879 PropertyList_unique_add(&_system_properties, key, value);
882 return true; 880 return true;
883 } 881 }
884 882
893 _mode = mode; 891 _mode = mode;
894 892
895 // Ensure Agent_OnLoad has the correct initial values. 893 // Ensure Agent_OnLoad has the correct initial values.
896 // This may not be the final mode; mode may change later in onload phase. 894 // This may not be the final mode; mode may change later in onload phase.
897 PropertyList_unique_add(&_system_properties, "java.vm.info", 895 PropertyList_unique_add(&_system_properties, "java.vm.info",
898 (char*)Abstract_VM_Version::vm_info_string()); 896 (char*)Abstract_VM_Version::vm_info_string(), false);
899 897
900 UseInterpreter = true; 898 UseInterpreter = true;
901 UseCompiler = true; 899 UseCompiler = true;
902 UseLoopCounter = true; 900 UseLoopCounter = true;
903 901
1373 sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax); 1371 sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax);
1374 add_property(buffer); 1372 add_property(buffer);
1375 } 1373 }
1376 if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) { 1374 if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
1377 FLAG_SET_DEFAULT(DoEscapeAnalysis, true); 1375 FLAG_SET_DEFAULT(DoEscapeAnalysis, true);
1378 }
1379 if (AggressiveOpts && FLAG_IS_DEFAULT(SpecialArraysEquals)) {
1380 FLAG_SET_DEFAULT(SpecialArraysEquals, true);
1381 } 1376 }
1382 if (AggressiveOpts && FLAG_IS_DEFAULT(BiasedLockingStartupDelay)) { 1377 if (AggressiveOpts && FLAG_IS_DEFAULT(BiasedLockingStartupDelay)) {
1383 FLAG_SET_DEFAULT(BiasedLockingStartupDelay, 500); 1378 FLAG_SET_DEFAULT(BiasedLockingStartupDelay, 500);
1384 } 1379 }
1385 #endif 1380 #endif
2775 SystemProperty* new_p = new SystemProperty(k, v, true); 2770 SystemProperty* new_p = new SystemProperty(k, v, true);
2776 PropertyList_add(plist, new_p); 2771 PropertyList_add(plist, new_p);
2777 } 2772 }
2778 2773
2779 // This add maintains unique property key in the list. 2774 // This add maintains unique property key in the list.
2780 void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v) { 2775 void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append) {
2781 if (plist == NULL) 2776 if (plist == NULL)
2782 return; 2777 return;
2783 2778
2784 // If property key exist then update with new value. 2779 // If property key exist then update with new value.
2785 SystemProperty* prop; 2780 SystemProperty* prop;
2786 for (prop = *plist; prop != NULL; prop = prop->next()) { 2781 for (prop = *plist; prop != NULL; prop = prop->next()) {
2787 if (strcmp(k, prop->key()) == 0) { 2782 if (strcmp(k, prop->key()) == 0) {
2788 prop->set_value(v); 2783 if (append) {
2784 prop->append_value(v);
2785 } else {
2786 prop->set_value(v);
2787 }
2789 return; 2788 return;
2790 } 2789 }
2791 } 2790 }
2792 2791
2793 PropertyList_add(plist, k, v); 2792 PropertyList_add(plist, k, v);

mercurial