hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp

Print this page
rev 611 : Merge
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)cardTableExtension.hpp       1.20 07/05/05 17:05:26 JVM"
   3 #endif
   4 /*
   5  * Copyright 2001-2003 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


  66                                   HeapWord* space_top,
  67                                   PSPromotionManager* pm,
  68                                   uint stripe_number);
  69 
  70   // Verification
  71   static void verify_all_young_refs_imprecise();
  72   static void verify_all_young_refs_precise();
  73 
  74   bool addr_is_marked_imprecise(void *addr);
  75   bool addr_is_marked_precise(void *addr);
  76 
  77   void set_card_newgen(void* addr)   { jbyte* p = byte_for(addr); *p = verify_card; }
  78 
  79   // Testers for entries
  80   static bool card_is_dirty(int value)      { return value == dirty_card; }
  81   static bool card_is_newgen(int value)     { return value == youngergen_card; }
  82   static bool card_is_clean(int value)      { return value == clean_card; }
  83   static bool card_is_verify(int value)     { return value == verify_card; }
  84 
  85   // Card marking
  86   void inline_write_ref_field_gc(oop* field, oop new_val) {
  87     jbyte* byte = byte_for(field);
  88     *byte = youngergen_card;
  89   }
  90 
  91   // Adaptive size policy support
  92   // Allows adjustment of the base and size of the covered regions
  93   void resize_covered_region(MemRegion new_region);
  94   // Finds the covered region to resize based on the start address
  95   // of the covered regions.  
  96   void resize_covered_region_by_start(MemRegion new_region);
  97   // Finds the covered region to resize based on the end address
  98   // of the covered regions.  
  99   void resize_covered_region_by_end(int changed_region, MemRegion new_region);
 100   // Finds the lowest start address of a covered region that is
 101   // previous (i.e., lower index) to the covered region with index "ind".
 102   HeapWord* lowest_prev_committed_start(int ind) const;
 103 
 104 #ifdef ASSERT
 105 
 106   bool is_valid_card_address(jbyte* addr) {
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)cardTableExtension.hpp       1.20 07/05/05 17:05:26 JVM"
   3 #endif
   4 /*
   5  * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


  66                                   HeapWord* space_top,
  67                                   PSPromotionManager* pm,
  68                                   uint stripe_number);
  69 
  70   // Verification
  71   static void verify_all_young_refs_imprecise();
  72   static void verify_all_young_refs_precise();
  73 
  74   bool addr_is_marked_imprecise(void *addr);
  75   bool addr_is_marked_precise(void *addr);
  76 
  77   void set_card_newgen(void* addr)   { jbyte* p = byte_for(addr); *p = verify_card; }
  78 
  79   // Testers for entries
  80   static bool card_is_dirty(int value)      { return value == dirty_card; }
  81   static bool card_is_newgen(int value)     { return value == youngergen_card; }
  82   static bool card_is_clean(int value)      { return value == clean_card; }
  83   static bool card_is_verify(int value)     { return value == verify_card; }
  84 
  85   // Card marking
  86   void inline_write_ref_field_gc(void* field, oop new_val) {
  87     jbyte* byte = byte_for(field);
  88     *byte = youngergen_card;
  89   }
  90 
  91   // Adaptive size policy support
  92   // Allows adjustment of the base and size of the covered regions
  93   void resize_covered_region(MemRegion new_region);
  94   // Finds the covered region to resize based on the start address
  95   // of the covered regions.  
  96   void resize_covered_region_by_start(MemRegion new_region);
  97   // Finds the covered region to resize based on the end address
  98   // of the covered regions.  
  99   void resize_covered_region_by_end(int changed_region, MemRegion new_region);
 100   // Finds the lowest start address of a covered region that is
 101   // previous (i.e., lower index) to the covered region with index "ind".
 102   HeapWord* lowest_prev_committed_start(int ind) const;
 103 
 104 #ifdef ASSERT
 105 
 106   bool is_valid_card_address(jbyte* addr) {