comparison src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 4829:9509c20bba28

6976060: G1: humongous object allocations should initiate marking cycles when necessary Reviewed-by: tonyp, johnc
author brutisso
date Mon, 16 Jan 2012 22:10:05 +0100
parents db89aa49298f
children 64bf7c8270cb
comparison
equal deleted inserted replaced
4828:851b58c26def 4829:9509c20bba28
1 /* 1 /*
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
72 72
73 void VM_G1IncCollectionPause::doit() { 73 void VM_G1IncCollectionPause::doit() {
74 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 74 G1CollectedHeap* g1h = G1CollectedHeap::heap();
75 assert(!_should_initiate_conc_mark || 75 assert(!_should_initiate_conc_mark ||
76 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || 76 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) ||
77 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent)), 77 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) ||
78 "only a GC locker or a System.gc() induced GC should start a cycle"); 78 _gc_cause == GCCause::_g1_humongous_allocation),
79 "only a GC locker, a System.gc() or a hum allocation induced GC should start a cycle");
79 80
80 if (_word_size > 0) { 81 if (_word_size > 0) {
81 // An allocation has been requested. So, try to do that first. 82 // An allocation has been requested. So, try to do that first.
82 _result = g1h->attempt_allocation_at_safepoint(_word_size, 83 _result = g1h->attempt_allocation_at_safepoint(_word_size,
83 false /* expect_null_cur_alloc_region */); 84 false /* expect_null_cur_alloc_region */);