< prev index next >

src/hotspot/share/memory/heapInspection.hpp

Print this page

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





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

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