src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page
rev 3618 : 7193946: Move warnings associated with UseMemSetInBOT flag
Summary: The warnings associated with the UseMemSetInBOT flag are duplicated in CMS and G1. The separate warnings have been removed and single instance of the warning has been placed in a common location.
Reviewed-by:


1937   for (int i = 0; i < n_queues; i++) {
1938     iter_arr[i] = new HeapRegionRemSetIterator();
1939   }
1940   _rem_set_iterator = iter_arr;
1941 
1942   _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC);
1943   _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC);
1944 
1945   for (int i = 0; i < n_queues; i++) {
1946     RefToScanQueue* q = new RefToScanQueue();
1947     q->initialize();
1948     _task_queues->register_queue(i, q);
1949   }
1950 
1951   clear_cset_start_regions();
1952 
1953   // Initialize the G1EvacuationFailureALot counters and flags.
1954   NOT_PRODUCT(reset_evacuation_should_fail();)
1955 
1956   guarantee(_task_queues != NULL, "task_queues allocation failure.");
1957 #ifdef SPARC
1958   // Issue a stern warning, but allow use for experimentation and debugging.
1959   if (VM_Version::is_sun4v() && UseMemSetInBOT) {
1960     assert(!FLAG_IS_DEFAULT(UseMemSetInBOT), "Error");
1961     warning("Experimental flag -XX:+UseMemSetInBOT is known to cause instability"
1962             " on sun4v; please understand that you are using at your own risk!");
1963   }
1964 #endif
1965 }
1966 
1967 jint G1CollectedHeap::initialize() {
1968   CollectedHeap::pre_initialize();
1969   os::enable_vtime();
1970 
1971   G1Log::init();
1972 
1973   // Necessary to satisfy locking discipline assertions.
1974 
1975   MutexLocker x(Heap_lock);
1976 
1977   // We have to initialize the printer before committing the heap, as
1978   // it will be used then.
1979   _hr_printer.set_active(G1PrintHeapRegions);
1980 
1981   // While there are no constraints in the GC code that HeapWordSize
1982   // be any particular value, there are multiple other areas in the
1983   // system which believe this to be true (e.g. oop->object_size in some
1984   // cases incorrectly returns the size in wordSize units rather than




1937   for (int i = 0; i < n_queues; i++) {
1938     iter_arr[i] = new HeapRegionRemSetIterator();
1939   }
1940   _rem_set_iterator = iter_arr;
1941 
1942   _worker_cset_start_region = NEW_C_HEAP_ARRAY(HeapRegion*, n_queues, mtGC);
1943   _worker_cset_start_region_time_stamp = NEW_C_HEAP_ARRAY(unsigned int, n_queues, mtGC);
1944 
1945   for (int i = 0; i < n_queues; i++) {
1946     RefToScanQueue* q = new RefToScanQueue();
1947     q->initialize();
1948     _task_queues->register_queue(i, q);
1949   }
1950 
1951   clear_cset_start_regions();
1952 
1953   // Initialize the G1EvacuationFailureALot counters and flags.
1954   NOT_PRODUCT(reset_evacuation_should_fail();)
1955 
1956   guarantee(_task_queues != NULL, "task_queues allocation failure.");








1957 }
1958 
1959 jint G1CollectedHeap::initialize() {
1960   CollectedHeap::pre_initialize();
1961   os::enable_vtime();
1962 
1963   G1Log::init();
1964 
1965   // Necessary to satisfy locking discipline assertions.
1966 
1967   MutexLocker x(Heap_lock);
1968 
1969   // We have to initialize the printer before committing the heap, as
1970   // it will be used then.
1971   _hr_printer.set_active(G1PrintHeapRegions);
1972 
1973   // While there are no constraints in the GC code that HeapWordSize
1974   // be any particular value, there are multiple other areas in the
1975   // system which believe this to be true (e.g. oop->object_size in some
1976   // cases incorrectly returns the size in wordSize units rather than