comparison src/share/vm/services/g1MemoryPool.cpp @ 1394:1316cec51b4d

6819061: G1: eliminate serial Other times that are proportional to the collection set length 6871109: G1: remove the concept of the scan only prefix Summary: Removed scan only regions and associated code. The young portion of the collection set is now constructed incrementally - when a young region is retired as the current allocation region it is added to the collection set. Reviewed-by: apetrusenko, iveresov, tonyp
author johnc
date Thu, 22 Apr 2010 10:02:38 -0700
parents 9118860519b6
children c18cbe5936b8
comparison
equal deleted inserted replaced
1393:6ecb6e6de3d6 1394:1316cec51b4d
1 /* 1 /*
2 * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2007-2010 Sun Microsystems, Inc. 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.
43 return MAX2(eden_space_used(g1h), (size_t) HeapRegion::GrainBytes); 43 return MAX2(eden_space_used(g1h), (size_t) HeapRegion::GrainBytes);
44 } 44 }
45 45
46 // See the comment at the top of g1MemoryPool.hpp 46 // See the comment at the top of g1MemoryPool.hpp
47 size_t G1MemoryPoolSuper::eden_space_used(G1CollectedHeap* g1h) { 47 size_t G1MemoryPoolSuper::eden_space_used(G1CollectedHeap* g1h) {
48 size_t young_list_length = g1h->young_list_length(); 48 size_t young_list_length = g1h->young_list()->length();
49 size_t eden_used = young_list_length * HeapRegion::GrainBytes; 49 size_t eden_used = young_list_length * HeapRegion::GrainBytes;
50 size_t survivor_used = survivor_space_used(g1h); 50 size_t survivor_used = survivor_space_used(g1h);
51 eden_used = subtract_up_to_zero(eden_used, survivor_used); 51 eden_used = subtract_up_to_zero(eden_used, survivor_used);
52 return eden_used; 52 return eden_used;
53 } 53 }