1844 if (limit > bottom) {
1845 return curr_region;
1846 } else {
1847 assert(limit == bottom,
1848 "the region limit should be at bottom");
1849 // we return NULL and the caller should try calling
1850 // claim_region() again.
1851 return NULL;
1852 }
1853 } else {
1854 assert(_finger > finger, "the finger should have moved forward");
1855 // read it again
1856 finger = _finger;
1857 }
1858 }
1859
1860 return NULL;
1861 }
1862
1863 #ifndef PRODUCT
1864 class VerifyNoCSetOops VALUE_OBJ_CLASS_SPEC {
1865 private:
1866 G1CollectedHeap* _g1h;
1867 const char* _phase;
1868 int _info;
1869
1870 public:
1871 VerifyNoCSetOops(const char* phase, int info = -1) :
1872 _g1h(G1CollectedHeap::heap()),
1873 _phase(phase),
1874 _info(info)
1875 { }
1876
1877 void operator()(G1TaskQueueEntry task_entry) const {
1878 if (task_entry.is_array_slice()) {
1879 guarantee(_g1h->is_in_reserved(task_entry.slice()), "Slice " PTR_FORMAT " must be in heap.", p2i(task_entry.slice()));
1880 return;
1881 }
1882 guarantee(oopDesc::is_oop(task_entry.obj()),
1883 "Non-oop " PTR_FORMAT ", phase: %s, info: %d",
1884 p2i(task_entry.obj()), _phase, _info);
|
1844 if (limit > bottom) {
1845 return curr_region;
1846 } else {
1847 assert(limit == bottom,
1848 "the region limit should be at bottom");
1849 // we return NULL and the caller should try calling
1850 // claim_region() again.
1851 return NULL;
1852 }
1853 } else {
1854 assert(_finger > finger, "the finger should have moved forward");
1855 // read it again
1856 finger = _finger;
1857 }
1858 }
1859
1860 return NULL;
1861 }
1862
1863 #ifndef PRODUCT
1864 class VerifyNoCSetOops {
1865 private:
1866 G1CollectedHeap* _g1h;
1867 const char* _phase;
1868 int _info;
1869
1870 public:
1871 VerifyNoCSetOops(const char* phase, int info = -1) :
1872 _g1h(G1CollectedHeap::heap()),
1873 _phase(phase),
1874 _info(info)
1875 { }
1876
1877 void operator()(G1TaskQueueEntry task_entry) const {
1878 if (task_entry.is_array_slice()) {
1879 guarantee(_g1h->is_in_reserved(task_entry.slice()), "Slice " PTR_FORMAT " must be in heap.", p2i(task_entry.slice()));
1880 return;
1881 }
1882 guarantee(oopDesc::is_oop(task_entry.obj()),
1883 "Non-oop " PTR_FORMAT ", phase: %s, info: %d",
1884 p2i(task_entry.obj()), _phase, _info);
|