comparison src/share/vm/gc_implementation/g1/heapRegionSet.cpp @ 8504:86b4965f0c9a

-Cleanup code
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Wed, 20 Mar 2013 21:39:24 +0100
parents 992f62c457b0
children 52b4284cb496
comparison
equal deleted inserted replaced
8503:58385e7565ff 8504:86b4965f0c9a
110 110
111 guarantee((!regions_humongous() && region_num() == length()) || 111 guarantee((!regions_humongous() && region_num() == length()) ||
112 ( regions_humongous() && region_num() >= length()), 112 ( regions_humongous() && region_num() >= length()),
113 hrs_ext_msg(this, "invariant")); 113 hrs_ext_msg(this, "invariant"));
114 114
115 printf("region name %s\n", this->name());
116 printf("regions empty? %d\n", regions_empty());
117 printf("total used bytes %lu\n", total_used_bytes());
118
119 guarantee(!regions_empty() || total_used_bytes() == 0, 115 guarantee(!regions_empty() || total_used_bytes() == 0,
120 hrs_ext_msg(this, "invariant")); 116 hrs_ext_msg(this, "invariant"));
121 117
122 guarantee(total_used_bytes() <= total_capacity_bytes(), 118 guarantee(total_used_bytes() <= total_capacity_bytes(),
123 hrs_ext_msg(this, "invariant")); 119 hrs_ext_msg(this, "invariant"));
128 hrs_assert_mt_safety_ok(this); 124 hrs_assert_mt_safety_ok(this);
129 assert(!_verify_in_progress, 125 assert(!_verify_in_progress,
130 hrs_ext_msg(this, "verification should not be in progress")); 126 hrs_ext_msg(this, "verification should not be in progress"));
131 127
132 // Do the basic verification first before we do the checks over the regions. 128 // Do the basic verification first before we do the checks over the regions.
133 //HeapRegionSetBase::verify(); 129 HeapRegionSetBase::verify();
134 130
135 _calc_length = 0; 131 _calc_length = 0;
136 _calc_region_num = 0; 132 _calc_region_num = 0;
137 _calc_total_capacity_bytes = 0; 133 _calc_total_capacity_bytes = 0;
138 _calc_total_used_bytes = 0; 134 _calc_total_used_bytes = 0;
439 "seems very long, is there maybe a cycle? " 435 "seems very long, is there maybe a cycle? "
440 "curr: "PTR_FORMAT" prev0: "PTR_FORMAT" " 436 "curr: "PTR_FORMAT" prev0: "PTR_FORMAT" "
441 "prev1: "PTR_FORMAT" length: %u", 437 "prev1: "PTR_FORMAT" length: %u",
442 name(), count, curr, prev0, prev1, length())); 438 name(), count, curr, prev0, prev1, length()));
443 439
444 //printf("[%s] the calculated length: %u "
445 // "just print "
446 // "curr: "PTR_FORMAT" prev0: "PTR_FORMAT" "
447 // "prev1: "PTR_FORMAT" length: %u used: %lu\n",
448 // name(), count, (unsigned long)curr, (unsigned long)prev0, (unsigned long)prev1, length(), curr->used());
449 curr->print();
450 prev1 = prev0; 440 prev1 = prev0;
451 prev0 = curr; 441 prev0 = curr;
452 curr = curr->next(); 442 curr = curr->next();
453 } 443 }
454 444