< prev index next >

src/share/vm/gc/shared/collectedHeap.inline.hpp

Print this page
rev 8362 : [mq]: hotspot
   1 /*
   2  * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   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 #ifndef SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP
  26 #define SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP
  27 
  28 #include "gc_interface/allocTracer.hpp"
  29 #include "gc_interface/collectedHeap.hpp"
  30 #include "memory/threadLocalAllocBuffer.inline.hpp"
  31 #include "memory/universe.hpp"
  32 #include "oops/arrayOop.hpp"
  33 #include "prims/jvmtiExport.hpp"
  34 #include "runtime/sharedRuntime.hpp"
  35 #include "runtime/thread.inline.hpp"
  36 #include "services/lowMemoryDetector.hpp"
  37 #include "utilities/copy.hpp"
  38 
  39 // Inline allocation implementations.
  40 
  41 void CollectedHeap::post_allocation_setup_common(KlassHandle klass,
  42                                                  HeapWord* obj) {
  43   post_allocation_setup_no_klass_install(klass, obj);
  44   post_allocation_install_obj_klass(klass, oop(obj));
  45 }
  46 
  47 void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass,
  48                                                            HeapWord* objPtr) {
  49   oop obj = (oop)objPtr;
  50 


 291   }
 292   return false;
 293 }
 294 
 295 inline bool CollectedHeap::promotion_should_fail() {
 296   return promotion_should_fail(&_promotion_failure_alot_count);
 297 }
 298 
 299 inline void CollectedHeap::reset_promotion_should_fail(volatile size_t* count) {
 300   if (PromotionFailureALot) {
 301     _promotion_failure_alot_gc_number = total_collections();
 302     *count = 0;
 303   }
 304 }
 305 
 306 inline void CollectedHeap::reset_promotion_should_fail() {
 307   reset_promotion_should_fail(&_promotion_failure_alot_count);
 308 }
 309 #endif  // #ifndef PRODUCT
 310 
 311 #endif // SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP
   1 /*
   2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   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 #ifndef SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
  26 #define SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
  27 
  28 #include "gc/shared/allocTracer.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shared/threadLocalAllocBuffer.inline.hpp"
  31 #include "memory/universe.hpp"
  32 #include "oops/arrayOop.hpp"
  33 #include "prims/jvmtiExport.hpp"
  34 #include "runtime/sharedRuntime.hpp"
  35 #include "runtime/thread.inline.hpp"
  36 #include "services/lowMemoryDetector.hpp"
  37 #include "utilities/copy.hpp"
  38 
  39 // Inline allocation implementations.
  40 
  41 void CollectedHeap::post_allocation_setup_common(KlassHandle klass,
  42                                                  HeapWord* obj) {
  43   post_allocation_setup_no_klass_install(klass, obj);
  44   post_allocation_install_obj_klass(klass, oop(obj));
  45 }
  46 
  47 void CollectedHeap::post_allocation_setup_no_klass_install(KlassHandle klass,
  48                                                            HeapWord* objPtr) {
  49   oop obj = (oop)objPtr;
  50 


 291   }
 292   return false;
 293 }
 294 
 295 inline bool CollectedHeap::promotion_should_fail() {
 296   return promotion_should_fail(&_promotion_failure_alot_count);
 297 }
 298 
 299 inline void CollectedHeap::reset_promotion_should_fail(volatile size_t* count) {
 300   if (PromotionFailureALot) {
 301     _promotion_failure_alot_gc_number = total_collections();
 302     *count = 0;
 303   }
 304 }
 305 
 306 inline void CollectedHeap::reset_promotion_should_fail() {
 307   reset_promotion_should_fail(&_promotion_failure_alot_count);
 308 }
 309 #endif  // #ifndef PRODUCT
 310 
 311 #endif // SHARE_VM_GC_SHARED_COLLECTEDHEAP_INLINE_HPP
< prev index next >