< prev index next >

src/share/vm/gc/g1/g1ConcurrentMark.hpp

Print this page
rev 10498 : imported patch 8151126-clean-up-duplicate-code-for-clearing-bitmaps
rev 10500 : imported patch 8151614-improve-concurrent-mark-logging
rev 10501 : imported patch 8151920-region-liveness-printing-broken


 984            size_t* marked_bytes,
 985            BitMap* card_bm,
 986            G1CMTaskQueue* task_queue,
 987            G1CMTaskQueueSet* task_queues);
 988 
 989   // it prints statistics associated with this task
 990   void print_stats();
 991 };
 992 
 993 // Class that's used to to print out per-region liveness
 994 // information. It's currently used at the end of marking and also
 995 // after we sort the old regions at the end of the cleanup operation.
 996 class G1PrintRegionLivenessInfoClosure: public HeapRegionClosure {
 997 private:
 998   // Accumulators for these values.
 999   size_t _total_used_bytes;
1000   size_t _total_capacity_bytes;
1001   size_t _total_prev_live_bytes;
1002   size_t _total_next_live_bytes;
1003 
1004   // These are set up when we come across a "stars humongous" region
1005   // (as this is where most of this information is stored, not in the
1006   // subsequent "continues humongous" regions). After that, for every
1007   // region in a given humongous region series we deduce the right
1008   // values for it by simply subtracting the appropriate amount from
1009   // these fields. All these values should reach 0 after we've visited
1010   // the last region in the series.
1011   size_t _hum_used_bytes;
1012   size_t _hum_capacity_bytes;
1013   size_t _hum_prev_live_bytes;
1014   size_t _hum_next_live_bytes;
1015 
1016   // Accumulator for the remembered set size
1017   size_t _total_remset_bytes;
1018 
1019   // Accumulator for strong code roots memory size
1020   size_t _total_strong_code_roots_bytes;
1021 
1022   static double perc(size_t val, size_t total) {
1023     if (total == 0) {
1024       return 0.0;
1025     } else {
1026       return 100.0 * ((double) val / (double) total);
1027     }
1028   }
1029 
1030   static double bytes_to_mb(size_t val) {
1031     return (double) val / (double) M;
1032   }
1033 
1034   // See the .cpp file.
1035   size_t get_hum_bytes(size_t* hum_bytes);
1036   void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes,
1037                      size_t* prev_live_bytes, size_t* next_live_bytes);
1038 
1039 public:
1040   // The header and footer are printed in the constructor and
1041   // destructor respectively.
1042   G1PrintRegionLivenessInfoClosure(const char* phase_name);
1043   virtual bool doHeapRegion(HeapRegion* r);
1044   ~G1PrintRegionLivenessInfoClosure();
1045 };
1046 
1047 #endif // SHARE_VM_GC_G1_G1CONCURRENTMARK_HPP


 984            size_t* marked_bytes,
 985            BitMap* card_bm,
 986            G1CMTaskQueue* task_queue,
 987            G1CMTaskQueueSet* task_queues);
 988 
 989   // it prints statistics associated with this task
 990   void print_stats();
 991 };
 992 
 993 // Class that's used to to print out per-region liveness
 994 // information. It's currently used at the end of marking and also
 995 // after we sort the old regions at the end of the cleanup operation.
 996 class G1PrintRegionLivenessInfoClosure: public HeapRegionClosure {
 997 private:
 998   // Accumulators for these values.
 999   size_t _total_used_bytes;
1000   size_t _total_capacity_bytes;
1001   size_t _total_prev_live_bytes;
1002   size_t _total_next_live_bytes;
1003 












1004   // Accumulator for the remembered set size
1005   size_t _total_remset_bytes;
1006 
1007   // Accumulator for strong code roots memory size
1008   size_t _total_strong_code_roots_bytes;
1009 
1010   static double perc(size_t val, size_t total) {
1011     if (total == 0) {
1012       return 0.0;
1013     } else {
1014       return 100.0 * ((double) val / (double) total);
1015     }
1016   }
1017 
1018   static double bytes_to_mb(size_t val) {
1019     return (double) val / (double) M;
1020   }





1021 
1022 public:
1023   // The header and footer are printed in the constructor and
1024   // destructor respectively.
1025   G1PrintRegionLivenessInfoClosure(const char* phase_name);
1026   virtual bool doHeapRegion(HeapRegion* r);
1027   ~G1PrintRegionLivenessInfoClosure();
1028 };
1029 
1030 #endif // SHARE_VM_GC_G1_G1CONCURRENTMARK_HPP
< prev index next >