1.1 --- a/src/share/vm/gc_interface/collectedHeap.inline.hpp Fri Mar 23 15:28:24 2012 +0100 1.2 +++ b/src/share/vm/gc_interface/collectedHeap.inline.hpp Tue Mar 27 10:29:59 2012 +0200 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -50,15 +50,13 @@ 1.11 // Inline allocation implementations. 1.12 1.13 void CollectedHeap::post_allocation_setup_common(KlassHandle klass, 1.14 - HeapWord* obj, 1.15 - size_t size) { 1.16 - post_allocation_setup_no_klass_install(klass, obj, size); 1.17 - post_allocation_install_obj_klass(klass, oop(obj), (int) size); 1.18 + HeapWord* obj) { 1.19 + post_allocation_setup_no_klass_install(klass, obj); 1.20 + post_allocation_install_obj_klass(klass, oop(obj)); 1.21 } 1.22 1.23 void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass, 1.24 - HeapWord* objPtr, 1.25 - size_t size) { 1.26 + HeapWord* objPtr) { 1.27 oop obj = (oop)objPtr; 1.28 1.29 assert(obj != NULL, "NULL object pointer"); 1.30 @@ -71,8 +69,7 @@ 1.31 } 1.32 1.33 void CollectedHeap::post_allocation_install_obj_klass(KlassHandle klass, 1.34 - oop obj, 1.35 - int size) { 1.36 + oop obj) { 1.37 // These asserts are kind of complicated because of klassKlass 1.38 // and the beginning of the world. 1.39 assert(klass() != NULL || !Universe::is_fully_initialized(), "NULL klass"); 1.40 @@ -101,9 +98,8 @@ 1.41 } 1.42 1.43 void CollectedHeap::post_allocation_setup_obj(KlassHandle klass, 1.44 - HeapWord* obj, 1.45 - size_t size) { 1.46 - post_allocation_setup_common(klass, obj, size); 1.47 + HeapWord* obj) { 1.48 + post_allocation_setup_common(klass, obj); 1.49 assert(Universe::is_bootstrapping() || 1.50 !((oop)obj)->blueprint()->oop_is_array(), "must not be an array"); 1.51 // notify jvmti and dtrace 1.52 @@ -112,14 +108,13 @@ 1.53 1.54 void CollectedHeap::post_allocation_setup_array(KlassHandle klass, 1.55 HeapWord* obj, 1.56 - size_t size, 1.57 int length) { 1.58 // Set array length before setting the _klass field 1.59 // in post_allocation_setup_common() because the klass field 1.60 // indicates that the object is parsable by concurrent GC. 1.61 assert(length >= 0, "length should be non-negative"); 1.62 ((arrayOop)obj)->set_length(length); 1.63 - post_allocation_setup_common(klass, obj, size); 1.64 + post_allocation_setup_common(klass, obj); 1.65 assert(((oop)obj)->blueprint()->oop_is_array(), "must be an array"); 1.66 // notify jvmti and dtrace (must be after length is set for dtrace) 1.67 post_allocation_notify(klass, (oop)obj); 1.68 @@ -256,7 +251,7 @@ 1.69 assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed"); 1.70 assert(size >= 0, "int won't convert to size_t"); 1.71 HeapWord* obj = common_mem_allocate_init(size, CHECK_NULL); 1.72 - post_allocation_setup_obj(klass, obj, size); 1.73 + post_allocation_setup_obj(klass, obj); 1.74 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size)); 1.75 return (oop)obj; 1.76 } 1.77 @@ -269,7 +264,7 @@ 1.78 assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed"); 1.79 assert(size >= 0, "int won't convert to size_t"); 1.80 HeapWord* obj = common_mem_allocate_init(size, CHECK_NULL); 1.81 - post_allocation_setup_array(klass, obj, size, length); 1.82 + post_allocation_setup_array(klass, obj, length); 1.83 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size)); 1.84 return (oop)obj; 1.85 } 1.86 @@ -283,7 +278,7 @@ 1.87 assert(size >= 0, "int won't convert to size_t"); 1.88 HeapWord* obj = common_mem_allocate_noinit(size, CHECK_NULL); 1.89 ((oop)obj)->set_klass_gap(0); 1.90 - post_allocation_setup_array(klass, obj, size, length); 1.91 + post_allocation_setup_array(klass, obj, length); 1.92 #ifndef PRODUCT 1.93 const size_t hs = oopDesc::header_size()+1; 1.94 Universe::heap()->check_for_non_bad_heap_word_value(obj+hs, size-hs); 1.95 @@ -293,7 +288,7 @@ 1.96 1.97 oop CollectedHeap::permanent_obj_allocate(KlassHandle klass, int size, TRAPS) { 1.98 oop obj = permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL); 1.99 - post_allocation_install_obj_klass(klass, obj, size); 1.100 + post_allocation_install_obj_klass(klass, obj); 1.101 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj, 1.102 size)); 1.103 return obj; 1.104 @@ -306,7 +301,7 @@ 1.105 assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed"); 1.106 assert(size >= 0, "int won't convert to size_t"); 1.107 HeapWord* obj = common_permanent_mem_allocate_init(size, CHECK_NULL); 1.108 - post_allocation_setup_no_klass_install(klass, obj, size); 1.109 + post_allocation_setup_no_klass_install(klass, obj); 1.110 #ifndef PRODUCT 1.111 const size_t hs = oopDesc::header_size(); 1.112 Universe::heap()->check_for_bad_heap_word_value(obj+hs, size-hs); 1.113 @@ -322,7 +317,7 @@ 1.114 assert(!Universe::heap()->is_gc_active(), "Allocation during gc not allowed"); 1.115 assert(size >= 0, "int won't convert to size_t"); 1.116 HeapWord* obj = common_permanent_mem_allocate_init(size, CHECK_NULL); 1.117 - post_allocation_setup_array(klass, obj, size, length); 1.118 + post_allocation_setup_array(klass, obj, length); 1.119 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value(obj, size)); 1.120 return (oop)obj; 1.121 }