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

changeset 6992
2c6ef90f030a
parent 6990
1526a938e670
child 7009
3f2894c5052e
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Tue Jul 01 09:03:55 2014 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Jul 07 10:12:40 2014 +0200
     1.3 @@ -399,7 +399,6 @@
     1.4    // We always recreate the prev marking info and we'll explicitly
     1.5    // mark all objects we find to be self-forwarded on the prev
     1.6    // bitmap. So all objects need to be below PTAMS.
     1.7 -  _prev_top_at_mark_start = top();
     1.8    _prev_marked_bytes = 0;
     1.9  
    1.10    if (during_initial_mark) {
    1.11 @@ -423,6 +422,7 @@
    1.12    assert(0 <= marked_bytes && marked_bytes <= used(),
    1.13           err_msg("marked: "SIZE_FORMAT" used: "SIZE_FORMAT,
    1.14                   marked_bytes, used()));
    1.15 +  _prev_top_at_mark_start = top();
    1.16    _prev_marked_bytes = marked_bytes;
    1.17  }
    1.18  
    1.19 @@ -907,7 +907,8 @@
    1.20      size_t obj_size = block_size(p);
    1.21      object_num += 1;
    1.22  
    1.23 -    if (is_humongous != g1->isHumongous(obj_size)) {
    1.24 +    if (is_humongous != g1->isHumongous(obj_size) &&
    1.25 +        !g1->is_obj_dead(obj, this)) { // Dead objects may have bigger block_size since they span several objects.
    1.26        gclog_or_tty->print_cr("obj "PTR_FORMAT" is of %shumongous size ("
    1.27                               SIZE_FORMAT" words) in a %shumongous region",
    1.28                               p, g1->isHumongous(obj_size) ? "" : "non-",
    1.29 @@ -918,7 +919,9 @@
    1.30  
    1.31      // If it returns false, verify_for_object() will output the
    1.32      // appropriate messasge.
    1.33 -    if (do_bot_verify && !_offsets.verify_for_object(p, obj_size)) {
    1.34 +    if (do_bot_verify &&
    1.35 +        !g1->is_obj_dead(obj, this) &&
    1.36 +        !_offsets.verify_for_object(p, obj_size)) {
    1.37        *failures = true;
    1.38        return;
    1.39      }
    1.40 @@ -926,7 +929,10 @@
    1.41      if (!g1->is_obj_dead_cond(obj, this, vo)) {
    1.42        if (obj->is_oop()) {
    1.43          Klass* klass = obj->klass();
    1.44 -        if (!klass->is_metaspace_object()) {
    1.45 +        bool is_metaspace_object = Metaspace::contains(klass) ||
    1.46 +                                   (vo == VerifyOption_G1UsePrevMarking &&
    1.47 +                                   ClassLoaderDataGraph::unload_list_contains(klass));
    1.48 +        if (!is_metaspace_object) {
    1.49            gclog_or_tty->print_cr("klass "PTR_FORMAT" of object "PTR_FORMAT" "
    1.50                                   "not metadata", klass, (void *)obj);
    1.51            *failures = true;

mercurial