59 // indicates if progress messages can be sent to tty 60 bool print_to_tty() const { return _print_to_tty; } 61 62 // internal timer. 63 elapsedTimer* timer() { return &_t; } 64 65 static void dump_heap(bool oome); 66 67 public: 68 HeapDumper(bool gc_before_heap_dump) : 69 _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(false), _oome(false) { } 70 71 ~HeapDumper(); 72 73 // dumps the heap to the specified file, returns 0 if success. 74 int dump(const char* path); 75 76 // returns error message (resource allocated), or NULL if no error 77 char* error_as_C_string() const; 78 79 static void dump_heap() KERNEL_RETURN; 80 81 static void dump_heap_from_oome() KERNEL_RETURN; 82 }; 83 84 #endif // SHARE_VM_SERVICES_HEAPDUMPER_HPP | 59 // indicates if progress messages can be sent to tty 60 bool print_to_tty() const { return _print_to_tty; } 61 62 // internal timer. 63 elapsedTimer* timer() { return &_t; } 64 65 static void dump_heap(bool oome); 66 67 public: 68 HeapDumper(bool gc_before_heap_dump) : 69 _gc_before_heap_dump(gc_before_heap_dump), _error(NULL), _print_to_tty(false), _oome(false) { } 70 71 ~HeapDumper(); 72 73 // dumps the heap to the specified file, returns 0 if success. 74 int dump(const char* path); 75 76 // returns error message (resource allocated), or NULL if no error 77 char* error_as_C_string() const; 78 79 static void dump_heap() NOT_SERVICES_RETURN; 80 81 static void dump_heap_from_oome() NOT_SERVICES_RETURN; 82 }; 83 84 #endif // SHARE_VM_SERVICES_HEAPDUMPER_HPP |