< prev index next >
src/share/vm/gc/shared/generation.cpp
Print this page
*** 34,43 ****
--- 34,44 ----
#include "gc/shared/genOopClosures.hpp"
#include "gc/shared/genOopClosures.inline.hpp"
#include "gc/shared/generation.hpp"
#include "gc/shared/space.inline.hpp"
#include "gc/shared/spaceDecorator.hpp"
+ #include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/java.hpp"
#include "utilities/copy.hpp"
#include "utilities/events.hpp"
*** 68,91 ****
size_t Generation::max_capacity() const {
return reserved().byte_size();
}
- void Generation::print_heap_change(size_t prev_used) const {
- if (PrintGCDetails && Verbose) {
- gclog_or_tty->print(" " SIZE_FORMAT
- "->" SIZE_FORMAT
- "(" SIZE_FORMAT ")",
- prev_used, used(), capacity());
- } else {
- gclog_or_tty->print(" " SIZE_FORMAT "K"
- "->" SIZE_FORMAT "K"
- "(" SIZE_FORMAT "K)",
- prev_used / K, used() / K, capacity() / K);
- }
- }
-
// By default we get a single threaded default reference processor;
// generations needing multi-threaded refs processing or discovery override this method.
void Generation::ref_processor_init() {
assert(_ref_processor == NULL, "a reference processor already exists");
assert(!_reserved.is_empty(), "empty generation?");
--- 69,78 ----
*** 169,184 ****
}
bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
size_t available = max_contiguous_available();
bool res = (available >= max_promotion_in_bytes);
! if (PrintGC && Verbose) {
! gclog_or_tty->print_cr(
! "Generation: promo attempt is%s safe: available(" SIZE_FORMAT ") %s max_promo(" SIZE_FORMAT ")",
! res? "":" not", available, res? ">=":"<",
! max_promotion_in_bytes);
! }
return res;
}
// Ignores "ref" and calls allocate().
oop Generation::promote(oop obj, size_t obj_size) {
--- 156,167 ----
}
bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
size_t available = max_contiguous_available();
bool res = (available >= max_promotion_in_bytes);
! log_trace(gc)("Generation: promo attempt is%s safe: available(" SIZE_FORMAT ") %s max_promo(" SIZE_FORMAT ")",
! res? "":" not", available, res? ">=":"<", max_promotion_in_bytes);
return res;
}
// Ignores "ref" and calls allocate().
oop Generation::promote(oop obj, size_t obj_size) {
< prev index next >