< prev index next >

src/hotspot/share/memory/heapInspection.hpp

Print this page

190   }
191 
192   static int col_width(julong n, const char *name) {
193     int w = julong_width(n);
194     int min = (int)(strlen(name));
195     if (w < min) {
196         w = min;
197     }
198     // add a leading space for separation.
199     return w + 1;
200   }
201 
202  public:
203   KlassInfoHisto(KlassInfoTable* cit);
204   ~KlassInfoHisto();
205   void add(KlassInfoEntry* cie);
206   void print_histo_on(outputStream* st);
207   void sort();
208 };
209 





210 #endif // INCLUDE_SERVICES
211 
212 // These declarations are needed since the declaration of KlassInfoTable and
213 // KlassInfoClosure are guarded by #if INLCUDE_SERVICES
214 class KlassInfoTable;
215 class KlassInfoClosure;
216 
217 class HeapInspection : public StackObj {
218  public:
219   void heap_inspection(outputStream* st, uint parallel_thread_num = 1) NOT_SERVICES_RETURN;
220   uintx populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL, uint parallel_thread_num = 1) NOT_SERVICES_RETURN_(0);
221   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
222  private:
223   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
224 };
225 
226 // Parallel heap inspection task. Parallel inspection can fail due to
227 // a native OOM when allocating memory for TL-KlassInfoTable.
228 // _success will be set false on an OOM, and serial inspection tried.
229 class ParHeapInspectTask : public AbstractGangTask {

190   }
191 
192   static int col_width(julong n, const char *name) {
193     int w = julong_width(n);
194     int min = (int)(strlen(name));
195     if (w < min) {
196         w = min;
197     }
198     // add a leading space for separation.
199     return w + 1;
200   }
201 
202  public:
203   KlassInfoHisto(KlassInfoTable* cit);
204   ~KlassInfoHisto();
205   void add(KlassInfoEntry* cie);
206   void print_histo_on(outputStream* st);
207   void sort();
208 };
209 
210 class PrintClassLayout : AllStatic {
211  public:
212   static void print_class_layout(outputStream* st, char* classname);
213 };
214 
215 #endif // INCLUDE_SERVICES
216 
217 // These declarations are needed since the declaration of KlassInfoTable and
218 // KlassInfoClosure are guarded by #if INLCUDE_SERVICES
219 class KlassInfoTable;
220 class KlassInfoClosure;
221 
222 class HeapInspection : public StackObj {
223  public:
224   void heap_inspection(outputStream* st, uint parallel_thread_num = 1) NOT_SERVICES_RETURN;
225   uintx populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL, uint parallel_thread_num = 1) NOT_SERVICES_RETURN_(0);
226   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
227  private:
228   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
229 };
230 
231 // Parallel heap inspection task. Parallel inspection can fail due to
232 // a native OOM when allocating memory for TL-KlassInfoTable.
233 // _success will be set false on an OOM, and serial inspection tried.
234 class ParHeapInspectTask : public AbstractGangTask {
< prev index next >