Mercurial > hg > truffle
comparison src/share/vm/utilities/ostream.hpp @ 12215:621eda7235d2
7164841: Improvements to the GC log file rotation
Summary: made changes to easily identify current log file in rotation. Parameterize the input with %t for time replacement in file name.
Reviewed-by: ccheung, tschatzl, tamao, zgu
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Mon, 16 Sep 2013 15:35:04 -0700 |
parents | dbc0b5dc08f5 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
12212:4472884d8b37 | 12215:621eda7235d2 |
---|---|
229 int fd() const { return _fd; } | 229 int fd() const { return _fd; } |
230 virtual void write(const char* c, size_t len); | 230 virtual void write(const char* c, size_t len); |
231 void flush() {}; | 231 void flush() {}; |
232 }; | 232 }; |
233 | 233 |
234 class rotatingFileStream : public fileStream { | 234 class gcLogFileStream : public fileStream { |
235 protected: | 235 protected: |
236 char* _file_name; | 236 const char* _file_name; |
237 jlong _bytes_written; | 237 jlong _bytes_written; |
238 uintx _cur_file_num; // current logfile rotation number, from 0 to MaxGCLogFileNumbers-1 | 238 uintx _cur_file_num; // current logfile rotation number, from 0 to NumberOfGCLogFiles-1 |
239 public: | 239 public: |
240 rotatingFileStream(const char* file_name); | 240 gcLogFileStream(const char* file_name); |
241 rotatingFileStream(const char* file_name, const char* opentype); | 241 ~gcLogFileStream(); |
242 rotatingFileStream(FILE* file) : fileStream(file) {} | |
243 ~rotatingFileStream(); | |
244 virtual void write(const char* c, size_t len); | 242 virtual void write(const char* c, size_t len); |
245 virtual void rotate_log(); | 243 virtual void rotate_log(); |
246 }; | 244 void dump_loggc_header(); |
245 }; | |
246 | |
247 #ifndef PRODUCT | |
248 // unit test for checking -Xloggc:<filename> parsing result | |
249 void test_loggc_filename(); | |
250 #endif | |
247 | 251 |
248 void ostream_init(); | 252 void ostream_init(); |
249 void ostream_init_log(); | 253 void ostream_init_log(); |
250 void ostream_exit(); | 254 void ostream_exit(); |
251 void ostream_abort(); | 255 void ostream_abort(); |