src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
changeset 49722 a47d1e21b3f1
parent 47885 5caa1d5f74c1
child 57777 90ead0febf56
child 58678 9cf78a70fa4f
equal deleted inserted replaced
49721:ea0cc7c74e75 49722:a47d1e21b3f1
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018 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.
   110       // object is forwarded. Need to clear the mark and it's no problem
   110       // object is forwarded. Need to clear the mark and it's no problem
   111       // since it will be restored by preserved marks. There is an exception
   111       // since it will be restored by preserved marks. There is an exception
   112       // with BiasedLocking, in this case forwardee() will return NULL
   112       // with BiasedLocking, in this case forwardee() will return NULL
   113       // even if the mark-word is used. This is no problem since
   113       // even if the mark-word is used. This is no problem since
   114       // forwardee() will return NULL in the compaction phase as well.
   114       // forwardee() will return NULL in the compaction phase as well.
   115       object->init_mark();
   115       object->init_mark_raw();
   116     } else {
   116     } else {
   117       // Make sure object has the correct mark-word set or that it will be
   117       // Make sure object has the correct mark-word set or that it will be
   118       // fixed when restoring the preserved marks.
   118       // fixed when restoring the preserved marks.
   119       assert(object->mark() == markOopDesc::prototype_for_object(object) || // Correct mark
   119       assert(object->mark_raw() == markOopDesc::prototype_for_object(object) || // Correct mark
   120              object->mark()->must_be_preserved(object) || // Will be restored by PreservedMarksSet
   120              object->mark_raw()->must_be_preserved(object) || // Will be restored by PreservedMarksSet
   121              (UseBiasedLocking && object->has_bias_pattern()), // Will be restored by BiasedLocking
   121              (UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking
   122              "should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
   122              "should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
   123              p2i(object), p2i(object->mark()), p2i(markOopDesc::prototype_for_object(object)));
   123              p2i(object), p2i(object->mark_raw()), p2i(markOopDesc::prototype_for_object(object)));
   124     }
   124     }
   125     assert(object->forwardee() == NULL, "should be forwarded to NULL");
   125     assert(object->forwardee() == NULL, "should be forwarded to NULL");
   126   }
   126   }
   127 
   127 
   128   // Update compaction values.
   128   // Update compaction values.