< prev index next >

src/hotspot/share/memory/heapInspection.hpp

Print this page

174   }
175 
176   static int col_width(julong n, const char *name) {
177     int w = julong_width(n);
178     int min = (int)(strlen(name));
179     if (w < min) {
180         w = min;
181     }
182     // add a leading space for separation.
183     return w + 1;
184   }
185 
186  public:
187   KlassInfoHisto(KlassInfoTable* cit);
188   ~KlassInfoHisto();
189   void add(KlassInfoEntry* cie);
190   void print_histo_on(outputStream* st);
191   void sort();
192 };
193 





194 #endif // INCLUDE_SERVICES
195 
196 // These declarations are needed since the declaration of KlassInfoTable and
197 // KlassInfoClosure are guarded by #if INLCUDE_SERVICES
198 class KlassInfoTable;
199 class KlassInfoClosure;
200 
201 class HeapInspection : public StackObj {
202  public:
203   void heap_inspection(outputStream* st, uint parallel_thread_num = 1) NOT_SERVICES_RETURN;
204   uintx populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL, uint parallel_thread_num = 1) NOT_SERVICES_RETURN_(0);
205   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
206  private:
207   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
208 };
209 
210 // Parallel heap inspection task. Parallel inspection can fail due to
211 // a native OOM when allocating memory for TL-KlassInfoTable.
212 // _success will be set false on an OOM, and serial inspection tried.
213 class ParHeapInspectTask : public WorkerTask {

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