# HG changeset patch # User tschatzl # Date 1522846286 -7200 # Node ID f1d2b6c0693bce3cf4058033538d69504f1bf156 # Parent 015af70b9a1d5362788e477bbbcee251aa2f63d7 8200305: Update gc,liveness output with remset state after rebuild remset concurrently changes Reviewed-by: sjohanss, sangheki diff -r 015af70b9a1d -r f1d2b6c0693b src/hotspot/share/gc/g1/g1ConcurrentMark.cpp --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Wed Apr 04 12:06:31 2018 +0200 +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp Wed Apr 04 14:51:26 2018 +0200 @@ -2826,6 +2826,8 @@ // For per-region info #define G1PPRL_TYPE_FORMAT " %-4s" #define G1PPRL_TYPE_H_FORMAT " %4s" +#define G1PPRL_STATE_FORMAT " %-5s" +#define G1PPRL_STATE_H_FORMAT " %5s" #define G1PPRL_BYTE_FORMAT " " SIZE_FORMAT_W(9) #define G1PPRL_BYTE_H_FORMAT " %9s" #define G1PPRL_DOUBLE_FORMAT " %14.1f" @@ -2862,10 +2864,11 @@ G1PPRL_BYTE_H_FORMAT G1PPRL_DOUBLE_H_FORMAT G1PPRL_BYTE_H_FORMAT + G1PPRL_STATE_H_FORMAT G1PPRL_BYTE_H_FORMAT, "type", "address-range", "used", "prev-live", "next-live", "gc-eff", - "remset", "code-roots"); + "remset", "state", "code-roots"); log_trace(gc, liveness)(G1PPRL_LINE_PREFIX G1PPRL_TYPE_H_FORMAT G1PPRL_ADDR_BASE_H_FORMAT @@ -2874,10 +2877,11 @@ G1PPRL_BYTE_H_FORMAT G1PPRL_DOUBLE_H_FORMAT G1PPRL_BYTE_H_FORMAT + G1PPRL_STATE_H_FORMAT G1PPRL_BYTE_H_FORMAT, "", "", "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", - "(bytes)", "(bytes)"); + "(bytes)", "", "(bytes)"); } bool G1PrintRegionLivenessInfoClosure::do_heap_region(HeapRegion* r) { @@ -2891,6 +2895,7 @@ double gc_eff = r->gc_efficiency(); size_t remset_bytes = r->rem_set()->mem_size(); size_t strong_code_roots_bytes = r->rem_set()->strong_code_roots_mem_size(); + const char* remset_type = r->rem_set()->get_short_state_str(); _total_used_bytes += used_bytes; _total_capacity_bytes += capacity_bytes; @@ -2908,10 +2913,11 @@ G1PPRL_BYTE_FORMAT G1PPRL_DOUBLE_FORMAT G1PPRL_BYTE_FORMAT + G1PPRL_STATE_FORMAT G1PPRL_BYTE_FORMAT, type, p2i(bottom), p2i(end), used_bytes, prev_live_bytes, next_live_bytes, gc_eff, - remset_bytes, strong_code_roots_bytes); + remset_bytes, remset_type, strong_code_roots_bytes); return false; } diff -r 015af70b9a1d -r f1d2b6c0693b src/hotspot/share/gc/g1/heapRegionRemSet.cpp --- a/src/hotspot/share/gc/g1/heapRegionRemSet.cpp Wed Apr 04 12:06:31 2018 +0200 +++ b/src/hotspot/share/gc/g1/heapRegionRemSet.cpp Wed Apr 04 14:51:26 2018 +0200 @@ -40,6 +40,7 @@ #include "utilities/growableArray.hpp" const char* HeapRegionRemSet::_state_strings[] = {"Untracked", "Updating", "Complete"}; +const char* HeapRegionRemSet::_short_state_strings[] = {"UNTRA", "UPDAT", "CMPLT"}; class PerRegionTable: public CHeapObj { friend class OtherRegionsTable; diff -r 015af70b9a1d -r f1d2b6c0693b src/hotspot/share/gc/g1/heapRegionRemSet.hpp --- a/src/hotspot/share/gc/g1/heapRegionRemSet.hpp Wed Apr 04 12:06:31 2018 +0200 +++ b/src/hotspot/share/gc/g1/heapRegionRemSet.hpp Wed Apr 04 14:51:26 2018 +0200 @@ -224,9 +224,11 @@ RemSetState _state; static const char* _state_strings[]; + static const char* _short_state_strings[]; public: const char* get_state_str() const { return _state_strings[_state]; } + const char* get_short_state_str() const { return _short_state_strings[_state]; } bool is_tracked() { return _state != Untracked; } bool is_updating() { return _state == Updating; }