< prev index next >

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

Print this page




1046     assert(new_finger >= _finger && new_finger < _region_limit, "invariant");
1047     _finger = new_finger;
1048   }
1049 
1050   CMTask(uint worker_id,
1051          ConcurrentMark *cm,
1052          size_t* marked_bytes,
1053          BitMap* card_bm,
1054          CMTaskQueue* task_queue,
1055          CMTaskQueueSet* task_queues);
1056 
1057   // it prints statistics associated with this task
1058   void print_stats();
1059 };
1060 
1061 // Class that's used to to print out per-region liveness
1062 // information. It's currently used at the end of marking and also
1063 // after we sort the old regions at the end of the cleanup operation.
1064 class G1PrintRegionLivenessInfoClosure: public HeapRegionClosure {
1065 private:
1066   outputStream* _out;
1067 
1068   // Accumulators for these values.
1069   size_t _total_used_bytes;
1070   size_t _total_capacity_bytes;
1071   size_t _total_prev_live_bytes;
1072   size_t _total_next_live_bytes;
1073 
1074   // These are set up when we come across a "stars humongous" region
1075   // (as this is where most of this information is stored, not in the
1076   // subsequent "continues humongous" regions). After that, for every
1077   // region in a given humongous region series we deduce the right
1078   // values for it by simply subtracting the appropriate amount from
1079   // these fields. All these values should reach 0 after we've visited
1080   // the last region in the series.
1081   size_t _hum_used_bytes;
1082   size_t _hum_capacity_bytes;
1083   size_t _hum_prev_live_bytes;
1084   size_t _hum_next_live_bytes;
1085 
1086   // Accumulator for the remembered set size
1087   size_t _total_remset_bytes;


1092   static double perc(size_t val, size_t total) {
1093     if (total == 0) {
1094       return 0.0;
1095     } else {
1096       return 100.0 * ((double) val / (double) total);
1097     }
1098   }
1099 
1100   static double bytes_to_mb(size_t val) {
1101     return (double) val / (double) M;
1102   }
1103 
1104   // See the .cpp file.
1105   size_t get_hum_bytes(size_t* hum_bytes);
1106   void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes,
1107                      size_t* prev_live_bytes, size_t* next_live_bytes);
1108 
1109 public:
1110   // The header and footer are printed in the constructor and
1111   // destructor respectively.
1112   G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name);
1113   virtual bool doHeapRegion(HeapRegion* r);
1114   ~G1PrintRegionLivenessInfoClosure();
1115 };
1116 
1117 #endif // SHARE_VM_GC_G1_CONCURRENTMARK_HPP


1046     assert(new_finger >= _finger && new_finger < _region_limit, "invariant");
1047     _finger = new_finger;
1048   }
1049 
1050   CMTask(uint worker_id,
1051          ConcurrentMark *cm,
1052          size_t* marked_bytes,
1053          BitMap* card_bm,
1054          CMTaskQueue* task_queue,
1055          CMTaskQueueSet* task_queues);
1056 
1057   // it prints statistics associated with this task
1058   void print_stats();
1059 };
1060 
1061 // Class that's used to to print out per-region liveness
1062 // information. It's currently used at the end of marking and also
1063 // after we sort the old regions at the end of the cleanup operation.
1064 class G1PrintRegionLivenessInfoClosure: public HeapRegionClosure {
1065 private:


1066   // Accumulators for these values.
1067   size_t _total_used_bytes;
1068   size_t _total_capacity_bytes;
1069   size_t _total_prev_live_bytes;
1070   size_t _total_next_live_bytes;
1071 
1072   // These are set up when we come across a "stars humongous" region
1073   // (as this is where most of this information is stored, not in the
1074   // subsequent "continues humongous" regions). After that, for every
1075   // region in a given humongous region series we deduce the right
1076   // values for it by simply subtracting the appropriate amount from
1077   // these fields. All these values should reach 0 after we've visited
1078   // the last region in the series.
1079   size_t _hum_used_bytes;
1080   size_t _hum_capacity_bytes;
1081   size_t _hum_prev_live_bytes;
1082   size_t _hum_next_live_bytes;
1083 
1084   // Accumulator for the remembered set size
1085   size_t _total_remset_bytes;


1090   static double perc(size_t val, size_t total) {
1091     if (total == 0) {
1092       return 0.0;
1093     } else {
1094       return 100.0 * ((double) val / (double) total);
1095     }
1096   }
1097 
1098   static double bytes_to_mb(size_t val) {
1099     return (double) val / (double) M;
1100   }
1101 
1102   // See the .cpp file.
1103   size_t get_hum_bytes(size_t* hum_bytes);
1104   void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes,
1105                      size_t* prev_live_bytes, size_t* next_live_bytes);
1106 
1107 public:
1108   // The header and footer are printed in the constructor and
1109   // destructor respectively.
1110   G1PrintRegionLivenessInfoClosure(const char* phase_name);
1111   virtual bool doHeapRegion(HeapRegion* r);
1112   ~G1PrintRegionLivenessInfoClosure();
1113 };
1114 
1115 #endif // SHARE_VM_GC_G1_CONCURRENTMARK_HPP
< prev index next >