Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 6736:11fb740ce98f
7196103: NPG: Unable to allocate bit map for parallel garbage collection for the requested heap size
Summary: Don't allocate huge class metaspace size by default on x64
Reviewed-by: stefank, jmasa, kvn
author | coleenp |
---|---|
date | Fri, 07 Sep 2012 16:42:25 -0400 |
parents | da91efe96a93 |
children | bc675e55b48c 9a86ddfc6c8f |
comparison
equal
deleted
inserted
replaced
6735:aed758eda82a | 6736:11fb740ce98f |
---|---|
1425 // Turn on UseCompressedKlassPointers too | 1425 // Turn on UseCompressedKlassPointers too |
1426 // The compiler is broken for this so turn it on when the compiler is fixed. | 1426 // The compiler is broken for this so turn it on when the compiler is fixed. |
1427 // if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) { | 1427 // if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) { |
1428 // FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true); | 1428 // FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true); |
1429 // } | 1429 // } |
1430 // Set the ClassMetaspaceSize to something that will not need to be | |
1431 // expanded, since it cannot be expanded. | |
1432 if (UseCompressedKlassPointers && FLAG_IS_DEFAULT(ClassMetaspaceSize)) { | |
1433 // 100,000 classes seems like a good size, so 100M assumes around 1K | |
1434 // per klass. The vtable and oopMap is embedded so we don't have a fixed | |
1435 // size per klass. Eventually, this will be parameterized because it | |
1436 // would also be useful to determine the optimal size of the | |
1437 // systemDictionary. | |
1438 FLAG_SET_ERGO(uintx, ClassMetaspaceSize, 100*M); | |
1439 } | |
1430 } | 1440 } |
1431 // Also checks that certain machines are slower with compressed oops | 1441 // Also checks that certain machines are slower with compressed oops |
1432 // in vm_version initialization code. | 1442 // in vm_version initialization code. |
1433 #endif // _LP64 | 1443 #endif // _LP64 |
1434 #endif // !ZERO | 1444 #endif // !ZERO |
1962 // expression. | 1972 // expression. |
1963 status = status && verify_interval(TLABWasteTargetPercent, | 1973 status = status && verify_interval(TLABWasteTargetPercent, |
1964 1, 100, "TLABWasteTargetPercent"); | 1974 1, 100, "TLABWasteTargetPercent"); |
1965 | 1975 |
1966 status = status && verify_object_alignment(); | 1976 status = status && verify_object_alignment(); |
1977 | |
1978 status = status && verify_min_value(ClassMetaspaceSize, 1*M, | |
1979 "ClassMetaspaceSize"); | |
1967 | 1980 |
1968 return status; | 1981 return status; |
1969 } | 1982 } |
1970 | 1983 |
1971 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, | 1984 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, |
2914 // ??? UseLargePages might be okay now | 2927 // ??? UseLargePages might be okay now |
2915 const bool cannot_share = UseCompressedOops || | 2928 const bool cannot_share = UseCompressedOops || |
2916 (UseLargePages && FLAG_IS_CMDLINE(UseLargePages)); | 2929 (UseLargePages && FLAG_IS_CMDLINE(UseLargePages)); |
2917 if (cannot_share) { | 2930 if (cannot_share) { |
2918 if (must_share) { | 2931 if (must_share) { |
2919 warning("disabling large pages%s" | 2932 warning("disabling large pages %s" |
2920 "because of %s", "" LP64_ONLY("and compressed oops "), | 2933 "because of %s", "" LP64_ONLY("and compressed oops "), |
2921 DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on"); | 2934 DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on"); |
2922 FLAG_SET_CMDLINE(bool, UseLargePages, false); | 2935 FLAG_SET_CMDLINE(bool, UseLargePages, false); |
2923 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false)); | 2936 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false)); |
2924 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false)); | 2937 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false)); |