mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8076076: Move SharedHeap::print_size_transition() into G1 code
Reviewed-by: tschatzl, mgerdin
This commit is contained in:
parent
2c63bc9175
commit
fd46a24a3e
5 changed files with 17 additions and 32 deletions
|
@ -2088,10 +2088,7 @@ void ConcurrentMark::cleanup() {
|
|||
_cleanup_times.add((end - start) * 1000.0);
|
||||
|
||||
if (G1Log::fine()) {
|
||||
g1h->print_size_transition(gclog_or_tty,
|
||||
start_used_bytes,
|
||||
g1h->used(),
|
||||
g1h->capacity());
|
||||
g1h->g1_policy()->print_heap_transition(start_used_bytes);
|
||||
}
|
||||
|
||||
// Clean up will have freed any regions completely full of garbage.
|
||||
|
|
|
@ -1201,11 +1201,21 @@ void G1CollectorPolicy::record_heap_size_info_at_start(bool full) {
|
|||
}
|
||||
}
|
||||
|
||||
void G1CollectorPolicy::print_heap_transition(size_t bytes_before) {
|
||||
size_t bytes_after = _g1->used();
|
||||
size_t capacity = _g1->capacity();
|
||||
|
||||
gclog_or_tty->print(" " SIZE_FORMAT "%s->" SIZE_FORMAT "%s(" SIZE_FORMAT "%s)",
|
||||
byte_size_in_proper_unit(bytes_before),
|
||||
proper_unit_for_byte_size(bytes_before),
|
||||
byte_size_in_proper_unit(bytes_after),
|
||||
proper_unit_for_byte_size(bytes_after),
|
||||
byte_size_in_proper_unit(capacity),
|
||||
proper_unit_for_byte_size(capacity));
|
||||
}
|
||||
|
||||
void G1CollectorPolicy::print_heap_transition() {
|
||||
_g1->print_size_transition(gclog_or_tty,
|
||||
_heap_used_bytes_before_gc,
|
||||
_g1->used(),
|
||||
_g1->capacity());
|
||||
print_heap_transition(_heap_used_bytes_before_gc);
|
||||
}
|
||||
|
||||
void G1CollectorPolicy::print_detailed_heap_transition(bool full) {
|
||||
|
|
|
@ -700,6 +700,8 @@ public:
|
|||
void record_heap_size_info_at_start(bool full);
|
||||
|
||||
// Print heap sizing transition (with less and more detail).
|
||||
|
||||
void print_heap_transition(size_t bytes_before);
|
||||
void print_heap_transition();
|
||||
void print_detailed_heap_transition(bool full = false);
|
||||
|
||||
|
|
|
@ -102,17 +102,3 @@ void SharedHeap::post_initialize() {
|
|||
}
|
||||
|
||||
void SharedHeap::ref_processing_init() {}
|
||||
|
||||
// Some utilities.
|
||||
void SharedHeap::print_size_transition(outputStream* out,
|
||||
size_t bytes_before,
|
||||
size_t bytes_after,
|
||||
size_t capacity) {
|
||||
out->print(" " SIZE_FORMAT "%s->" SIZE_FORMAT "%s(" SIZE_FORMAT "%s)",
|
||||
byte_size_in_proper_unit(bytes_before),
|
||||
proper_unit_for_byte_size(bytes_before),
|
||||
byte_size_in_proper_unit(bytes_after),
|
||||
proper_unit_for_byte_size(bytes_after),
|
||||
byte_size_in_proper_unit(capacity),
|
||||
proper_unit_for_byte_size(capacity));
|
||||
}
|
||||
|
|
|
@ -214,16 +214,6 @@ public:
|
|||
// Sets the number of parallel threads that will be doing tasks
|
||||
// (such as process roots) subsequently.
|
||||
virtual void set_par_threads(uint t);
|
||||
|
||||
//
|
||||
// New methods from CollectedHeap
|
||||
//
|
||||
|
||||
// Some utilities.
|
||||
void print_size_transition(outputStream* out,
|
||||
size_t bytes_before,
|
||||
size_t bytes_after,
|
||||
size_t capacity);
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_MEMORY_SHAREDHEAP_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue