comparison src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 60fd6d24f49f
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2001, 2013, 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.
90 assert(pointer_delta(_top, obj) == word_sz, "Bad undo"); 90 assert(pointer_delta(_top, obj) == word_sz, "Bad undo");
91 _top = obj; 91 _top = obj;
92 } 92 }
93 93
94 // The total (word) size of the buffer, including both allocated and 94 // The total (word) size of the buffer, including both allocated and
95 // unallocated space. 95 // unallocted space.
96 size_t word_sz() { return _word_sz; } 96 size_t word_sz() { return _word_sz; }
97 97
98 // Should only be done if we are about to reset with a new buffer of the 98 // Should only be done if we are about to reset with a new buffer of the
99 // given size. 99 // given size.
100 void set_word_size(size_t new_word_sz) { 100 void set_word_size(size_t new_word_sz) {
156 } 156 }
157 157
158 // Fills in the unallocated portion of the buffer with a garbage object. 158 // Fills in the unallocated portion of the buffer with a garbage object.
159 // If "end_of_gc" is TRUE, is after the last use in the GC. IF "retain" 159 // If "end_of_gc" is TRUE, is after the last use in the GC. IF "retain"
160 // is true, attempt to re-use the unused portion in the next GC. 160 // is true, attempt to re-use the unused portion in the next GC.
161 void retire(bool end_of_gc, bool retain); 161 virtual void retire(bool end_of_gc, bool retain);
162 162
163 void print() PRODUCT_RETURN; 163 void print() PRODUCT_RETURN;
164 }; 164 };
165 165
166 // PLAB stats book-keeping 166 // PLAB stats book-keeping
179 _wasted(0), 179 _wasted(0),
180 _unused(0), 180 _unused(0),
181 _used(0), 181 _used(0),
182 _desired_plab_sz(desired_plab_sz_), 182 _desired_plab_sz(desired_plab_sz_),
183 _filter(wt) 183 _filter(wt)
184 { } 184 {
185 size_t min_sz = min_size();
186 size_t max_sz = max_size();
187 size_t aligned_min_sz = align_object_size(min_sz);
188 size_t aligned_max_sz = align_object_size(max_sz);
189 assert(min_sz <= aligned_min_sz && max_sz >= aligned_max_sz &&
190 min_sz <= max_sz,
191 "PLAB clipping computation in adjust_desired_plab_sz()"
192 " may be incorrect");
193 }
185 194
186 static const size_t min_size() { 195 static const size_t min_size() {
187 return ParGCAllocBuffer::min_size(); 196 return ParGCAllocBuffer::min_size();
188 } 197 }
189 198