src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp

changeset 2061
9d7a8ab3736b
parent 1967
fdde661c8e06
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Mon Aug 02 12:51:43 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp	Thu Jul 22 10:27:41 2010 -0400
     1.3 @@ -123,7 +123,6 @@
     1.4    assert(start_array != NULL && sp != NULL && pm != NULL, "Sanity");
     1.5    assert(start_array->covered_region().contains(sp->used_region()),
     1.6           "ObjectStartArray does not cover space");
     1.7 -  bool depth_first = pm->depth_first();
     1.8  
     1.9    if (sp->not_empty()) {
    1.10      oop* sp_top = (oop*)space_top;
    1.11 @@ -201,21 +200,12 @@
    1.12            *first_nonclean_card++ = clean_card;
    1.13          }
    1.14          // scan oops in objects
    1.15 -        // hoisted the if (depth_first) check out of the loop
    1.16 -        if (depth_first){
    1.17 -          do {
    1.18 -            oop(bottom_obj)->push_contents(pm);
    1.19 -            bottom_obj += oop(bottom_obj)->size();
    1.20 -            assert(bottom_obj <= sp_top, "just checking");
    1.21 -          } while (bottom_obj < top);
    1.22 -          pm->drain_stacks_cond_depth();
    1.23 -        } else {
    1.24 -          do {
    1.25 -            oop(bottom_obj)->copy_contents(pm);
    1.26 -            bottom_obj += oop(bottom_obj)->size();
    1.27 -            assert(bottom_obj <= sp_top, "just checking");
    1.28 -          } while (bottom_obj < top);
    1.29 -        }
    1.30 +        do {
    1.31 +          oop(bottom_obj)->push_contents(pm);
    1.32 +          bottom_obj += oop(bottom_obj)->size();
    1.33 +          assert(bottom_obj <= sp_top, "just checking");
    1.34 +        } while (bottom_obj < top);
    1.35 +        pm->drain_stacks_cond_depth();
    1.36          // remember top oop* scanned
    1.37          prev_top = top;
    1.38        }
    1.39 @@ -230,7 +220,6 @@
    1.40                                                      uint stripe_number) {
    1.41    int ssize = 128; // Naked constant!  Work unit = 64k.
    1.42    int dirty_card_count = 0;
    1.43 -  bool depth_first = pm->depth_first();
    1.44  
    1.45    oop* sp_top = (oop*)space_top;
    1.46    jbyte* start_card = byte_for(sp->bottom());
    1.47 @@ -363,43 +352,22 @@
    1.48          const int interval = PrefetchScanIntervalInBytes;
    1.49          // scan all objects in the range
    1.50          if (interval != 0) {
    1.51 -          // hoisted the if (depth_first) check out of the loop
    1.52 -          if (depth_first) {
    1.53 -            while (p < to) {
    1.54 -              Prefetch::write(p, interval);
    1.55 -              oop m = oop(p);
    1.56 -              assert(m->is_oop_or_null(), "check for header");
    1.57 -              m->push_contents(pm);
    1.58 -              p += m->size();
    1.59 -            }
    1.60 -            pm->drain_stacks_cond_depth();
    1.61 -          } else {
    1.62 -            while (p < to) {
    1.63 -              Prefetch::write(p, interval);
    1.64 -              oop m = oop(p);
    1.65 -              assert(m->is_oop_or_null(), "check for header");
    1.66 -              m->copy_contents(pm);
    1.67 -              p += m->size();
    1.68 -            }
    1.69 +          while (p < to) {
    1.70 +            Prefetch::write(p, interval);
    1.71 +            oop m = oop(p);
    1.72 +            assert(m->is_oop_or_null(), "check for header");
    1.73 +            m->push_contents(pm);
    1.74 +            p += m->size();
    1.75            }
    1.76 +          pm->drain_stacks_cond_depth();
    1.77          } else {
    1.78 -          // hoisted the if (depth_first) check out of the loop
    1.79 -          if (depth_first) {
    1.80 -            while (p < to) {
    1.81 -              oop m = oop(p);
    1.82 -              assert(m->is_oop_or_null(), "check for header");
    1.83 -              m->push_contents(pm);
    1.84 -              p += m->size();
    1.85 -            }
    1.86 -            pm->drain_stacks_cond_depth();
    1.87 -          } else {
    1.88 -            while (p < to) {
    1.89 -              oop m = oop(p);
    1.90 -              assert(m->is_oop_or_null(), "check for header");
    1.91 -              m->copy_contents(pm);
    1.92 -              p += m->size();
    1.93 -            }
    1.94 +          while (p < to) {
    1.95 +            oop m = oop(p);
    1.96 +            assert(m->is_oop_or_null(), "check for header");
    1.97 +            m->push_contents(pm);
    1.98 +            p += m->size();
    1.99            }
   1.100 +          pm->drain_stacks_cond_depth();
   1.101          }
   1.102          last_scanned = p;
   1.103        }

mercurial