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_INTERFACE_COLLECTEDHEAP_INLINE_HPP
26 #define SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP
27
28 #include "gc_interface/collectedHeap.hpp"
29 #include "memory/threadLocalAllocBuffer.inline.hpp"
30 #include "memory/universe.hpp"
31 #include "oops/arrayOop.hpp"
32 #include "prims/jvmtiExport.hpp"
33 #include "runtime/sharedRuntime.hpp"
34 #include "runtime/thread.hpp"
35 #include "services/lowMemoryDetector.hpp"
36 #include "utilities/copy.hpp"
37 #ifdef TARGET_OS_FAMILY_linux
38 # include "thread_linux.inline.hpp"
39 #endif
40 #ifdef TARGET_OS_FAMILY_solaris
41 # include "thread_solaris.inline.hpp"
42 #endif
43 #ifdef TARGET_OS_FAMILY_windows
44 # include "thread_windows.inline.hpp"
45 #endif
46 #ifdef TARGET_OS_FAMILY_bsd
47 # include "thread_bsd.inline.hpp"
48 #endif
49
50 // Inline allocation implementations.
51
52 void CollectedHeap::post_allocation_setup_common(KlassHandle klass,
53 HeapWord* obj) {
54 post_allocation_setup_no_klass_install(klass, obj);
55 post_allocation_install_obj_klass(klass, oop(obj));
56 }
57
58 void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass,
59 HeapWord* objPtr) {
60 oop obj = (oop)objPtr;
61
62 assert(obj != NULL, "NULL object pointer");
63 if (UseBiasedLocking && (klass() != NULL)) {
64 obj->set_mark(klass->prototype_header());
65 } else {
66 // May be bootstrapping
67 obj->set_mark(markOopDesc::prototype());
68 }
|
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_INTERFACE_COLLECTEDHEAP_INLINE_HPP
26 #define SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP
27
28 #include "gc_interface/collectedHeap.hpp"
29 #include "memory/threadLocalAllocBuffer.inline.hpp"
30 #include "memory/universe.hpp"
31 #include "oops/arrayOop.hpp"
32 #include "prims/jvmtiExport.hpp"
33 #include "runtime/sharedRuntime.hpp"
34 #include "runtime/thread.inline.hpp"
35 #include "services/lowMemoryDetector.hpp"
36 #include "utilities/copy.hpp"
37
38 // Inline allocation implementations.
39
40 void CollectedHeap::post_allocation_setup_common(KlassHandle klass,
41 HeapWord* obj) {
42 post_allocation_setup_no_klass_install(klass, obj);
43 post_allocation_install_obj_klass(klass, oop(obj));
44 }
45
46 void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass,
47 HeapWord* objPtr) {
48 oop obj = (oop)objPtr;
49
50 assert(obj != NULL, "NULL object pointer");
51 if (UseBiasedLocking && (klass() != NULL)) {
52 obj->set_mark(klass->prototype_header());
53 } else {
54 // May be bootstrapping
55 obj->set_mark(markOopDesc::prototype());
56 }
|