154 |
154 |
155 public: |
155 public: |
156 void report_promotion_failed(const PromotionFailedInfo& pf_info); |
156 void report_promotion_failed(const PromotionFailedInfo& pf_info); |
157 void report_tenuring_threshold(const uint tenuring_threshold); |
157 void report_tenuring_threshold(const uint tenuring_threshold); |
158 |
158 |
|
159 /* |
|
160 * Methods for reporting Promotion in new or outside PLAB Events. |
|
161 * |
|
162 * The object age is always required as it is not certain that the mark word |
|
163 * of the oop can be trusted at this stage. |
|
164 * |
|
165 * obj_size is the size of the promoted object in bytes. |
|
166 * |
|
167 * tenured should be true if the object has been promoted to the old |
|
168 * space during this GC, if the object is copied to survivor space |
|
169 * from young space or survivor space (aging) tenured should be false. |
|
170 * |
|
171 * plab_size is the size of the newly allocated PLAB in bytes. |
|
172 */ |
|
173 bool should_report_promotion_in_new_plab_event() const; |
|
174 bool should_report_promotion_outside_plab_event() const; |
|
175 void report_promotion_in_new_plab_event(Klass* klass, size_t obj_size, |
|
176 uint age, bool tenured, |
|
177 size_t plab_size) const; |
|
178 void report_promotion_outside_plab_event(Klass* klass, size_t obj_size, |
|
179 uint age, bool tenured) const; |
|
180 |
159 private: |
181 private: |
160 void send_young_gc_event() const; |
182 void send_young_gc_event() const; |
161 void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const; |
183 void send_promotion_failed_event(const PromotionFailedInfo& pf_info) const; |
|
184 bool should_send_promotion_in_new_plab_event() const; |
|
185 bool should_send_promotion_outside_plab_event() const; |
|
186 void send_promotion_in_new_plab_event(Klass* klass, size_t obj_size, |
|
187 uint age, bool tenured, |
|
188 size_t plab_size) const; |
|
189 void send_promotion_outside_plab_event(Klass* klass, size_t obj_size, |
|
190 uint age, bool tenured) const; |
162 }; |
191 }; |
163 |
192 |
164 class OldGCTracer : public GCTracer { |
193 class OldGCTracer : public GCTracer { |
165 protected: |
194 protected: |
166 OldGCTracer(GCName name) : GCTracer(name) {} |
195 OldGCTracer(GCName name) : GCTracer(name) {} |