src/hotspot/share/gc/shared/cardTableModRefBS.cpp
changeset 47998 fb0275c320a0
parent 47216 71c04702a3d5
child 48961 120b61d50f85
equal deleted inserted replaced
47997:55c43e677ded 47998:fb0275c320a0
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/shared/cardTableModRefBS.inline.hpp"
    26 #include "gc/shared/cardTableModRefBS.inline.hpp"
    27 #include "gc/shared/collectedHeap.hpp"
    27 #include "gc/shared/collectedHeap.hpp"
    28 #include "gc/shared/genCollectedHeap.hpp"
    28 #include "gc/shared/genCollectedHeap.hpp"
    29 #include "gc/shared/space.inline.hpp"
    29 #include "gc/shared/space.inline.hpp"
       
    30 #include "logging/log.hpp"
    30 #include "memory/virtualspace.hpp"
    31 #include "memory/virtualspace.hpp"
    31 #include "logging/log.hpp"
    32 #include "oops/oop.inline.hpp"
    32 #include "services/memTracker.hpp"
    33 #include "services/memTracker.hpp"
    33 #include "utilities/align.hpp"
    34 #include "utilities/align.hpp"
    34 #include "utilities/macros.hpp"
    35 #include "utilities/macros.hpp"
    35 
    36 
    36 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
    37 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
   361 }
   362 }
   362 
   363 
   363 // Note that these versions are precise!  The scanning code has to handle the
   364 // Note that these versions are precise!  The scanning code has to handle the
   364 // fact that the write barrier may be either precise or imprecise.
   365 // fact that the write barrier may be either precise or imprecise.
   365 
   366 
   366 void CardTableModRefBS::write_ref_field_work(void* field, oop newVal, bool release) {
       
   367   inline_write_ref_field(field, newVal, release);
       
   368 }
       
   369 
       
   370 
       
   371 void CardTableModRefBS::dirty_MemRegion(MemRegion mr) {
   367 void CardTableModRefBS::dirty_MemRegion(MemRegion mr) {
   372   assert(align_down(mr.start(), HeapWordSize) == mr.start(), "Unaligned start");
   368   assert(align_down(mr.start(), HeapWordSize) == mr.start(), "Unaligned start");
   373   assert(align_up  (mr.end(),   HeapWordSize) == mr.end(),   "Unaligned end"  );
   369   assert(align_up  (mr.end(),   HeapWordSize) == mr.end(),   "Unaligned end"  );
   374   jbyte* cur  = byte_for(mr.start());
   370   jbyte* cur  = byte_for(mr.start());
   375   jbyte* last = byte_after(mr.last());
   371   jbyte* last = byte_after(mr.last());
   523 
   519 
   524 void CardTableModRefBS::print_on(outputStream* st) const {
   520 void CardTableModRefBS::print_on(outputStream* st) const {
   525   st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] byte_map_base: " INTPTR_FORMAT,
   521   st->print_cr("Card table byte_map: [" INTPTR_FORMAT "," INTPTR_FORMAT "] byte_map_base: " INTPTR_FORMAT,
   526                p2i(_byte_map), p2i(_byte_map + _byte_map_size), p2i(byte_map_base));
   522                p2i(_byte_map), p2i(_byte_map + _byte_map_size), p2i(byte_map_base));
   527 }
   523 }
   528