src/share/vm/memory/heapInspection.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/memory

src/share/vm/memory/heapInspection.hpp

Print this page
rev 5732 : [mq]: comments2


 330   static int col_width(julong n, const char *name) {
 331     int w = julong_width(n);
 332     int min = (int)(strlen(name));
 333     if (w < min) {
 334         w = min;
 335     }
 336     // add a leading space for separation.
 337     return w + 1;
 338   }
 339 
 340  public:
 341   KlassInfoHisto(KlassInfoTable* cit, const char* title);
 342   ~KlassInfoHisto();
 343   void add(KlassInfoEntry* cie);
 344   void print_histo_on(outputStream* st, bool print_class_stats, bool csv_format, const char *columns);
 345   void sort();
 346 };
 347 
 348 #endif // INCLUDE_SERVICES
 349 
 350 // These declarations are needed since teh declaration of KlassInfoTable and
 351 // KlassInfoClosure are guarded by #if INLCUDE_SERVICES
 352 class KlassInfoTable;
 353 class KlassInfoClosure;
 354 
 355 class HeapInspection : public StackObj {
 356   bool _csv_format; // "comma separated values" format for spreadsheet.
 357   bool _print_help;
 358   bool _print_class_stats;
 359   const char* _columns;
 360  public:
 361   HeapInspection(bool csv_format, bool print_help,
 362                  bool print_class_stats, const char *columns) :
 363       _csv_format(csv_format), _print_help(print_help),
 364       _print_class_stats(print_class_stats), _columns(columns) {}
 365   void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
 366   size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
 367   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
 368  private:
 369   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
 370 };


 330   static int col_width(julong n, const char *name) {
 331     int w = julong_width(n);
 332     int min = (int)(strlen(name));
 333     if (w < min) {
 334         w = min;
 335     }
 336     // add a leading space for separation.
 337     return w + 1;
 338   }
 339 
 340  public:
 341   KlassInfoHisto(KlassInfoTable* cit, const char* title);
 342   ~KlassInfoHisto();
 343   void add(KlassInfoEntry* cie);
 344   void print_histo_on(outputStream* st, bool print_class_stats, bool csv_format, const char *columns);
 345   void sort();
 346 };
 347 
 348 #endif // INCLUDE_SERVICES
 349 
 350 // These declarations are needed since the declaration of KlassInfoTable and
 351 // KlassInfoClosure are guarded by #if INLCUDE_SERVICES
 352 class KlassInfoTable;
 353 class KlassInfoClosure;
 354 
 355 class HeapInspection : public StackObj {
 356   bool _csv_format; // "comma separated values" format for spreadsheet.
 357   bool _print_help;
 358   bool _print_class_stats;
 359   const char* _columns;
 360  public:
 361   HeapInspection(bool csv_format, bool print_help,
 362                  bool print_class_stats, const char *columns) :
 363       _csv_format(csv_format), _print_help(print_help),
 364       _print_class_stats(print_class_stats), _columns(columns) {}
 365   void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
 366   size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
 367   static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
 368  private:
 369   void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
 370 };
src/share/vm/memory/heapInspection.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File