9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
26 #define SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
27
28 #include "gc/shared/preservedMarks.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "utilities/stack.inline.hpp"
31
32 inline bool PreservedMarks::should_preserve_mark(oop obj, markOop m) const {
33 return m->must_be_preserved_for_promotion_failure(obj);
34 }
35
36 inline void PreservedMarks::push(oop obj, markOop m) {
37 assert(should_preserve_mark(obj, m), "pre-condition");
38 OopAndMarkOop elem(obj, m);
39 _stack.push(elem);
40 }
41
42 inline void PreservedMarks::push_if_necessary(oop obj, markOop m) {
43 if (should_preserve_mark(obj, m)) {
44 push(obj, m);
45 }
46 }
47
48 inline void PreservedMarks::init_forwarded_mark(oop obj) {
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
26 #define SHARE_VM_GC_SHARED_PRESERVEDMARKS_INLINE_HPP
27
28 #include "gc/shared/preservedMarks.hpp"
29 #include "logging/log.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "utilities/stack.inline.hpp"
32
33 inline bool PreservedMarks::should_preserve_mark(oop obj, markOop m) const {
34 return m->must_be_preserved_for_promotion_failure(obj);
35 }
36
37 inline void PreservedMarks::push(oop obj, markOop m) {
38 assert(should_preserve_mark(obj, m), "pre-condition");
39 OopAndMarkOop elem(obj, m);
40 _stack.push(elem);
41 }
42
43 inline void PreservedMarks::push_if_necessary(oop obj, markOop m) {
44 if (should_preserve_mark(obj, m)) {
45 push(obj, m);
46 }
47 }
48
49 inline void PreservedMarks::init_forwarded_mark(oop obj) {
|