equal
deleted
inserted
replaced
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 #include "precompiled.hpp" |
24 #include "precompiled.hpp" |
|
25 #include "gc/shared/locationPrinter.hpp" |
25 #include "gc/z/zAddress.inline.hpp" |
26 #include "gc/z/zAddress.inline.hpp" |
26 #include "gc/z/zGlobals.hpp" |
27 #include "gc/z/zGlobals.hpp" |
27 #include "gc/z/zHeap.inline.hpp" |
28 #include "gc/z/zHeap.inline.hpp" |
28 #include "gc/z/zHeapIterator.hpp" |
29 #include "gc/z/zHeapIterator.hpp" |
29 #include "gc/z/zMark.inline.hpp" |
30 #include "gc/z/zMark.inline.hpp" |
167 return MIN2(size, max_tlab_size()); |
168 return MIN2(size, max_tlab_size()); |
168 } |
169 } |
169 |
170 |
170 bool ZHeap::is_in(uintptr_t addr) const { |
171 bool ZHeap::is_in(uintptr_t addr) const { |
171 // An address is considered to be "in the heap" if it points into |
172 // An address is considered to be "in the heap" if it points into |
172 // the allocated part of a pages, regardless of which heap view is |
173 // the allocated part of a page, regardless of which heap view is |
173 // used. Note that an address with the finalizable metadata bit set |
174 // used. Note that an address with the finalizable metadata bit set |
174 // is not pointing into a heap view, and therefore not considered |
175 // is not pointing into a heap view, and therefore not considered |
175 // to be "in the heap". |
176 // to be "in the heap". |
176 |
177 |
177 if (ZAddress::is_in(addr)) { |
178 if (ZAddress::is_in(addr)) { |
500 _page_allocator.enable_deferred_delete(); |
501 _page_allocator.enable_deferred_delete(); |
501 |
502 |
502 st->cr(); |
503 st->cr(); |
503 } |
504 } |
504 |
505 |
|
506 bool ZHeap::print_location(outputStream* st, uintptr_t addr) const { |
|
507 if (LocationPrinter::is_valid_obj((void*)addr)) { |
|
508 st->print(PTR_FORMAT " is a %s oop: ", addr, ZAddress::is_good(addr) ? "good" : "bad"); |
|
509 ZOop::from_address(addr)->print_on(st); |
|
510 return true; |
|
511 } |
|
512 |
|
513 return false; |
|
514 } |
|
515 |
505 void ZHeap::verify() { |
516 void ZHeap::verify() { |
506 // Heap verification can only be done between mark end and |
517 // Heap verification can only be done between mark end and |
507 // relocate start. This is the only window where all oop are |
518 // relocate start. This is the only window where all oop are |
508 // good and the whole heap is in a consistent state. |
519 // good and the whole heap is in a consistent state. |
509 guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase"); |
520 guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase"); |