src/share/vm/gc_implementation/g1/g1RemSet.cpp

changeset 6552
8847586c9037
parent 6406
eff02b5bd56c
child 6680
78bbf4d43a14
     1.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Tue Apr 08 14:55:16 2014 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp	Thu Apr 03 17:49:31 2014 +0400
     1.3 @@ -114,14 +114,14 @@
     1.4    G1SATBCardTableModRefBS *_ct_bs;
     1.5  
     1.6    double _strong_code_root_scan_time_sec;
     1.7 -  int    _worker_i;
     1.8 +  uint   _worker_i;
     1.9    int    _block_size;
    1.10    bool   _try_claimed;
    1.11  
    1.12  public:
    1.13    ScanRSClosure(OopsInHeapRegionClosure* oc,
    1.14                  CodeBlobToOopClosure* code_root_cl,
    1.15 -                int worker_i) :
    1.16 +                uint worker_i) :
    1.17      _oc(oc),
    1.18      _code_root_cl(code_root_cl),
    1.19      _strong_code_root_scan_time_sec(0.0),
    1.20 @@ -163,7 +163,7 @@
    1.21  
    1.22    void printCard(HeapRegion* card_region, size_t card_index,
    1.23                   HeapWord* card_start) {
    1.24 -    gclog_or_tty->print_cr("T %d Region [" PTR_FORMAT ", " PTR_FORMAT ") "
    1.25 +    gclog_or_tty->print_cr("T " UINT32_FORMAT " Region [" PTR_FORMAT ", " PTR_FORMAT ") "
    1.26                             "RS names card %p: "
    1.27                             "[" PTR_FORMAT ", " PTR_FORMAT ")",
    1.28                             _worker_i,
    1.29 @@ -242,7 +242,7 @@
    1.30  
    1.31  void G1RemSet::scanRS(OopsInHeapRegionClosure* oc,
    1.32                        CodeBlobToOopClosure* code_root_cl,
    1.33 -                      int worker_i) {
    1.34 +                      uint worker_i) {
    1.35    double rs_time_start = os::elapsedTime();
    1.36    HeapRegion *startRegion = _g1->start_cset_region_for_worker(worker_i);
    1.37  
    1.38 @@ -275,13 +275,13 @@
    1.39                                                DirtyCardQueue* into_cset_dcq) :
    1.40      _g1rs(g1h->g1_rem_set()), _into_cset_dcq(into_cset_dcq)
    1.41    {}
    1.42 -  bool do_card_ptr(jbyte* card_ptr, int worker_i) {
    1.43 +  bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
    1.44      // The only time we care about recording cards that
    1.45      // contain references that point into the collection set
    1.46      // is during RSet updating within an evacuation pause.
    1.47      // In this case worker_i should be the id of a GC worker thread.
    1.48      assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
    1.49 -    assert(worker_i < (int) (ParallelGCThreads == 0 ? 1 : ParallelGCThreads), "should be a GC worker");
    1.50 +    assert(worker_i < (ParallelGCThreads == 0 ? 1 : ParallelGCThreads), "should be a GC worker");
    1.51  
    1.52      if (_g1rs->refine_card(card_ptr, worker_i, true)) {
    1.53        // 'card_ptr' contains references that point into the collection
    1.54 @@ -296,7 +296,7 @@
    1.55    }
    1.56  };
    1.57  
    1.58 -void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) {
    1.59 +void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i) {
    1.60    double start = os::elapsedTime();
    1.61    // Apply the given closure to all remaining log entries.
    1.62    RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq);
    1.63 @@ -321,14 +321,14 @@
    1.64  
    1.65  void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
    1.66                                             CodeBlobToOopClosure* code_root_cl,
    1.67 -                                           int worker_i) {
    1.68 +                                           uint worker_i) {
    1.69  #if CARD_REPEAT_HISTO
    1.70    ct_freq_update_histo_and_reset();
    1.71  #endif
    1.72  
    1.73    // We cache the value of 'oc' closure into the appropriate slot in the
    1.74    // _cset_rs_update_cl for this worker
    1.75 -  assert(worker_i < (int)n_workers(), "sanity");
    1.76 +  assert(worker_i < n_workers(), "sanity");
    1.77    _cset_rs_update_cl[worker_i] = oc;
    1.78  
    1.79    // A DirtyCardQueue that is used to hold cards containing references
    1.80 @@ -400,7 +400,7 @@
    1.81      _g1(g1), _ct_bs(bs)
    1.82    { }
    1.83  
    1.84 -  bool do_card_ptr(jbyte* card_ptr, int worker_i) {
    1.85 +  bool do_card_ptr(jbyte* card_ptr, uint worker_i) {
    1.86      // Construct the region representing the card.
    1.87      HeapWord* start = _ct_bs->addr_for(card_ptr);
    1.88      // And find the region containing it.
    1.89 @@ -544,7 +544,7 @@
    1.90                                G1RemSet* rs,
    1.91                                OopsInHeapRegionClosure* push_ref_cl,
    1.92                                bool record_refs_into_cset,
    1.93 -                              int worker_i) :
    1.94 +                              uint worker_i) :
    1.95    _g1(g1h), _g1_rem_set(rs), _from(NULL),
    1.96    _record_refs_into_cset(record_refs_into_cset),
    1.97    _push_ref_cl(push_ref_cl), _worker_i(worker_i) { }
    1.98 @@ -553,7 +553,7 @@
    1.99  // into the collection set, if we're checking for such references;
   1.100  // false otherwise.
   1.101  
   1.102 -bool G1RemSet::refine_card(jbyte* card_ptr, int worker_i,
   1.103 +bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
   1.104                             bool check_for_refs_into_cset) {
   1.105  
   1.106    // If the card is no longer dirty, nothing to do.

mercurial