equal
deleted
inserted
replaced
956 |
956 |
957 void PSParallelCompact::pre_compact(PreGCValues* pre_gc_values) |
957 void PSParallelCompact::pre_compact(PreGCValues* pre_gc_values) |
958 { |
958 { |
959 // Update the from & to space pointers in space_info, since they are swapped |
959 // Update the from & to space pointers in space_info, since they are swapped |
960 // at each young gen gc. Do the update unconditionally (even though a |
960 // at each young gen gc. Do the update unconditionally (even though a |
961 // promotion failure does not swap spaces) because an unknown number of minor |
961 // promotion failure does not swap spaces) because an unknown number of young |
962 // collections will have swapped the spaces an unknown number of times. |
962 // collections will have swapped the spaces an unknown number of times. |
963 GCTraceTime tm("pre compact", print_phases(), true, &_gc_timer, _gc_tracer.gc_id()); |
963 GCTraceTime tm("pre compact", print_phases(), true, &_gc_timer, _gc_tracer.gc_id()); |
964 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); |
964 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); |
965 _space_info[from_space_id].set_space(heap->young_gen()->from_space()); |
965 _space_info[from_space_id].set_space(heap->young_gen()->from_space()); |
966 _space_info[to_space_id].set_space(heap->young_gen()->to_space()); |
966 _space_info[to_space_id].set_space(heap->young_gen()->to_space()); |