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

changeset 2453
2250ee17e258
parent 2314
f95d63e2154a
child 2454
b158bed62ef5
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp	Thu Jan 06 23:50:02 2011 -0800
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp	Wed Jan 12 13:06:00 2011 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2011, 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 @@ -173,6 +173,19 @@
    1.11    virtual HeapWord* cross_threshold(HeapWord* start, HeapWord* end);
    1.12  
    1.13    virtual void print() const;
    1.14 +
    1.15 +  void reset_bot() {
    1.16 +    _offsets.zero_bottom_entry();
    1.17 +    _offsets.initialize_threshold();
    1.18 +  }
    1.19 +
    1.20 +  void update_bot_for_object(HeapWord* start, size_t word_size) {
    1.21 +    _offsets.alloc_block(start, word_size);
    1.22 +  }
    1.23 +
    1.24 +  void print_bot_on(outputStream* out) {
    1.25 +    _offsets.print_on(out);
    1.26 +  }
    1.27  };
    1.28  
    1.29  class HeapRegion: public G1OffsetTableContigSpace {
    1.30 @@ -404,13 +417,35 @@
    1.31      return _humongous_start_region;
    1.32    }
    1.33  
    1.34 -  // Causes the current region to represent a humongous object spanning "n"
    1.35 -  // regions.
    1.36 -  void set_startsHumongous(HeapWord* new_end);
    1.37 +  // Makes the current region be a "starts humongous" region, i.e.,
    1.38 +  // the first region in a series of one or more contiguous regions
    1.39 +  // that will contain a single "humongous" object. The two parameters
    1.40 +  // are as follows:
    1.41 +  //
    1.42 +  // new_top : The new value of the top field of this region which
    1.43 +  // points to the end of the humongous object that's being
    1.44 +  // allocated. If there is more than one region in the series, top
    1.45 +  // will lie beyond this region's original end field and on the last
    1.46 +  // region in the series.
    1.47 +  //
    1.48 +  // new_end : The new value of the end field of this region which
    1.49 +  // points to the end of the last region in the series. If there is
    1.50 +  // one region in the series (namely: this one) end will be the same
    1.51 +  // as the original end of this region.
    1.52 +  //
    1.53 +  // Updating top and end as described above makes this region look as
    1.54 +  // if it spans the entire space taken up by all the regions in the
    1.55 +  // series and an single allocation moved its top to new_top. This
    1.56 +  // ensures that the space (capacity / allocated) taken up by all
    1.57 +  // humongous regions can be calculated by just looking at the
    1.58 +  // "starts humongous" regions and by ignoring the "continues
    1.59 +  // humongous" regions.
    1.60 +  void set_startsHumongous(HeapWord* new_top, HeapWord* new_end);
    1.61  
    1.62 -  // The regions that continue a humongous sequence should be added using
    1.63 -  // this method, in increasing address order.
    1.64 -  void set_continuesHumongous(HeapRegion* start);
    1.65 +  // Makes the current region be a "continues humongous'
    1.66 +  // region. first_hr is the "start humongous" region of the series
    1.67 +  // which this region will be part of.
    1.68 +  void set_continuesHumongous(HeapRegion* first_hr);
    1.69  
    1.70    // If the region has a remembered set, return a pointer to it.
    1.71    HeapRegionRemSet* rem_set() const {

mercurial