equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, 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. |
184 } |
184 } |
185 |
185 |
186 void print(); |
186 void print(); |
187 }; |
187 }; |
188 |
188 |
189 // ValueObj because will be embedded in HRRS iterator. |
189 // This is embedded in HRRS iterator. |
190 class RSHashTableIter VALUE_OBJ_CLASS_SPEC { |
190 class RSHashTableIter { |
191 // Return value indicating "invalid/no card". |
191 // Return value indicating "invalid/no card". |
192 static const int NoCardFound = -1; |
192 static const int NoCardFound = -1; |
193 |
193 |
194 int _tbl_ind; // [-1, 0.._rsht->_capacity) |
194 int _tbl_ind; // [-1, 0.._rsht->_capacity) |
195 int _bl_ind; // [-1, 0.._rsht->_capacity) |
195 int _bl_ind; // [-1, 0.._rsht->_capacity) |
220 // Concurrent access to a SparsePRT must be serialized by some external mutex. |
220 // Concurrent access to a SparsePRT must be serialized by some external mutex. |
221 |
221 |
222 class SparsePRTIter; |
222 class SparsePRTIter; |
223 class SparsePRTCleanupTask; |
223 class SparsePRTCleanupTask; |
224 |
224 |
225 class SparsePRT VALUE_OBJ_CLASS_SPEC { |
225 class SparsePRT { |
226 friend class SparsePRTCleanupTask; |
226 friend class SparsePRTCleanupTask; |
227 |
227 |
228 // Iterations are done on the _cur hash table, since they only need to |
228 // Iterations are done on the _cur hash table, since they only need to |
229 // see entries visible at the start of a collection pause. |
229 // see entries visible at the start of a collection pause. |
230 // All other operations are done using the _next hash table. |
230 // All other operations are done using the _next hash table. |
332 // This allows each worker during a cleanup pause to create a |
332 // This allows each worker during a cleanup pause to create a |
333 // thread-local list of sparse tables that have been expanded and need |
333 // thread-local list of sparse tables that have been expanded and need |
334 // to be processed at the beginning of the next GC pause. This lists |
334 // to be processed at the beginning of the next GC pause. This lists |
335 // are concatenated into the single expanded list at the end of the |
335 // are concatenated into the single expanded list at the end of the |
336 // cleanup pause. |
336 // cleanup pause. |
337 class SparsePRTCleanupTask VALUE_OBJ_CLASS_SPEC { |
337 class SparsePRTCleanupTask { |
338 private: |
338 private: |
339 SparsePRT* _head; |
339 SparsePRT* _head; |
340 SparsePRT* _tail; |
340 SparsePRT* _tail; |
341 |
341 |
342 public: |
342 public: |