Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 7397:442f942757c0
8000244: G1: Ergonomically set MarkStackSize and use virtual space for global marking stack
Summary: Set the value of MarkStackSize to a value based on the number of parallel marking threads with a reasonable minimum. Expand the marking stack if we have to restart marking due to an overflow up to a reasonable maximum. Allocate the underlying space for the marking stack from virtual memory.
Reviewed-by: jmasa, brutisso
author | johnc |
---|---|
date | Mon, 01 Oct 2012 09:28:13 -0700 |
parents | 0f80645e9c26 |
children | 0b54ffe4c2d3 |
comparison
equal
deleted
inserted
replaced
7208:eade6b2e4782 | 7397:442f942757c0 |
---|---|
2077 // evacuation pause. | 2077 // evacuation pause. |
2078 clear_cset_fast_test(); | 2078 clear_cset_fast_test(); |
2079 | 2079 |
2080 // Create the ConcurrentMark data structure and thread. | 2080 // Create the ConcurrentMark data structure and thread. |
2081 // (Must do this late, so that "max_regions" is defined.) | 2081 // (Must do this late, so that "max_regions" is defined.) |
2082 _cm = new ConcurrentMark(heap_rs, max_regions()); | 2082 _cm = new ConcurrentMark(this, heap_rs); |
2083 if (_cm == NULL || !_cm->completed_initialization()) { | |
2084 vm_shutdown_during_initialization("Could not create/initialize ConcurrentMark"); | |
2085 return JNI_ENOMEM; | |
2086 } | |
2083 _cmThread = _cm->cmThread(); | 2087 _cmThread = _cm->cmThread(); |
2084 | 2088 |
2085 // Initialize the from_card cache structure of HeapRegionRemSet. | 2089 // Initialize the from_card cache structure of HeapRegionRemSet. |
2086 HeapRegionRemSet::init_heap(max_regions()); | 2090 HeapRegionRemSet::init_heap(max_regions()); |
2087 | 2091 |
2088 // Now expand into the initial heap size. | 2092 // Now expand into the initial heap size. |
2089 if (!expand(init_byte_size)) { | 2093 if (!expand(init_byte_size)) { |
2090 vm_exit_during_initialization("Failed to allocate initial heap."); | 2094 vm_shutdown_during_initialization("Failed to allocate initial heap."); |
2091 return JNI_ENOMEM; | 2095 return JNI_ENOMEM; |
2092 } | 2096 } |
2093 | 2097 |
2094 // Perform any initialization actions delegated to the policy. | 2098 // Perform any initialization actions delegated to the policy. |
2095 g1_policy()->init(); | 2099 g1_policy()->init(); |