< prev index next >

src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp

Print this page
rev 7696 : 8058354: SPECjvm2008-Derby -2.7% performance regression on Solaris-X64 starting with 9-b29
Summary: Allow partial use of large pages for auxiliary data structures in G1.
Reviewed-by:
   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  *


 331   // concurrent cycles) we have completed.
 332   volatile unsigned int _old_marking_cycles_completed;
 333 
 334   bool _concurrent_cycle_started;
 335   bool _heap_summary_sent;
 336 
 337   // This is a non-product method that is helpful for testing. It is
 338   // called at the end of a GC and artificially expands the heap by
 339   // allocating a number of dead regions. This way we can induce very
 340   // frequent marking cycles and stress the cleanup / concurrent
 341   // cleanup code more (as all the regions that will be allocated by
 342   // this method will be found dead by the marking cycle).
 343   void allocate_dummy_regions() PRODUCT_RETURN;
 344 
 345   // Clear RSets after a compaction. It also resets the GC time stamps.
 346   void clear_rsets_post_compaction();
 347 
 348   // If the HR printer is active, dump the state of the regions in the
 349   // heap after a compaction.
 350   void print_hrm_post_compaction();






 351 
 352   double verify(bool guard, const char* msg);
 353   void verify_before_gc();
 354   void verify_after_gc();
 355 
 356   void log_gc_header();
 357   void log_gc_footer(double pause_time_sec);
 358 
 359   // These are macros so that, if the assert fires, we get the correct
 360   // line number, file, etc.
 361 
 362 #define heap_locking_asserts_err_msg(_extra_message_)                         \
 363   err_msg("%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s",    \
 364           (_extra_message_),                                                  \
 365           BOOL_TO_STR(Heap_lock->owned_by_self()),                            \
 366           BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()),               \
 367           BOOL_TO_STR(Thread::current()->is_VM_thread()))
 368 
 369 #define assert_heap_locked()                                                  \
 370   do {                                                                        \


   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  *


 331   // concurrent cycles) we have completed.
 332   volatile unsigned int _old_marking_cycles_completed;
 333 
 334   bool _concurrent_cycle_started;
 335   bool _heap_summary_sent;
 336 
 337   // This is a non-product method that is helpful for testing. It is
 338   // called at the end of a GC and artificially expands the heap by
 339   // allocating a number of dead regions. This way we can induce very
 340   // frequent marking cycles and stress the cleanup / concurrent
 341   // cleanup code more (as all the regions that will be allocated by
 342   // this method will be found dead by the marking cycle).
 343   void allocate_dummy_regions() PRODUCT_RETURN;
 344 
 345   // Clear RSets after a compaction. It also resets the GC time stamps.
 346   void clear_rsets_post_compaction();
 347 
 348   // If the HR printer is active, dump the state of the regions in the
 349   // heap after a compaction.
 350   void print_hrm_post_compaction();
 351 
 352   // Create a memory mapper for auxiliary data structures of the given size and
 353   // translation factor.
 354   static G1RegionToSpaceMapper* create_aux_memory_mapper(const char* description,
 355                                                          size_t size,
 356                                                          size_t translation_factor);
 357 
 358   double verify(bool guard, const char* msg);
 359   void verify_before_gc();
 360   void verify_after_gc();
 361 
 362   void log_gc_header();
 363   void log_gc_footer(double pause_time_sec);
 364 
 365   // These are macros so that, if the assert fires, we get the correct
 366   // line number, file, etc.
 367 
 368 #define heap_locking_asserts_err_msg(_extra_message_)                         \
 369   err_msg("%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s",    \
 370           (_extra_message_),                                                  \
 371           BOOL_TO_STR(Heap_lock->owned_by_self()),                            \
 372           BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()),               \
 373           BOOL_TO_STR(Thread::current()->is_VM_thread()))
 374 
 375 #define assert_heap_locked()                                                  \
 376   do {                                                                        \


< prev index next >