Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/bitMap.hpp @ 3771:842b840e67db
7046558: G1: concurrent marking optimizations
Summary: Some optimizations to improve the concurrent marking phase: specialize the main oop closure, make sure a few methods in the fast path are properly inlined, a few more bits and pieces, and some cosmetic fixes.
Reviewed-by: stefank, johnc
author | tonyp |
---|---|
date | Tue, 14 Jun 2011 10:33:43 -0400 |
parents | f95d63e2154a |
children | 2a0172480595 |
comparison
equal
deleted
inserted
replaced
3770:74cd10898bea | 3771:842b840e67db |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2011, 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. |
159 return word_align_up(bit) == bit; | 159 return word_align_up(bit) == bit; |
160 } | 160 } |
161 | 161 |
162 // Set or clear the specified bit. | 162 // Set or clear the specified bit. |
163 inline void set_bit(idx_t bit); | 163 inline void set_bit(idx_t bit); |
164 void clear_bit(idx_t bit); | 164 inline void clear_bit(idx_t bit); |
165 | 165 |
166 // Atomically set or clear the specified bit. | 166 // Atomically set or clear the specified bit. |
167 bool par_set_bit(idx_t bit); | 167 inline bool par_set_bit(idx_t bit); |
168 bool par_clear_bit(idx_t bit); | 168 inline bool par_clear_bit(idx_t bit); |
169 | 169 |
170 // Put the given value at the given offset. The parallel version | 170 // Put the given value at the given offset. The parallel version |
171 // will CAS the value into the bitmap and is quite a bit slower. | 171 // will CAS the value into the bitmap and is quite a bit slower. |
172 // The parallel version also returns a value indicating if the | 172 // The parallel version also returns a value indicating if the |
173 // calling thread was the one that changed the value of the bit. | 173 // calling thread was the one that changed the value of the bit. |