equal
deleted
inserted
replaced
113 void print_julong(julong value); |
113 void print_julong(julong value); |
114 |
114 |
115 // flushing |
115 // flushing |
116 virtual void flush() {} |
116 virtual void flush() {} |
117 virtual void write(const char* str, size_t len) = 0; |
117 virtual void write(const char* str, size_t len) = 0; |
118 virtual void rotate_log() {} // GC log rotation |
118 virtual void rotate_log(bool force, outputStream* out = NULL) {} // GC log rotation |
119 virtual ~outputStream() {} // close properly on deletion |
119 virtual ~outputStream() {} // close properly on deletion |
120 |
120 |
121 void dec_cr() { dec(); cr(); } |
121 void dec_cr() { dec(); cr(); } |
122 void inc_cr() { inc(); cr(); } |
122 void inc_cr() { inc(); cr(); } |
123 }; |
123 }; |
238 uintx _cur_file_num; // current logfile rotation number, from 0 to NumberOfGCLogFiles-1 |
238 uintx _cur_file_num; // current logfile rotation number, from 0 to NumberOfGCLogFiles-1 |
239 public: |
239 public: |
240 gcLogFileStream(const char* file_name); |
240 gcLogFileStream(const char* file_name); |
241 ~gcLogFileStream(); |
241 ~gcLogFileStream(); |
242 virtual void write(const char* c, size_t len); |
242 virtual void write(const char* c, size_t len); |
243 virtual void rotate_log(); |
243 virtual void rotate_log(bool force, outputStream* out = NULL); |
244 void dump_loggc_header(); |
244 void dump_loggc_header(); |
|
245 |
|
246 /* If "force" sets true, force log file rotation from outside JVM */ |
|
247 bool should_rotate(bool force) { |
|
248 return force || |
|
249 ((GCLogFileSize != 0) && ((uintx)_bytes_written >= GCLogFileSize)); |
|
250 } |
245 }; |
251 }; |
246 |
252 |
247 #ifndef PRODUCT |
253 #ifndef PRODUCT |
248 // unit test for checking -Xloggc:<filename> parsing result |
254 // unit test for checking -Xloggc:<filename> parsing result |
249 void test_loggc_filename(); |
255 void test_loggc_filename(); |