comparison src/share/vm/memory/universe.cpp @ 2080:c04052fd6ae1

7006505: Use kstat info to identify SPARC processor Summary: read Solaris kstat data to get more precise CPU information Reviewed-by: iveresov, never, twisti, dholmes
author kvn
date Thu, 16 Dec 2010 14:15:12 -0800
parents f95d63e2154a
children 3582bf76420e
comparison
equal deleted inserted replaced
2079:cccd1b172b85 2080:c04052fd6ae1
932 // This also makes implicit null checking work, because the 932 // This also makes implicit null checking work, because the
933 // memory+1 page below heap_base needs to cause a signal. 933 // memory+1 page below heap_base needs to cause a signal.
934 // See needs_explicit_null_check. 934 // See needs_explicit_null_check.
935 // Only set the heap base for compressed oops because it indicates 935 // Only set the heap base for compressed oops because it indicates
936 // compressed oops for pstack code. 936 // compressed oops for pstack code.
937 if (PrintCompressedOopsMode) { 937 bool verbose = PrintCompressedOopsMode || (PrintMiscellaneous && Verbose);
938 if (verbose) {
938 tty->cr(); 939 tty->cr();
939 tty->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB", 940 tty->print("heap address: " PTR_FORMAT ", size: " SIZE_FORMAT " MB",
940 Universe::heap()->base(), Universe::heap()->reserved_region().byte_size()/M); 941 Universe::heap()->base(), Universe::heap()->reserved_region().byte_size()/M);
941 } 942 }
942 if ((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax) { 943 if ((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax) {
943 // Can't reserve heap below 32Gb. 944 // Can't reserve heap below 32Gb.
944 Universe::set_narrow_oop_base(Universe::heap()->base() - os::vm_page_size()); 945 Universe::set_narrow_oop_base(Universe::heap()->base() - os::vm_page_size());
945 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); 946 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
946 if (PrintCompressedOopsMode) { 947 if (verbose) {
947 tty->print(", Compressed Oops with base: "PTR_FORMAT, Universe::narrow_oop_base()); 948 tty->print(", Compressed Oops with base: "PTR_FORMAT, Universe::narrow_oop_base());
948 } 949 }
949 } else { 950 } else {
950 Universe::set_narrow_oop_base(0); 951 Universe::set_narrow_oop_base(0);
951 if (PrintCompressedOopsMode) { 952 if (verbose) {
952 tty->print(", zero based Compressed Oops"); 953 tty->print(", zero based Compressed Oops");
953 } 954 }
954 #ifdef _WIN64 955 #ifdef _WIN64
955 if (!Universe::narrow_oop_use_implicit_null_checks()) { 956 if (!Universe::narrow_oop_use_implicit_null_checks()) {
956 // Don't need guard page for implicit checks in indexed addressing 957 // Don't need guard page for implicit checks in indexed addressing
961 if((uint64_t)Universe::heap()->reserved_region().end() > NarrowOopHeapMax) { 962 if((uint64_t)Universe::heap()->reserved_region().end() > NarrowOopHeapMax) {
962 // Can't reserve heap below 4Gb. 963 // Can't reserve heap below 4Gb.
963 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); 964 Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
964 } else { 965 } else {
965 Universe::set_narrow_oop_shift(0); 966 Universe::set_narrow_oop_shift(0);
966 if (PrintCompressedOopsMode) { 967 if (verbose) {
967 tty->print(", 32-bits Oops"); 968 tty->print(", 32-bits Oops");
968 } 969 }
969 } 970 }
970 } 971 }
971 if (PrintCompressedOopsMode) { 972 if (verbose) {
972 tty->cr(); 973 tty->cr();
973 tty->cr(); 974 tty->cr();
974 } 975 }
975 } 976 }
976 assert(Universe::narrow_oop_base() == (Universe::heap()->base() - os::vm_page_size()) || 977 assert(Universe::narrow_oop_base() == (Universe::heap()->base() - os::vm_page_size()) ||