8 *
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 #include "precompiled.hpp"
26 #include "classfile/javaClasses.hpp"
27 #include "classfile/systemDictionary.hpp"
28 #include "gc_interface/collectedHeap.inline.hpp"
29 #include "memory/genCollectedHeap.hpp"
30 #include "memory/specialized_oop_closures.hpp"
31 #include "oops/instanceRefKlass.inline.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "utilities/preserveException.hpp"
34 #include "utilities/macros.hpp"
35
36 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
37
38 void InstanceRefKlass::update_nonstatic_oop_maps(Klass* k) {
39 // Clear the nonstatic oop-map entries corresponding to referent
40 // and nextPending field. They are treated specially by the
41 // garbage collector.
42 // The discovered field is used only by the garbage collector
43 // and is also treated specially.
44 InstanceKlass* ik = InstanceKlass::cast(k);
45
46 // Check that we have the right class
47 debug_only(static bool first_time = true);
48 assert(k == SystemDictionary::Reference_klass() && first_time,
49 "Invalid update of maps");
50 debug_only(first_time = false);
51 assert(ik->nonstatic_oop_map_count() == 1, "just checking");
52
53 OopMapBlock* map = ik->start_of_nonstatic_oop_maps();
54
|
8 *
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 #include "precompiled.hpp"
26 #include "classfile/javaClasses.hpp"
27 #include "classfile/systemDictionary.hpp"
28 #include "gc/shared/collectedHeap.inline.hpp"
29 #include "gc/shared/genCollectedHeap.hpp"
30 #include "gc/shared/specialized_oop_closures.hpp"
31 #include "oops/instanceRefKlass.inline.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "utilities/macros.hpp"
34 #include "utilities/preserveException.hpp"
35
36 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
37
38 void InstanceRefKlass::update_nonstatic_oop_maps(Klass* k) {
39 // Clear the nonstatic oop-map entries corresponding to referent
40 // and nextPending field. They are treated specially by the
41 // garbage collector.
42 // The discovered field is used only by the garbage collector
43 // and is also treated specially.
44 InstanceKlass* ik = InstanceKlass::cast(k);
45
46 // Check that we have the right class
47 debug_only(static bool first_time = true);
48 assert(k == SystemDictionary::Reference_klass() && first_time,
49 "Invalid update of maps");
50 debug_only(first_time = false);
51 assert(ik->nonstatic_oop_map_count() == 1, "just checking");
52
53 OopMapBlock* map = ik->start_of_nonstatic_oop_maps();
54
|