1 /* |
1 /* |
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, 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. |
39 static const bool Finalizable = true; |
39 static const bool Finalizable = true; |
40 |
40 |
41 static const bool Publish = true; |
41 static const bool Publish = true; |
42 static const bool Overflow = false; |
42 static const bool Overflow = false; |
43 |
43 |
|
44 static void self_heal(volatile oop* p, uintptr_t addr, uintptr_t heal_addr); |
|
45 |
44 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static oop barrier(volatile oop* p, oop o); |
46 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static oop barrier(volatile oop* p, oop o); |
45 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static oop weak_barrier(volatile oop* p, oop o); |
47 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static oop weak_barrier(volatile oop* p, oop o); |
46 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static void root_barrier(oop* p, oop o); |
48 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path> static void root_barrier(oop* p, oop o); |
47 |
49 |
48 static bool is_null_fast_path(uintptr_t addr); |
50 static bool is_null_fast_path(uintptr_t addr); |
49 static bool is_good_or_null_fast_path(uintptr_t addr); |
51 static bool is_good_or_null_fast_path(uintptr_t addr); |
50 static bool is_weak_good_or_null_fast_path(uintptr_t addr); |
52 static bool is_weak_good_or_null_fast_path(uintptr_t addr); |
51 |
|
52 static bool is_resurrection_blocked(volatile oop* p, oop* o); |
|
53 |
53 |
54 static bool during_mark(); |
54 static bool during_mark(); |
55 static bool during_relocate(); |
55 static bool during_relocate(); |
56 template <bool finalizable> static bool should_mark_through(uintptr_t addr); |
56 template <bool finalizable> static bool should_mark_through(uintptr_t addr); |
57 template <bool follow, bool finalizable, bool publish> static uintptr_t mark(uintptr_t addr); |
57 template <bool follow, bool finalizable, bool publish> static uintptr_t mark(uintptr_t addr); |