equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2017, 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. |
28 #include "gc/shared/cardTableModRefBS.hpp" |
28 #include "gc/shared/cardTableModRefBS.hpp" |
29 #include "oops/oopsHierarchy.hpp" |
29 #include "oops/oopsHierarchy.hpp" |
30 #include "runtime/orderAccess.inline.hpp" |
30 #include "runtime/orderAccess.inline.hpp" |
31 |
31 |
32 template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) { |
32 template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) { |
33 jbyte* byte = byte_for((void*)field); |
33 volatile jbyte* byte = byte_for((void*)field); |
34 if (release) { |
34 if (release) { |
35 // Perform a releasing store if requested. |
35 // Perform a releasing store if requested. |
36 OrderAccess::release_store((volatile jbyte*) byte, dirty_card); |
36 OrderAccess::release_store(byte, jbyte(dirty_card)); |
37 } else { |
37 } else { |
38 *byte = dirty_card; |
38 *byte = dirty_card; |
39 } |
39 } |
40 } |
40 } |
41 |
41 |